summaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
authorYDBot <[email protected]>2025-10-15 00:52:24 +0000
committerYDBot <[email protected]>2025-10-15 00:52:24 +0000
commitaffd1e0ad8ed690582104d46bc4bacaf201dff1f (patch)
tree8b219d294b364728ddd84cb0e7806fa3012018b9 /contrib/python
parent8336376aa2395aae3dad85b0bd446b47195ce301 (diff)
parente8c46fd002e9053bea2158c8c9ed285660b99ae4 (diff)
Sync branches 251015-0050
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/MarkupSafe/py3/.dist-info/METADATA48
-rw-r--r--contrib/python/MarkupSafe/py3/README.md10
-rw-r--r--contrib/python/MarkupSafe/py3/markupsafe/__init__.py5
-rw-r--r--contrib/python/MarkupSafe/py3/markupsafe/_speedups.c36
-rw-r--r--contrib/python/MarkupSafe/py3/tests/test_ext_init.py28
-rw-r--r--contrib/python/MarkupSafe/py3/tests/test_leak.py3
-rw-r--r--contrib/python/MarkupSafe/py3/ya.make2
-rw-r--r--contrib/python/aiohappyeyeballs/.dist-info/METADATA123
-rw-r--r--contrib/python/aiohappyeyeballs/LICENSE279
-rw-r--r--contrib/python/aiohappyeyeballs/README.md96
-rw-r--r--contrib/python/aiohappyeyeballs/aiohappyeyeballs/__init__.py14
-rw-r--r--contrib/python/aiohappyeyeballs/aiohappyeyeballs/_staggered.py207
-rw-r--r--contrib/python/aiohappyeyeballs/aiohappyeyeballs/impl.py259
-rw-r--r--contrib/python/aiohappyeyeballs/aiohappyeyeballs/py.typed0
-rw-r--r--contrib/python/aiohappyeyeballs/aiohappyeyeballs/types.py17
-rw-r--r--contrib/python/aiohappyeyeballs/aiohappyeyeballs/utils.py97
-rw-r--r--contrib/python/aiohappyeyeballs/ya.make26
-rw-r--r--contrib/python/aiohttp/.dist-info/METADATA11
-rw-r--r--contrib/python/aiohttp/README.rst3
-rw-r--r--contrib/python/aiohttp/aiohttp/__init__.py82
-rw-r--r--contrib/python/aiohttp/aiohttp/_helpers.pyx22
-rw-r--r--contrib/python/aiohttp/aiohttp/_http_parser.pyx19
-rw-r--r--contrib/python/aiohttp/aiohttp/abc.py31
-rw-r--r--contrib/python/aiohttp/aiohttp/base_protocol.py3
-rw-r--r--contrib/python/aiohttp/aiohttp/client.py408
-rw-r--r--contrib/python/aiohttp/aiohttp/client_exceptions.py79
-rw-r--r--contrib/python/aiohttp/aiohttp/client_proto.py30
-rw-r--r--contrib/python/aiohttp/aiohttp/client_reqrep.py173
-rw-r--r--contrib/python/aiohttp/aiohttp/client_ws.py203
-rw-r--r--contrib/python/aiohttp/aiohttp/compression_utils.py8
-rw-r--r--contrib/python/aiohttp/aiohttp/connector.py241
-rw-r--r--contrib/python/aiohttp/aiohttp/cookiejar.py230
-rw-r--r--contrib/python/aiohttp/aiohttp/helpers.py159
-rw-r--r--contrib/python/aiohttp/aiohttp/http_exceptions.py1
-rw-r--r--contrib/python/aiohttp/aiohttp/http_parser.py49
-rw-r--r--contrib/python/aiohttp/aiohttp/http_websocket.py447
-rw-r--r--contrib/python/aiohttp/aiohttp/http_writer.py7
-rw-r--r--contrib/python/aiohttp/aiohttp/multipart.py80
-rw-r--r--contrib/python/aiohttp/aiohttp/payload.py45
-rw-r--r--contrib/python/aiohttp/aiohttp/payload_streamer.py3
-rw-r--r--contrib/python/aiohttp/aiohttp/pytest_plugin.py52
-rw-r--r--contrib/python/aiohttp/aiohttp/resolver.py107
-rw-r--r--contrib/python/aiohttp/aiohttp/streams.py3
-rw-r--r--contrib/python/aiohttp/aiohttp/test_utils.py162
-rw-r--r--contrib/python/aiohttp/aiohttp/tracing.py72
-rw-r--r--contrib/python/aiohttp/aiohttp/typedefs.py23
-rw-r--r--contrib/python/aiohttp/aiohttp/web.py37
-rw-r--r--contrib/python/aiohttp/aiohttp/web_app.py76
-rw-r--r--contrib/python/aiohttp/aiohttp/web_fileresponse.py141
-rw-r--r--contrib/python/aiohttp/aiohttp/web_middlewares.py7
-rw-r--r--contrib/python/aiohttp/aiohttp/web_protocol.py170
-rw-r--r--contrib/python/aiohttp/aiohttp/web_request.py46
-rw-r--r--contrib/python/aiohttp/aiohttp/web_response.py68
-rw-r--r--contrib/python/aiohttp/aiohttp/web_routedef.py6
-rw-r--r--contrib/python/aiohttp/aiohttp/web_runner.py18
-rw-r--r--contrib/python/aiohttp/aiohttp/web_server.py11
-rw-r--r--contrib/python/aiohttp/aiohttp/web_urldispatcher.py225
-rw-r--r--contrib/python/aiohttp/aiohttp/web_ws.py185
-rw-r--r--contrib/python/aiohttp/patches/04-force-content-type.patch12
-rw-r--r--contrib/python/aiohttp/patches/04-pr11265-support-aiosignal-1.4.patch109
-rw-r--r--contrib/python/aiohttp/patches/05-disable-retries-on-oidemponent-methods.patch11
-rw-r--r--contrib/python/aiohttp/patches/06-mypy-silence.patch61
-rw-r--r--contrib/python/aiohttp/patches/07-dont-throw-at-newline.patch12
-rw-r--r--contrib/python/aiohttp/patches/99-rep-get-running-loop.sh4
-rw-r--r--contrib/python/aiohttp/ya.make3
-rw-r--r--contrib/python/fonttools/.dist-info/METADATA14
-rw-r--r--contrib/python/fonttools/fontTools/__init__.py2
-rw-r--r--contrib/python/fonttools/fontTools/misc/visitor.py38
-rw-r--r--contrib/python/fonttools/fontTools/subset/__init__.py190
-rw-r--r--contrib/python/fonttools/fontTools/ufoLib/__init__.py4
-rw-r--r--contrib/python/fonttools/ya.make2
-rw-r--r--contrib/python/google-auth/py3/.dist-info/METADATA32
-rw-r--r--contrib/python/google-auth/py3/.dist-info/top_level.txt2
-rw-r--r--contrib/python/google-auth/py3/google/auth/_default.py49
-rw-r--r--contrib/python/google-auth/py3/google/auth/_helpers.py41
-rw-r--r--contrib/python/google-auth/py3/google/auth/compute_engine/credentials.py73
-rw-r--r--contrib/python/google-auth/py3/google/auth/credentials.py179
-rw-r--r--contrib/python/google-auth/py3/google/auth/environment_vars.py4
-rw-r--r--contrib/python/google-auth/py3/google/auth/external_account.py43
-rw-r--r--contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py25
-rw-r--r--contrib/python/google-auth/py3/google/auth/identity_pool.py26
-rw-r--r--contrib/python/google-auth/py3/google/auth/impersonated_credentials.py66
-rw-r--r--contrib/python/google-auth/py3/google/auth/pluggable.py26
-rw-r--r--contrib/python/google-auth/py3/google/auth/version.py2
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/_client.py117
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/service_account.py43
-rw-r--r--contrib/python/google-auth/py3/tests/compute_engine/test_credentials.py384
-rw-r--r--contrib/python/google-auth/py3/tests/oauth2/test__client.py177
-rw-r--r--contrib/python/google-auth/py3/tests/oauth2/test_service_account.py293
-rw-r--r--contrib/python/google-auth/py3/tests/test__helpers.py29
-rw-r--r--contrib/python/google-auth/py3/tests/test_aws.py10
-rw-r--r--contrib/python/google-auth/py3/tests/test_credentials.py186
-rw-r--r--contrib/python/google-auth/py3/tests/test_external_account.py52
-rw-r--r--contrib/python/google-auth/py3/tests/test_identity_pool.py6
-rw-r--r--contrib/python/google-auth/py3/tests/test_impersonated_credentials.py302
-rw-r--r--contrib/python/google-auth/py3/ya.make2
-rw-r--r--contrib/python/kubernetes/.dist-info/METADATA5
-rw-r--r--contrib/python/kubernetes/README.md5
-rw-r--r--contrib/python/kubernetes/kubernetes/__init__.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/__init__.py122
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/__init__.py1
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/admissionregistration_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1alpha1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1beta1_api.py860
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/apiextensions_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/apiextensions_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/apiregistration_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/apiregistration_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/apis_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/apps_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/apps_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/authentication_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/authentication_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/authorization_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/authorization_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/autoscaling_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/autoscaling_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/autoscaling_v2_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/batch_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/batch_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/certificates_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/certificates_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/certificates_v1alpha1_api.py1703
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/certificates_v1beta1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/coordination_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/coordination_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/coordination_v1alpha2_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/coordination_v1beta1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/core_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/core_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/custom_objects_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/discovery_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/discovery_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/events_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/events_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_v1alpha1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/logs_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/networking_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/networking_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/networking_v1beta1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/node_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/node_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/openid_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/policy_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/policy_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/resource_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/resource_v1_api.py5177
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/resource_v1alpha3_api.py5037
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/resource_v1beta1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/resource_v1beta2_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/scheduling_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/scheduling_v1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/storage_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/storage_v1_api.py1039
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/storage_v1alpha1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/storage_v1beta1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/storagemigration_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/storagemigration_v1alpha1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/version_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/well_known_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api_client.py4
-rw-r--r--contrib/python/kubernetes/kubernetes/client/configuration.py16
-rw-r--r--contrib/python/kubernetes/kubernetes/client/exceptions.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/__init__.py119
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_service_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_webhook_client_config.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_service_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_webhook_client_config.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/apiregistration_v1_service_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/authentication_v1_token_request.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/core_v1_endpoint_port.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/core_v1_event.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/core_v1_event_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/core_v1_event_series.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/core_v1_resource_claim.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim.py)26
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/discovery_v1_endpoint_port.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/events_v1_event.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/events_v1_event_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/events_v1_event_series.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/flowcontrol_v1_subject.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/rbac_v1_subject.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/resource_v1_resource_claim.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim.py)62
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/storage_v1_token_request.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_affinity.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_aggregation_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_allocated_device_status.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_allocated_device_status.py)98
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_allocation_result.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_allocation_result.py)62
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_group.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_group_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_resource.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_resource_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_service.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_service_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_service_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_service_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_service_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_api_versions.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_app_armor_profile.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_attached_volume.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_audit_annotation.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_azure_disk_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_binding.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_bound_object_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_capabilities.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_capacity_request_policy.py176
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_capacity_request_policy_range.py179
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_capacity_requirements.py122
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cel_device_selector.py123
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cinder_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cinder_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_client_ip_config.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cluster_trust_bundle_projection.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_component_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_component_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_component_status_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_config_map.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_config_map_env_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_config_map_key_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_config_map_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_config_map_node_config_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_config_map_projection.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_config_map_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container.py40
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_extended_resource_request.py181
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_image.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_port.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_resize_policy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_restart_rule.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device.py)82
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py151
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_state.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_state_running.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_state_terminated.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_state_waiting.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container_user.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_counter.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_counter.py)18
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_counter_set.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_counter_set.py)40
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cron_job.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_cross_version_object_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_spec.py10
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_node.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_driver.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_csi_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_column_definition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_conversion.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_names.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_version.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresource_scale.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresources.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_validation.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_daemon_endpoint.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_update_strategy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_delete_options.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_deployment.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_deployment_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_deployment_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_deployment_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_deployment_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_deployment_strategy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device.py429
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_allocation_configuration.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_allocation_configuration.py)40
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_allocation_result.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_allocation_result.py)38
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_attribute.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_attribute.py)42
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_capacity.py149
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_claim.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_claim.py)52
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_claim_configuration.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_claim_configuration.py)32
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_class.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_slice.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_class_configuration.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class_configuration.py)24
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_class_list.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class_list.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_class_spec.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class_spec.py)68
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_constraint.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_constraint.py)56
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_counter_consumption.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_counter_consumption.py)40
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_request.py177
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_request_allocation_result.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_request_allocation_result.py)178
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_selector.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1beta1_type_checking.py)46
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_sub_request.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_sub_request.py)106
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_taint.py208
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_device_toleration.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_toleration.py)50
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_projection.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_file.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_empty_dir_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_endpoint.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_address.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_conditions.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_hints.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_subset.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_endpoints.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_endpoints_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_env_from_source.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_env_var.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_env_var_source.py30
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_container.py40
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_event_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_eviction.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_exact_device_request.py289
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_exec_action.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_exempt_priority_level_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_expression_warning.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_external_documentation.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_fc_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_attributes.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_requirement.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_file_key_selector.py209
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_flex_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_flex_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_flocker_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_flow_distinguisher_method.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_for_node.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_for_zone.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_gce_persistent_disk_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_git_repo_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_volume_source.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_group_subject.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_group_version_for_discovery.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_grpc_action.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_host_alias.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_host_ip.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_host_path_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_http_get_action.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_http_header.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_path.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_rule_value.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_image_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_backend.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_parameters_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_ingress.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_port_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_service_backend.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ingress_tls.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ip_address.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ip_block.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_job.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_job_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_job_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_job_spec.py10
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_job_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_job_template_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_json_schema_props.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_key_to_path.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_label_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_attributes.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_requirement.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_lease.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_lease_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_lease_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle_handler.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_limit_range.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_item.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_limit_response.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_limited_priority_level_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_linux_container_user.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_list_meta.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_ingress.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_local_object_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_local_subject_access_review.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_local_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_managed_fields_entry.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_match_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_match_resources.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_modify_volume_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_named_rule_with_operations.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_namespace.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_namespace_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_namespace_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_namespace_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_namespace_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_network_device_data.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_network_device_data.py)38
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_network_policy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_egress_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_ingress_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_peer.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_port.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_spec.py7
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_nfs_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_address.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_affinity.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_config_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_config_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_daemon_endpoints.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_features.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler_features.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_requirement.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_term.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_swap_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_system_info.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_attributes.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_policy_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_object_field_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_object_meta.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_object_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_opaque_device_configuration.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_opaque_device_configuration.py)26
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_overhead.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_owner_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_param_kind.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_param_ref.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_parent_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_spec.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_status.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_template.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_spec.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_photon_persistent_disk_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity_term.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_anti_affinity.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_certificate_projection.py264
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config_option.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_extended_resource_claim_status.py152
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_exit_codes_requirement.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_pod_conditions_pattern.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_ip.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_os.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_readiness_gate.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_scheduling_gate.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_security_context.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_spec.py36
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_status.py30
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_template.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_policy_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_policy_rules_with_subjects.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_port_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_portworx_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_preconditions.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_preferred_scheduling_term.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_priority_class.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_priority_class_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_probe.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_projected_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_queuing_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_quobyte_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_rbd_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_rbd_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replica_set.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_attributes.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_consumer_reference.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_consumer_reference.py)42
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_list.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_list.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_spec.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_spec.py)24
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_status.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_status.py)52
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_template.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_template.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_template_list.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_template_list.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_template_spec.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_template_spec.py)32
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_field_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_health.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_policy_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_pool.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_pool.py)34
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_requirements.py12
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_slice.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_slice_list.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_slice_list.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_slice_spec.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_slice_spec.py)96
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_role.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_role_binding.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_role_binding_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_role_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_role_ref.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_daemon_set.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_deployment.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_stateful_set_strategy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_rule_with_operations.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_scale.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_scale_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_scale_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_scheduling.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_scope_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_scoped_resource_selector_requirement.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_se_linux_options.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_seccomp_profile.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_secret.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_secret_env_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_secret_key_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_secret_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_secret_projection.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_secret_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_secret_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_security_context.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_selectable_field.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_server_address_by_client_cidr.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_account.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_account_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_account_subject.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_account_token_projection.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_backend_port.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_port.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_service_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_session_affinity_config.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_sleep_action.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_ordinals.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_persistent_volume_claim_retention_policy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_update_strategy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_status_cause.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_status_details.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_storage_class.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_storage_class_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_persistent_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_subject_rules_review_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_success_policy.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_success_policy_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_sysctl.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_taint.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_tcp_socket_action.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_token_request_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_token_request_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_token_review.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_token_review_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_token_review_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_toleration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_label_requirement.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_term.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_topology_spread_constraint.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_type_checking.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_typed_local_object_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_typed_object_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_uncounted_terminated_pods.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_user_info.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_user_subject.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validation.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validation_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_variable.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_attributes_class.py233
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_attributes_class_list.py205
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_device.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_error.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_affinity.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_resources.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_projection.py30
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_resource_requirements.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_vsphere_virtual_disk_volume_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_watch_event.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_webhook_conversion.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_weighted_pod_affinity_term.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_windows_security_context_options.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_apply_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_group_version_resource.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_json_patch.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_resources.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_migration_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutation.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_named_rule_with_operations.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_kind.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_ref.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy.py)67
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_list.py205
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_spec.py389
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_status.py234
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_server_storage_version.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_variable.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha3_basic_device.py288
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha3_cel_device_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_request.py319
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocated_device_status.py36
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocation_result.py32
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_apply_configuration.py122
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_audit_annotation.py152
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_basic_device.py116
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_request_policy.py176
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_request_policy_range.py179
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_requirements.py122
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_cel_device_selector.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter_set.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_result.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_attribute.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_capacity.py34
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_spec.py32
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_constraint.py32
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_counter_consumption.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request.py30
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request_allocation_result.py116
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_sub_request.py30
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_taint.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_toleration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_expression_warning.py152
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_json_patch.py122
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_resources.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy.py202
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding_list.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_list.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding_spec.py174
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_list.py (renamed from contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_list.py)48
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_spec.py286
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutation.py175
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_named_rule_with_operations.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_network_device_data.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_opaque_device_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_kind.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_ref.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_parent_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_consumer_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_pool.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_spec.py202
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_spec.py286
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_status.py176
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validation.py207
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_variable.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocated_device_status.py36
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocation_result.py32
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_request_policy.py176
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_request_policy_range.py179
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_requirements.py122
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_cel_device_selector.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter_set.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device.py116
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_result.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_attribute.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_capacity.py34
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_spec.py32
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_constraint.py32
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_counter_consumption.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request_allocation_result.py116
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_selector.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_sub_request.py30
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_taint.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_toleration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_exact_device_request.py30
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_network_device_data.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_opaque_device_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_consumer_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_pool.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_cross_version_object_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_behavior.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_policy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_rules.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_metric_identifier.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_metric_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_metric_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_metric_target.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_metric_value_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/version_info.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/rest.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/config/exec_provider.py5
-rw-r--r--contrib/python/kubernetes/kubernetes/dynamic/discovery.py4
-rw-r--r--contrib/python/kubernetes/kubernetes/watch/watch.py7
-rw-r--r--contrib/python/kubernetes/ya.make121
-rw-r--r--contrib/python/simplejson/py2/.dist-info/METADATA2
-rw-r--r--contrib/python/simplejson/py2/simplejson/__init__.py2
-rw-r--r--contrib/python/simplejson/py2/simplejson/tests/__init__.py2
-rw-r--r--contrib/python/simplejson/py2/simplejson/tests/test_float.py8
-rw-r--r--contrib/python/simplejson/py2/ya.make2
-rw-r--r--contrib/python/simplejson/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/simplejson/py3/simplejson/__init__.py2
-rw-r--r--contrib/python/simplejson/py3/simplejson/tests/__init__.py2
-rw-r--r--contrib/python/simplejson/py3/simplejson/tests/test_float.py8
-rw-r--r--contrib/python/simplejson/py3/ya.make2
-rw-r--r--contrib/python/textual/.dist-info/METADATA2
-rw-r--r--contrib/python/textual/textual/_arrange.py13
-rw-r--r--contrib/python/textual/textual/_compositor.py48
-rw-r--r--contrib/python/textual/textual/_segment_tools.py4
-rw-r--r--contrib/python/textual/textual/_spatial_map.py10
-rw-r--r--contrib/python/textual/textual/_text_area_theme.py8
-rw-r--r--contrib/python/textual/textual/_xterm_parser.py32
-rw-r--r--contrib/python/textual/textual/app.py375
-rw-r--r--contrib/python/textual/textual/color.py56
-rw-r--r--contrib/python/textual/textual/command.py269
-rw-r--r--contrib/python/textual/textual/constants.py5
-rw-r--r--contrib/python/textual/textual/containers.py43
-rw-r--r--contrib/python/textual/textual/content.py1001
-rw-r--r--contrib/python/textual/textual/css/_style_properties.py6
-rw-r--r--contrib/python/textual/textual/css/stylesheet.py5
-rw-r--r--contrib/python/textual/textual/demo/data.py260
-rw-r--r--contrib/python/textual/textual/demo/demo_app.py38
-rw-r--r--contrib/python/textual/textual/demo/home.py28
-rw-r--r--contrib/python/textual/textual/demo/page.py2
-rw-r--r--contrib/python/textual/textual/demo/projects.py29
-rw-r--r--contrib/python/textual/textual/demo/widgets.py462
-rw-r--r--contrib/python/textual/textual/design.py198
-rw-r--r--contrib/python/textual/textual/document/_wrapped_document.py4
-rw-r--r--contrib/python/textual/textual/dom.py25
-rw-r--r--contrib/python/textual/textual/driver.py59
-rw-r--r--contrib/python/textual/textual/drivers/linux_driver.py52
-rw-r--r--contrib/python/textual/textual/drivers/linux_inline_driver.py4
-rw-r--r--contrib/python/textual/textual/drivers/web_driver.py4
-rw-r--r--contrib/python/textual/textual/drivers/windows_driver.py2
-rw-r--r--contrib/python/textual/textual/events.py37
-rw-r--r--contrib/python/textual/textual/layout.py20
-rw-r--r--contrib/python/textual/textual/layouts/grid.py27
-rw-r--r--contrib/python/textual/textual/layouts/horizontal.py24
-rw-r--r--contrib/python/textual/textual/layouts/vertical.py16
-rw-r--r--contrib/python/textual/textual/lazy.py78
-rw-r--r--contrib/python/textual/textual/message_pump.py16
-rw-r--r--contrib/python/textual/textual/messages.py39
-rw-r--r--contrib/python/textual/textual/pilot.py1
-rw-r--r--contrib/python/textual/textual/renderables/_blend_colors.py4
-rw-r--r--contrib/python/textual/textual/renderables/digits.py6
-rw-r--r--contrib/python/textual/textual/renderables/sparkline.py6
-rw-r--r--contrib/python/textual/textual/screen.py20
-rw-r--r--contrib/python/textual/textual/strip.py124
-rw-r--r--contrib/python/textual/textual/theme.py319
-rw-r--r--contrib/python/textual/textual/timer.py6
-rw-r--r--contrib/python/textual/textual/visual.py461
-rw-r--r--contrib/python/textual/textual/widget.py302
-rw-r--r--contrib/python/textual/textual/widgets/_button.py47
-rw-r--r--contrib/python/textual/textual/widgets/_collapsible.py32
-rw-r--r--contrib/python/textual/textual/widgets/_data_table.py109
-rw-r--r--contrib/python/textual/textual/widgets/_footer.py29
-rw-r--r--contrib/python/textual/textual/widgets/_header.py6
-rw-r--r--contrib/python/textual/textual/widgets/_input.py23
-rw-r--r--contrib/python/textual/textual/widgets/_key_panel.py10
-rw-r--r--contrib/python/textual/textual/widgets/_label.py59
-rw-r--r--contrib/python/textual/textual/widgets/_list_item.py38
-rw-r--r--contrib/python/textual/textual/widgets/_list_view.py35
-rw-r--r--contrib/python/textual/textual/widgets/_loading_indicator.py2
-rw-r--r--contrib/python/textual/textual/widgets/_log.py3
-rw-r--r--contrib/python/textual/textual/widgets/_markdown.py94
-rw-r--r--contrib/python/textual/textual/widgets/_option_list.py147
-rw-r--r--contrib/python/textual/textual/widgets/_progress_bar.py8
-rw-r--r--contrib/python/textual/textual/widgets/_radio_set.py55
-rw-r--r--contrib/python/textual/textual/widgets/_rich_log.py5
-rw-r--r--contrib/python/textual/textual/widgets/_rule.py2
-rw-r--r--contrib/python/textual/textual/widgets/_select.py86
-rw-r--r--contrib/python/textual/textual/widgets/_selection_list.py77
-rw-r--r--contrib/python/textual/textual/widgets/_sparkline.py9
-rw-r--r--contrib/python/textual/textual/widgets/_static.py39
-rw-r--r--contrib/python/textual/textual/widgets/_switch.py60
-rw-r--r--contrib/python/textual/textual/widgets/_tabbed_content.py2
-rw-r--r--contrib/python/textual/textual/widgets/_tabs.py117
-rw-r--r--contrib/python/textual/textual/widgets/_text_area.py33
-rw-r--r--contrib/python/textual/textual/widgets/_toast.py16
-rw-r--r--contrib/python/textual/textual/widgets/_toggle_button.py82
-rw-r--r--contrib/python/textual/textual/widgets/_tooltip.py2
-rw-r--r--contrib/python/textual/textual/widgets/_tree.py125
-rw-r--r--contrib/python/textual/textual/widgets/_welcome.py3
-rw-r--r--contrib/python/textual/ya.make6
-rw-r--r--contrib/python/yarl/.yandex_meta/yamaker.yaml1
-rw-r--r--contrib/python/yarl/tests/ya.make15
-rw-r--r--contrib/python/yarl/ya.make3
992 files changed, 28156 insertions, 12175 deletions
diff --git a/contrib/python/MarkupSafe/py3/.dist-info/METADATA b/contrib/python/MarkupSafe/py3/.dist-info/METADATA
index 82261f2a465..0282933652f 100644
--- a/contrib/python/MarkupSafe/py3/.dist-info/METADATA
+++ b/contrib/python/MarkupSafe/py3/.dist-info/METADATA
@@ -1,46 +1,17 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: MarkupSafe
-Version: 3.0.2
+Version: 3.0.3
Summary: Safely add untrusted strings to HTML/XML markup.
Maintainer-email: Pallets <[email protected]>
-License: Copyright 2010 Pallets
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+License-Expression: BSD-3-Clause
Project-URL: Donate, https://palletsprojects.com/donate
Project-URL: Documentation, https://markupsafe.palletsprojects.com/
-Project-URL: Changes, https://markupsafe.palletsprojects.com/changes/
+Project-URL: Changes, https://markupsafe.palletsprojects.com/page/changes/
Project-URL: Source, https://github.com/pallets/markupsafe/
Project-URL: Chat, https://discord.gg/pallets
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
@@ -49,6 +20,9 @@ Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
+Dynamic: license-file
+
+<div align="center"><img src="https://raw.githubusercontent.com/pallets/markupsafe/refs/heads/stable/docs/_static/markupsafe-name.svg" alt="" height="150"></div>
# MarkupSafe
@@ -90,3 +64,11 @@ users, and allow the maintainers to devote more time to the projects,
[please donate today][].
[please donate today]: https://palletsprojects.com/donate
+
+## Contributing
+
+See our [detailed contributing documentation][contrib] for many ways to
+contribute, including reporting issues, requesting features, asking or answering
+questions, and making PRs.
+
+[contrib]: https://palletsprojects.com/contributing/
diff --git a/contrib/python/MarkupSafe/py3/README.md b/contrib/python/MarkupSafe/py3/README.md
index df8fbaf908a..6affff18a36 100644
--- a/contrib/python/MarkupSafe/py3/README.md
+++ b/contrib/python/MarkupSafe/py3/README.md
@@ -1,3 +1,5 @@
+<div align="center"><img src="https://raw.githubusercontent.com/pallets/markupsafe/refs/heads/stable/docs/_static/markupsafe-name.svg" alt="" height="150"></div>
+
# MarkupSafe
MarkupSafe implements a text object that escapes characters so it is
@@ -38,3 +40,11 @@ users, and allow the maintainers to devote more time to the projects,
[please donate today][].
[please donate today]: https://palletsprojects.com/donate
+
+## Contributing
+
+See our [detailed contributing documentation][contrib] for many ways to
+contribute, including reporting issues, requesting features, asking or answering
+questions, and making PRs.
+
+[contrib]: https://palletsprojects.com/contributing/
diff --git a/contrib/python/MarkupSafe/py3/markupsafe/__init__.py b/contrib/python/MarkupSafe/py3/markupsafe/__init__.py
index fee8dc7acca..4c395d7ba60 100644
--- a/contrib/python/MarkupSafe/py3/markupsafe/__init__.py
+++ b/contrib/python/MarkupSafe/py3/markupsafe/__init__.py
@@ -214,14 +214,14 @@ class Markup(str):
if (end := value.find("-->", start)) == -1:
break
- value = f"{value[:start]}{value[end + 3:]}"
+ value = f"{value[:start]}{value[end + 3 :]}"
# remove tags using the same method
while (start := value.find("<")) != -1:
if (end := value.find(">", start)) == -1:
break
- value = f"{value[:start]}{value[end + 1:]}"
+ value = f"{value[:start]}{value[end + 1 :]}"
# collapse spaces
value = " ".join(value.split())
@@ -388,6 +388,7 @@ def __getattr__(name: str) -> t.Any:
"The '__version__' attribute is deprecated and will be removed in"
" MarkupSafe 3.1. Use feature detection, or"
' `importlib.metadata.version("markupsafe")`, instead.',
+ DeprecationWarning,
stacklevel=2,
)
return importlib.metadata.version("markupsafe")
diff --git a/contrib/python/MarkupSafe/py3/markupsafe/_speedups.c b/contrib/python/MarkupSafe/py3/markupsafe/_speedups.c
index 09dd57caa8c..8a315f23c52 100644
--- a/contrib/python/MarkupSafe/py3/markupsafe/_speedups.c
+++ b/contrib/python/MarkupSafe/py3/markupsafe/_speedups.c
@@ -175,30 +175,26 @@ static PyMethodDef module_methods[] = {
{NULL, NULL, 0, NULL} /* Sentinel */
};
+static PyModuleDef_Slot module_slots[] = {
+#ifdef Py_mod_multiple_interpreters // Python 3.12+
+ {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
+#endif
+#ifdef Py_mod_gil // Python 3.13+
+ {Py_mod_gil, Py_MOD_GIL_NOT_USED},
+#endif
+ {0, NULL} /* Sentinel */
+};
+
static struct PyModuleDef module_definition = {
- PyModuleDef_HEAD_INIT,
- "markupsafe._speedups",
- NULL,
- -1,
- module_methods,
- NULL,
- NULL,
- NULL,
- NULL
+ .m_base = PyModuleDef_HEAD_INIT,
+ .m_name = "markupsafe._speedups",
+ .m_size = 0,
+ .m_methods = module_methods,
+ .m_slots = module_slots,
};
PyMODINIT_FUNC
PyInit__speedups(void)
{
- PyObject *m = PyModule_Create(&module_definition);
-
- if (m == NULL) {
- return NULL;
- }
-
- #ifdef Py_GIL_DISABLED
- PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
- #endif
-
- return m;
+ return PyModuleDef_Init(&module_definition);
}
diff --git a/contrib/python/MarkupSafe/py3/tests/test_ext_init.py b/contrib/python/MarkupSafe/py3/tests/test_ext_init.py
new file mode 100644
index 00000000000..3e535dc3da0
--- /dev/null
+++ b/contrib/python/MarkupSafe/py3/tests/test_ext_init.py
@@ -0,0 +1,28 @@
+import sys
+
+import pytest
+
+import markupsafe
+
+try:
+ from markupsafe import _speedups
+except ImportError:
+ _speedups = None # type: ignore[assignment]
+
+
[email protected]_unsafe(reason="Tampers with sys.modules")
[email protected](_speedups is None, reason="speedups unavailable")
+def test_ext_init() -> None:
+ """Test that the extension module uses multi-phase init by checking that
+ uncached imports result in different module objects.
+ """
+ if markupsafe._escape_inner is not _speedups._escape_inner: # type: ignore[attr-defined]
+ pytest.skip("speedups not active")
+
+ for k in [k for k in sys.modules if k.startswith("markupsafe")]:
+ del sys.modules[k]
+
+ import markupsafe._speedups as new
+
+ assert _speedups.__dict__ != new.__dict__
+ assert _speedups._escape_inner is not new._escape_inner
diff --git a/contrib/python/MarkupSafe/py3/tests/test_leak.py b/contrib/python/MarkupSafe/py3/tests/test_leak.py
index b786e0725de..c9de47513e2 100644
--- a/contrib/python/MarkupSafe/py3/tests/test_leak.py
+++ b/contrib/python/MarkupSafe/py3/tests/test_leak.py
@@ -2,9 +2,12 @@ from __future__ import annotations
import gc
+import pytest
+
from markupsafe import escape
[email protected]_unsafe(reason="Tests gc.get_objects()")
def test_markup_leaks() -> None:
counts = set()
# Try to start with a "clean" count. Works for PyPy but not 3.13 JIT.
diff --git a/contrib/python/MarkupSafe/py3/ya.make b/contrib/python/MarkupSafe/py3/ya.make
index cb76ce9b311..766c5d0eda5 100644
--- a/contrib/python/MarkupSafe/py3/ya.make
+++ b/contrib/python/MarkupSafe/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(3.0.2)
+VERSION(3.0.3)
LICENSE(BSD-3-Clause)
diff --git a/contrib/python/aiohappyeyeballs/.dist-info/METADATA b/contrib/python/aiohappyeyeballs/.dist-info/METADATA
new file mode 100644
index 00000000000..c632040d66b
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/.dist-info/METADATA
@@ -0,0 +1,123 @@
+Metadata-Version: 2.3
+Name: aiohappyeyeballs
+Version: 2.6.1
+Summary: Happy Eyeballs for asyncio
+License: PSF-2.0
+Author: J. Nick Koston
+Author-email: [email protected]
+Requires-Python: >=3.9
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: Natural Language :: English
+Classifier: Operating System :: OS Independent
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
+Classifier: License :: OSI Approved :: Python Software Foundation License
+Project-URL: Bug Tracker, https://github.com/aio-libs/aiohappyeyeballs/issues
+Project-URL: Changelog, https://github.com/aio-libs/aiohappyeyeballs/blob/main/CHANGELOG.md
+Project-URL: Documentation, https://aiohappyeyeballs.readthedocs.io
+Project-URL: Repository, https://github.com/aio-libs/aiohappyeyeballs
+Description-Content-Type: text/markdown
+
+# aiohappyeyeballs
+
+<p align="center">
+ <a href="https://github.com/aio-libs/aiohappyeyeballs/actions/workflows/ci.yml?query=branch%3Amain">
+ <img src="https://img.shields.io/github/actions/workflow/status/aio-libs/aiohappyeyeballs/ci-cd.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" >
+ </a>
+ <a href="https://aiohappyeyeballs.readthedocs.io">
+ <img src="https://img.shields.io/readthedocs/aiohappyeyeballs.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
+ </a>
+ <a href="https://codecov.io/gh/aio-libs/aiohappyeyeballs">
+ <img src="https://img.shields.io/codecov/c/github/aio-libs/aiohappyeyeballs.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
+ </a>
+</p>
+<p align="center">
+ <a href="https://python-poetry.org/">
+ <img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
+ </a>
+ <a href="https://github.com/astral-sh/ruff">
+ <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
+ </a>
+ <a href="https://github.com/pre-commit/pre-commit">
+ <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
+ </a>
+</p>
+<p align="center">
+ <a href="https://pypi.org/project/aiohappyeyeballs/">
+ <img src="https://img.shields.io/pypi/v/aiohappyeyeballs.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
+ </a>
+ <img src="https://img.shields.io/pypi/pyversions/aiohappyeyeballs.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
+ <img src="https://img.shields.io/pypi/l/aiohappyeyeballs.svg?style=flat-square" alt="License">
+</p>
+
+---
+
+**Documentation**: <a href="https://aiohappyeyeballs.readthedocs.io" target="_blank">https://aiohappyeyeballs.readthedocs.io </a>
+
+**Source Code**: <a href="https://github.com/aio-libs/aiohappyeyeballs" target="_blank">https://github.com/aio-libs/aiohappyeyeballs </a>
+
+---
+
+[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
+([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
+
+## Use case
+
+This library exists to allow connecting with
+[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
+([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
+when you
+already have a list of addrinfo and not a DNS name.
+
+The stdlib version of `loop.create_connection()`
+will only work when you pass in an unresolved name which
+is not a good fit when using DNS caching or resolving
+names via another method such as `zeroconf`.
+
+## Installation
+
+Install this via pip (or your favourite package manager):
+
+`pip install aiohappyeyeballs`
+
+## License
+
+[aiohappyeyeballs is licensed under the same terms as cpython itself.](https://github.com/python/cpython/blob/main/LICENSE)
+
+## Example usage
+
+```python
+
+addr_infos = await loop.getaddrinfo("example.org", 80)
+
+socket = await start_connection(addr_infos)
+socket = await start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2)
+
+transport, protocol = await loop.create_connection(
+ MyProtocol, sock=socket, ...)
+
+# Remove the first address for each family from addr_info
+pop_addr_infos_interleave(addr_info, 1)
+
+# Remove all matching address from addr_info
+remove_addr_infos(addr_info, "dead::beef::")
+
+# Convert a local_addr to local_addr_infos
+local_addr_infos = addr_to_addr_infos(("127.0.0.1",0))
+```
+
+## Credits
+
+This package contains code from cpython and is licensed under the same terms as cpython itself.
+
+This package was created with
+[Copier](https://copier.readthedocs.io/) and the
+[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
+project template.
+
diff --git a/contrib/python/aiohappyeyeballs/LICENSE b/contrib/python/aiohappyeyeballs/LICENSE
new file mode 100644
index 00000000000..f26bcf4d2de
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/LICENSE
@@ -0,0 +1,279 @@
+A. HISTORY OF THE SOFTWARE
+==========================
+
+Python was created in the early 1990s by Guido van Rossum at Stichting
+Mathematisch Centrum (CWI, see https://www.cwi.nl) in the Netherlands
+as a successor of a language called ABC. Guido remains Python's
+principal author, although it includes many contributions from others.
+
+In 1995, Guido continued his work on Python at the Corporation for
+National Research Initiatives (CNRI, see https://www.cnri.reston.va.us)
+in Reston, Virginia where he released several versions of the
+software.
+
+In May 2000, Guido and the Python core development team moved to
+BeOpen.com to form the BeOpen PythonLabs team. In October of the same
+year, the PythonLabs team moved to Digital Creations, which became
+Zope Corporation. In 2001, the Python Software Foundation (PSF, see
+https://www.python.org/psf/) was formed, a non-profit organization
+created specifically to own Python-related Intellectual Property.
+Zope Corporation was a sponsoring member of the PSF.
+
+All Python releases are Open Source (see https://opensource.org for
+the Open Source Definition). Historically, most, but not all, Python
+releases have also been GPL-compatible; the table below summarizes
+the various releases.
+
+ Release Derived Year Owner GPL-
+ from compatible? (1)
+
+ 0.9.0 thru 1.2 1991-1995 CWI yes
+ 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
+ 1.6 1.5.2 2000 CNRI no
+ 2.0 1.6 2000 BeOpen.com no
+ 1.6.1 1.6 2001 CNRI yes (2)
+ 2.1 2.0+1.6.1 2001 PSF no
+ 2.0.1 2.0+1.6.1 2001 PSF yes
+ 2.1.1 2.1+2.0.1 2001 PSF yes
+ 2.1.2 2.1.1 2002 PSF yes
+ 2.1.3 2.1.2 2002 PSF yes
+ 2.2 and above 2.1.1 2001-now PSF yes
+
+Footnotes:
+
+(1) GPL-compatible doesn't mean that we're distributing Python under
+ the GPL. All Python licenses, unlike the GPL, let you distribute
+ a modified version without making your changes open source. The
+ GPL-compatible licenses make it possible to combine Python with
+ other software that is released under the GPL; the others don't.
+
+(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
+ because its license has a choice of law clause. According to
+ CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
+ is "not incompatible" with the GPL.
+
+Thanks to the many outside volunteers who have worked under Guido's
+direction to make these releases possible.
+
+
+B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
+===============================================================
+
+Python software and documentation are licensed under the
+Python Software Foundation License Version 2.
+
+Starting with Python 3.8.6, examples, recipes, and other code in
+the documentation are dual licensed under the PSF License Version 2
+and the Zero-Clause BSD license.
+
+Some software incorporated into Python is under different licenses.
+The licenses are listed with code falling under that license.
+
+
+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+--------------------------------------------
+
+1. This LICENSE AGREEMENT is between the Python Software Foundation
+("PSF"), and the Individual or Organization ("Licensee") accessing and
+otherwise using this software ("Python") in source or binary form and
+its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, PSF hereby
+grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
+analyze, test, perform and/or display publicly, prepare derivative works,
+distribute, and otherwise use Python alone or in any derivative version,
+provided, however, that PSF's License Agreement and PSF's notice of copyright,
+i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Python Software Foundation;
+All Rights Reserved" are retained in Python alone or in any derivative version
+prepared by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates Python or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to Python.
+
+4. PSF is making Python available to Licensee on an "AS IS"
+basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any
+relationship of agency, partnership, or joint venture between PSF and
+Licensee. This License Agreement does not grant permission to use PSF
+trademarks or trade name in a trademark sense to endorse or promote
+products or services of Licensee, or any third party.
+
+8. By copying, installing or otherwise using Python, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
+
+
+BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
+-------------------------------------------
+
+BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
+
+1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
+office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
+Individual or Organization ("Licensee") accessing and otherwise using
+this software in source or binary form and its associated
+documentation ("the Software").
+
+2. Subject to the terms and conditions of this BeOpen Python License
+Agreement, BeOpen hereby grants Licensee a non-exclusive,
+royalty-free, world-wide license to reproduce, analyze, test, perform
+and/or display publicly, prepare derivative works, distribute, and
+otherwise use the Software alone or in any derivative version,
+provided, however, that the BeOpen Python License is retained in the
+Software, alone or in any derivative version prepared by Licensee.
+
+3. BeOpen is making the Software available to Licensee on an "AS IS"
+basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
+SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
+AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
+DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+5. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+6. This License Agreement shall be governed by and interpreted in all
+respects by the law of the State of California, excluding conflict of
+law provisions. Nothing in this License Agreement shall be deemed to
+create any relationship of agency, partnership, or joint venture
+between BeOpen and Licensee. This License Agreement does not grant
+permission to use BeOpen trademarks or trade names in a trademark
+sense to endorse or promote products or services of Licensee, or any
+third party. As an exception, the "BeOpen Python" logos available at
+http://www.pythonlabs.com/logos.html may be used according to the
+permissions granted on that web page.
+
+7. By copying, installing or otherwise using the software, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
+
+
+CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
+---------------------------------------
+
+1. This LICENSE AGREEMENT is between the Corporation for National
+Research Initiatives, having an office at 1895 Preston White Drive,
+Reston, VA 20191 ("CNRI"), and the Individual or Organization
+("Licensee") accessing and otherwise using Python 1.6.1 software in
+source or binary form and its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, CNRI
+hereby grants Licensee a nonexclusive, royalty-free, world-wide
+license to reproduce, analyze, test, perform and/or display publicly,
+prepare derivative works, distribute, and otherwise use Python 1.6.1
+alone or in any derivative version, provided, however, that CNRI's
+License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
+1995-2001 Corporation for National Research Initiatives; All Rights
+Reserved" are retained in Python 1.6.1 alone or in any derivative
+version prepared by Licensee. Alternately, in lieu of CNRI's License
+Agreement, Licensee may substitute the following text (omitting the
+quotes): "Python 1.6.1 is made available subject to the terms and
+conditions in CNRI's License Agreement. This Agreement together with
+Python 1.6.1 may be located on the internet using the following
+unique, persistent identifier (known as a handle): 1895.22/1013. This
+Agreement may also be obtained from a proxy server on the internet
+using the following URL: http://hdl.handle.net/1895.22/1013".
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates Python 1.6.1 or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to Python 1.6.1.
+
+4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
+basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. This License Agreement shall be governed by the federal
+intellectual property law of the United States, including without
+limitation the federal copyright law, and, to the extent such
+U.S. federal law does not apply, by the law of the Commonwealth of
+Virginia, excluding Virginia's conflict of law provisions.
+Notwithstanding the foregoing, with regard to derivative works based
+on Python 1.6.1 that incorporate non-separable material that was
+previously distributed under the GNU General Public License (GPL), the
+law of the Commonwealth of Virginia shall govern this License
+Agreement only as to issues arising under or with respect to
+Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
+License Agreement shall be deemed to create any relationship of
+agency, partnership, or joint venture between CNRI and Licensee. This
+License Agreement does not grant permission to use CNRI trademarks or
+trade name in a trademark sense to endorse or promote products or
+services of Licensee, or any third party.
+
+8. By clicking on the "ACCEPT" button where indicated, or by copying,
+installing or otherwise using Python 1.6.1, Licensee agrees to be
+bound by the terms and conditions of this License Agreement.
+
+ ACCEPT
+
+
+CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
+--------------------------------------------------
+
+Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
+The Netherlands. All rights reserved.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Stichting Mathematisch
+Centrum or CWI not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION
+----------------------------------------------------------------------
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/contrib/python/aiohappyeyeballs/README.md b/contrib/python/aiohappyeyeballs/README.md
new file mode 100644
index 00000000000..a1cbd995385
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/README.md
@@ -0,0 +1,96 @@
+# aiohappyeyeballs
+
+<p align="center">
+ <a href="https://github.com/aio-libs/aiohappyeyeballs/actions/workflows/ci.yml?query=branch%3Amain">
+ <img src="https://img.shields.io/github/actions/workflow/status/aio-libs/aiohappyeyeballs/ci-cd.yml?branch=main&label=CI&logo=github&style=flat-square" alt="CI Status" >
+ </a>
+ <a href="https://aiohappyeyeballs.readthedocs.io">
+ <img src="https://img.shields.io/readthedocs/aiohappyeyeballs.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
+ </a>
+ <a href="https://codecov.io/gh/aio-libs/aiohappyeyeballs">
+ <img src="https://img.shields.io/codecov/c/github/aio-libs/aiohappyeyeballs.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
+ </a>
+</p>
+<p align="center">
+ <a href="https://python-poetry.org/">
+ <img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
+ </a>
+ <a href="https://github.com/astral-sh/ruff">
+ <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
+ </a>
+ <a href="https://github.com/pre-commit/pre-commit">
+ <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
+ </a>
+</p>
+<p align="center">
+ <a href="https://pypi.org/project/aiohappyeyeballs/">
+ <img src="https://img.shields.io/pypi/v/aiohappyeyeballs.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
+ </a>
+ <img src="https://img.shields.io/pypi/pyversions/aiohappyeyeballs.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
+ <img src="https://img.shields.io/pypi/l/aiohappyeyeballs.svg?style=flat-square" alt="License">
+</p>
+
+---
+
+**Documentation**: <a href="https://aiohappyeyeballs.readthedocs.io" target="_blank">https://aiohappyeyeballs.readthedocs.io </a>
+
+**Source Code**: <a href="https://github.com/aio-libs/aiohappyeyeballs" target="_blank">https://github.com/aio-libs/aiohappyeyeballs </a>
+
+---
+
+[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
+([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
+
+## Use case
+
+This library exists to allow connecting with
+[Happy Eyeballs](https://en.wikipedia.org/wiki/Happy_Eyeballs)
+([RFC 8305](https://www.rfc-editor.org/rfc/rfc8305.html))
+when you
+already have a list of addrinfo and not a DNS name.
+
+The stdlib version of `loop.create_connection()`
+will only work when you pass in an unresolved name which
+is not a good fit when using DNS caching or resolving
+names via another method such as `zeroconf`.
+
+## Installation
+
+Install this via pip (or your favourite package manager):
+
+`pip install aiohappyeyeballs`
+
+## License
+
+[aiohappyeyeballs is licensed under the same terms as cpython itself.](https://github.com/python/cpython/blob/main/LICENSE)
+
+## Example usage
+
+```python
+
+addr_infos = await loop.getaddrinfo("example.org", 80)
+
+socket = await start_connection(addr_infos)
+socket = await start_connection(addr_infos, local_addr_infos=local_addr_infos, happy_eyeballs_delay=0.2)
+
+transport, protocol = await loop.create_connection(
+ MyProtocol, sock=socket, ...)
+
+# Remove the first address for each family from addr_info
+pop_addr_infos_interleave(addr_info, 1)
+
+# Remove all matching address from addr_info
+remove_addr_infos(addr_info, "dead::beef::")
+
+# Convert a local_addr to local_addr_infos
+local_addr_infos = addr_to_addr_infos(("127.0.0.1",0))
+```
+
+## Credits
+
+This package contains code from cpython and is licensed under the same terms as cpython itself.
+
+This package was created with
+[Copier](https://copier.readthedocs.io/) and the
+[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
+project template.
diff --git a/contrib/python/aiohappyeyeballs/aiohappyeyeballs/__init__.py b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/__init__.py
new file mode 100644
index 00000000000..71c689cc83f
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/__init__.py
@@ -0,0 +1,14 @@
+__version__ = "2.6.1"
+
+from .impl import start_connection
+from .types import AddrInfoType, SocketFactoryType
+from .utils import addr_to_addr_infos, pop_addr_infos_interleave, remove_addr_infos
+
+__all__ = (
+ "AddrInfoType",
+ "SocketFactoryType",
+ "addr_to_addr_infos",
+ "pop_addr_infos_interleave",
+ "remove_addr_infos",
+ "start_connection",
+)
diff --git a/contrib/python/aiohappyeyeballs/aiohappyeyeballs/_staggered.py b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/_staggered.py
new file mode 100644
index 00000000000..9a4ba7205ed
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/_staggered.py
@@ -0,0 +1,207 @@
+import asyncio
+import contextlib
+
+# PY3.9: Import Callable from typing until we drop Python 3.9 support
+# https://github.com/python/cpython/issues/87131
+from typing import (
+ TYPE_CHECKING,
+ Any,
+ Awaitable,
+ Callable,
+ Iterable,
+ List,
+ Optional,
+ Set,
+ Tuple,
+ TypeVar,
+ Union,
+)
+
+_T = TypeVar("_T")
+
+RE_RAISE_EXCEPTIONS = (SystemExit, KeyboardInterrupt)
+
+
+def _set_result(wait_next: "asyncio.Future[None]") -> None:
+ """Set the result of a future if it is not already done."""
+ if not wait_next.done():
+ wait_next.set_result(None)
+
+
+async def _wait_one(
+ futures: "Iterable[asyncio.Future[Any]]",
+ loop: asyncio.AbstractEventLoop,
+) -> _T:
+ """Wait for the first future to complete."""
+ wait_next = loop.create_future()
+
+ def _on_completion(fut: "asyncio.Future[Any]") -> None:
+ if not wait_next.done():
+ wait_next.set_result(fut)
+
+ for f in futures:
+ f.add_done_callback(_on_completion)
+
+ try:
+ return await wait_next
+ finally:
+ for f in futures:
+ f.remove_done_callback(_on_completion)
+
+
+async def staggered_race(
+ coro_fns: Iterable[Callable[[], Awaitable[_T]]],
+ delay: Optional[float],
+ *,
+ loop: Optional[asyncio.AbstractEventLoop] = None,
+) -> Tuple[Optional[_T], Optional[int], List[Optional[BaseException]]]:
+ """
+ Run coroutines with staggered start times and take the first to finish.
+
+ This method takes an iterable of coroutine functions. The first one is
+ started immediately. From then on, whenever the immediately preceding one
+ fails (raises an exception), or when *delay* seconds has passed, the next
+ coroutine is started. This continues until one of the coroutines complete
+ successfully, in which case all others are cancelled, or until all
+ coroutines fail.
+
+ The coroutines provided should be well-behaved in the following way:
+
+ * They should only ``return`` if completed successfully.
+
+ * They should always raise an exception if they did not complete
+ successfully. In particular, if they handle cancellation, they should
+ probably reraise, like this::
+
+ try:
+ # do work
+ except asyncio.CancelledError:
+ # undo partially completed work
+ raise
+
+ Args:
+ ----
+ coro_fns: an iterable of coroutine functions, i.e. callables that
+ return a coroutine object when called. Use ``functools.partial`` or
+ lambdas to pass arguments.
+
+ delay: amount of time, in seconds, between starting coroutines. If
+ ``None``, the coroutines will run sequentially.
+
+ loop: the event loop to use. If ``None``, the running loop is used.
+
+ Returns:
+ -------
+ tuple *(winner_result, winner_index, exceptions)* where
+
+ - *winner_result*: the result of the winning coroutine, or ``None``
+ if no coroutines won.
+
+ - *winner_index*: the index of the winning coroutine in
+ ``coro_fns``, or ``None`` if no coroutines won. If the winning
+ coroutine may return None on success, *winner_index* can be used
+ to definitively determine whether any coroutine won.
+
+ - *exceptions*: list of exceptions returned by the coroutines.
+ ``len(exceptions)`` is equal to the number of coroutines actually
+ started, and the order is the same as in ``coro_fns``. The winning
+ coroutine's entry is ``None``.
+
+ """
+ loop = loop or asyncio.get_running_loop()
+ exceptions: List[Optional[BaseException]] = []
+ tasks: Set[asyncio.Task[Optional[Tuple[_T, int]]]] = set()
+
+ async def run_one_coro(
+ coro_fn: Callable[[], Awaitable[_T]],
+ this_index: int,
+ start_next: "asyncio.Future[None]",
+ ) -> Optional[Tuple[_T, int]]:
+ """
+ Run a single coroutine.
+
+ If the coroutine fails, set the exception in the exceptions list and
+ start the next coroutine by setting the result of the start_next.
+
+ If the coroutine succeeds, return the result and the index of the
+ coroutine in the coro_fns list.
+
+ If SystemExit or KeyboardInterrupt is raised, re-raise it.
+ """
+ try:
+ result = await coro_fn()
+ except RE_RAISE_EXCEPTIONS:
+ raise
+ except BaseException as e:
+ exceptions[this_index] = e
+ _set_result(start_next) # Kickstart the next coroutine
+ return None
+
+ return result, this_index
+
+ start_next_timer: Optional[asyncio.TimerHandle] = None
+ start_next: Optional[asyncio.Future[None]]
+ task: asyncio.Task[Optional[Tuple[_T, int]]]
+ done: Union[asyncio.Future[None], asyncio.Task[Optional[Tuple[_T, int]]]]
+ coro_iter = iter(coro_fns)
+ this_index = -1
+ try:
+ while True:
+ if coro_fn := next(coro_iter, None):
+ this_index += 1
+ exceptions.append(None)
+ start_next = loop.create_future()
+ task = loop.create_task(run_one_coro(coro_fn, this_index, start_next))
+ tasks.add(task)
+ start_next_timer = (
+ loop.call_later(delay, _set_result, start_next) if delay else None
+ )
+ elif not tasks:
+ # We exhausted the coro_fns list and no tasks are running
+ # so we have no winner and all coroutines failed.
+ break
+
+ while tasks or start_next:
+ done = await _wait_one(
+ (*tasks, start_next) if start_next else tasks, loop
+ )
+ if done is start_next:
+ # The current task has failed or the timer has expired
+ # so we need to start the next task.
+ start_next = None
+ if start_next_timer:
+ start_next_timer.cancel()
+ start_next_timer = None
+
+ # Break out of the task waiting loop to start the next
+ # task.
+ break
+
+ if TYPE_CHECKING:
+ assert isinstance(done, asyncio.Task)
+
+ tasks.remove(done)
+ if winner := done.result():
+ return *winner, exceptions
+ finally:
+ # We either have:
+ # - a winner
+ # - all tasks failed
+ # - a KeyboardInterrupt or SystemExit.
+
+ #
+ # If the timer is still running, cancel it.
+ #
+ if start_next_timer:
+ start_next_timer.cancel()
+
+ #
+ # If there are any tasks left, cancel them and than
+ # wait them so they fill the exceptions list.
+ #
+ for task in tasks:
+ task.cancel()
+ with contextlib.suppress(asyncio.CancelledError):
+ await task
+
+ return None, None, exceptions
diff --git a/contrib/python/aiohappyeyeballs/aiohappyeyeballs/impl.py b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/impl.py
new file mode 100644
index 00000000000..8f3919a0c95
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/impl.py
@@ -0,0 +1,259 @@
+"""Base implementation."""
+
+import asyncio
+import collections
+import contextlib
+import functools
+import itertools
+import socket
+from typing import List, Optional, Sequence, Set, Union
+
+from . import _staggered
+from .types import AddrInfoType, SocketFactoryType
+
+
+async def start_connection(
+ addr_infos: Sequence[AddrInfoType],
+ *,
+ local_addr_infos: Optional[Sequence[AddrInfoType]] = None,
+ happy_eyeballs_delay: Optional[float] = None,
+ interleave: Optional[int] = None,
+ loop: Optional[asyncio.AbstractEventLoop] = None,
+ socket_factory: Optional[SocketFactoryType] = None,
+) -> socket.socket:
+ """
+ Connect to a TCP server.
+
+ Create a socket connection to a specified destination. The
+ destination is specified as a list of AddrInfoType tuples as
+ returned from getaddrinfo().
+
+ The arguments are, in order:
+
+ * ``family``: the address family, e.g. ``socket.AF_INET`` or
+ ``socket.AF_INET6``.
+ * ``type``: the socket type, e.g. ``socket.SOCK_STREAM`` or
+ ``socket.SOCK_DGRAM``.
+ * ``proto``: the protocol, e.g. ``socket.IPPROTO_TCP`` or
+ ``socket.IPPROTO_UDP``.
+ * ``canonname``: the canonical name of the address, e.g.
+ ``"www.python.org"``.
+ * ``sockaddr``: the socket address
+
+ This method is a coroutine which will try to establish the connection
+ in the background. When successful, the coroutine returns a
+ socket.
+
+ The expected use case is to use this method in conjunction with
+ loop.create_connection() to establish a connection to a server::
+
+ socket = await start_connection(addr_infos)
+ transport, protocol = await loop.create_connection(
+ MyProtocol, sock=socket, ...)
+ """
+ if not (current_loop := loop):
+ current_loop = asyncio.get_running_loop()
+
+ single_addr_info = len(addr_infos) == 1
+
+ if happy_eyeballs_delay is not None and interleave is None:
+ # If using happy eyeballs, default to interleave addresses by family
+ interleave = 1
+
+ if interleave and not single_addr_info:
+ addr_infos = _interleave_addrinfos(addr_infos, interleave)
+
+ sock: Optional[socket.socket] = None
+ # uvloop can raise RuntimeError instead of OSError
+ exceptions: List[List[Union[OSError, RuntimeError]]] = []
+ if happy_eyeballs_delay is None or single_addr_info:
+ # not using happy eyeballs
+ for addrinfo in addr_infos:
+ try:
+ sock = await _connect_sock(
+ current_loop,
+ exceptions,
+ addrinfo,
+ local_addr_infos,
+ None,
+ socket_factory,
+ )
+ break
+ except (RuntimeError, OSError):
+ continue
+ else: # using happy eyeballs
+ open_sockets: Set[socket.socket] = set()
+ try:
+ sock, _, _ = await _staggered.staggered_race(
+ (
+ functools.partial(
+ _connect_sock,
+ current_loop,
+ exceptions,
+ addrinfo,
+ local_addr_infos,
+ open_sockets,
+ socket_factory,
+ )
+ for addrinfo in addr_infos
+ ),
+ happy_eyeballs_delay,
+ )
+ finally:
+ # If we have a winner, staggered_race will
+ # cancel the other tasks, however there is a
+ # small race window where any of the other tasks
+ # can be done before they are cancelled which
+ # will leave the socket open. To avoid this problem
+ # we pass a set to _connect_sock to keep track of
+ # the open sockets and close them here if there
+ # are any "runner up" sockets.
+ for s in open_sockets:
+ if s is not sock:
+ with contextlib.suppress(OSError):
+ s.close()
+ open_sockets = None # type: ignore[assignment]
+
+ if sock is None:
+ all_exceptions = [exc for sub in exceptions for exc in sub]
+ try:
+ first_exception = all_exceptions[0]
+ if len(all_exceptions) == 1:
+ raise first_exception
+ else:
+ # If they all have the same str(), raise one.
+ model = str(first_exception)
+ if all(str(exc) == model for exc in all_exceptions):
+ raise first_exception
+ # Raise a combined exception so the user can see all
+ # the various error messages.
+ msg = "Multiple exceptions: {}".format(
+ ", ".join(str(exc) for exc in all_exceptions)
+ )
+ # If the errno is the same for all exceptions, raise
+ # an OSError with that errno.
+ if isinstance(first_exception, OSError):
+ first_errno = first_exception.errno
+ if all(
+ isinstance(exc, OSError) and exc.errno == first_errno
+ for exc in all_exceptions
+ ):
+ raise OSError(first_errno, msg)
+ elif isinstance(first_exception, RuntimeError) and all(
+ isinstance(exc, RuntimeError) for exc in all_exceptions
+ ):
+ raise RuntimeError(msg)
+ # We have a mix of OSError and RuntimeError
+ # so we have to pick which one to raise.
+ # and we raise OSError for compatibility
+ raise OSError(msg)
+ finally:
+ all_exceptions = None # type: ignore[assignment]
+ exceptions = None # type: ignore[assignment]
+
+ return sock
+
+
+async def _connect_sock(
+ loop: asyncio.AbstractEventLoop,
+ exceptions: List[List[Union[OSError, RuntimeError]]],
+ addr_info: AddrInfoType,
+ local_addr_infos: Optional[Sequence[AddrInfoType]] = None,
+ open_sockets: Optional[Set[socket.socket]] = None,
+ socket_factory: Optional[SocketFactoryType] = None,
+) -> socket.socket:
+ """
+ Create, bind and connect one socket.
+
+ If open_sockets is passed, add the socket to the set of open sockets.
+ Any failure caught here will remove the socket from the set and close it.
+
+ Callers can use this set to close any sockets that are not the winner
+ of all staggered tasks in the result there are runner up sockets aka
+ multiple winners.
+ """
+ my_exceptions: List[Union[OSError, RuntimeError]] = []
+ exceptions.append(my_exceptions)
+ family, type_, proto, _, address = addr_info
+ sock = None
+ try:
+ if socket_factory is not None:
+ sock = socket_factory(addr_info)
+ else:
+ sock = socket.socket(family=family, type=type_, proto=proto)
+ if open_sockets is not None:
+ open_sockets.add(sock)
+ sock.setblocking(False)
+ if local_addr_infos is not None:
+ for lfamily, _, _, _, laddr in local_addr_infos:
+ # skip local addresses of different family
+ if lfamily != family:
+ continue
+ try:
+ sock.bind(laddr)
+ break
+ except OSError as exc:
+ msg = (
+ f"error while attempting to bind on "
+ f"address {laddr!r}: "
+ f"{(exc.strerror or '').lower()}"
+ )
+ exc = OSError(exc.errno, msg)
+ my_exceptions.append(exc)
+ else: # all bind attempts failed
+ if my_exceptions:
+ raise my_exceptions.pop()
+ else:
+ raise OSError(f"no matching local address with {family=} found")
+ await loop.sock_connect(sock, address)
+ return sock
+ except (RuntimeError, OSError) as exc:
+ my_exceptions.append(exc)
+ if sock is not None:
+ if open_sockets is not None:
+ open_sockets.remove(sock)
+ try:
+ sock.close()
+ except OSError as e:
+ my_exceptions.append(e)
+ raise
+ raise
+ except:
+ if sock is not None:
+ if open_sockets is not None:
+ open_sockets.remove(sock)
+ try:
+ sock.close()
+ except OSError as e:
+ my_exceptions.append(e)
+ raise
+ raise
+ finally:
+ exceptions = my_exceptions = None # type: ignore[assignment]
+
+
+def _interleave_addrinfos(
+ addrinfos: Sequence[AddrInfoType], first_address_family_count: int = 1
+) -> List[AddrInfoType]:
+ """Interleave list of addrinfo tuples by family."""
+ # Group addresses by family
+ addrinfos_by_family: collections.OrderedDict[int, List[AddrInfoType]] = (
+ collections.OrderedDict()
+ )
+ for addr in addrinfos:
+ family = addr[0]
+ if family not in addrinfos_by_family:
+ addrinfos_by_family[family] = []
+ addrinfos_by_family[family].append(addr)
+ addrinfos_lists = list(addrinfos_by_family.values())
+
+ reordered: List[AddrInfoType] = []
+ if first_address_family_count > 1:
+ reordered.extend(addrinfos_lists[0][: first_address_family_count - 1])
+ del addrinfos_lists[0][: first_address_family_count - 1]
+ reordered.extend(
+ a
+ for a in itertools.chain.from_iterable(itertools.zip_longest(*addrinfos_lists))
+ if a is not None
+ )
+ return reordered
diff --git a/contrib/python/aiohappyeyeballs/aiohappyeyeballs/py.typed b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/py.typed
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/py.typed
diff --git a/contrib/python/aiohappyeyeballs/aiohappyeyeballs/types.py b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/types.py
new file mode 100644
index 00000000000..e8c75074e7a
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/types.py
@@ -0,0 +1,17 @@
+"""Types for aiohappyeyeballs."""
+
+import socket
+
+# PY3.9: Import Callable from typing until we drop Python 3.9 support
+# https://github.com/python/cpython/issues/87131
+from typing import Callable, Tuple, Union
+
+AddrInfoType = Tuple[
+ Union[int, socket.AddressFamily],
+ Union[int, socket.SocketKind],
+ int,
+ str,
+ Tuple, # type: ignore[type-arg]
+]
+
+SocketFactoryType = Callable[[AddrInfoType], socket.socket]
diff --git a/contrib/python/aiohappyeyeballs/aiohappyeyeballs/utils.py b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/utils.py
new file mode 100644
index 00000000000..ea29adb9be9
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/aiohappyeyeballs/utils.py
@@ -0,0 +1,97 @@
+"""Utility functions for aiohappyeyeballs."""
+
+import ipaddress
+import socket
+from typing import Dict, List, Optional, Tuple, Union
+
+from .types import AddrInfoType
+
+
+def addr_to_addr_infos(
+ addr: Optional[
+ Union[Tuple[str, int, int, int], Tuple[str, int, int], Tuple[str, int]]
+ ],
+) -> Optional[List[AddrInfoType]]:
+ """Convert an address tuple to a list of addr_info tuples."""
+ if addr is None:
+ return None
+ host = addr[0]
+ port = addr[1]
+ is_ipv6 = ":" in host
+ if is_ipv6:
+ flowinfo = 0
+ scopeid = 0
+ addr_len = len(addr)
+ if addr_len >= 4:
+ scopeid = addr[3] # type: ignore[misc]
+ if addr_len >= 3:
+ flowinfo = addr[2] # type: ignore[misc]
+ addr = (host, port, flowinfo, scopeid)
+ family = socket.AF_INET6
+ else:
+ addr = (host, port)
+ family = socket.AF_INET
+ return [(family, socket.SOCK_STREAM, socket.IPPROTO_TCP, "", addr)]
+
+
+def pop_addr_infos_interleave(
+ addr_infos: List[AddrInfoType], interleave: Optional[int] = None
+) -> None:
+ """
+ Pop addr_info from the list of addr_infos by family up to interleave times.
+
+ The interleave parameter is used to know how many addr_infos for
+ each family should be popped of the top of the list.
+ """
+ seen: Dict[int, int] = {}
+ if interleave is None:
+ interleave = 1
+ to_remove: List[AddrInfoType] = []
+ for addr_info in addr_infos:
+ family = addr_info[0]
+ if family not in seen:
+ seen[family] = 0
+ if seen[family] < interleave:
+ to_remove.append(addr_info)
+ seen[family] += 1
+ for addr_info in to_remove:
+ addr_infos.remove(addr_info)
+
+
+def _addr_tuple_to_ip_address(
+ addr: Union[Tuple[str, int], Tuple[str, int, int, int]],
+) -> Union[
+ Tuple[ipaddress.IPv4Address, int], Tuple[ipaddress.IPv6Address, int, int, int]
+]:
+ """Convert an address tuple to an IPv4Address."""
+ return (ipaddress.ip_address(addr[0]), *addr[1:])
+
+
+def remove_addr_infos(
+ addr_infos: List[AddrInfoType],
+ addr: Union[Tuple[str, int], Tuple[str, int, int, int]],
+) -> None:
+ """
+ Remove an address from the list of addr_infos.
+
+ The addr value is typically the return value of
+ sock.getpeername().
+ """
+ bad_addrs_infos: List[AddrInfoType] = []
+ for addr_info in addr_infos:
+ if addr_info[-1] == addr:
+ bad_addrs_infos.append(addr_info)
+ if bad_addrs_infos:
+ for bad_addr_info in bad_addrs_infos:
+ addr_infos.remove(bad_addr_info)
+ return
+ # Slow path in case addr is formatted differently
+ match_addr = _addr_tuple_to_ip_address(addr)
+ for addr_info in addr_infos:
+ if match_addr == _addr_tuple_to_ip_address(addr_info[-1]):
+ bad_addrs_infos.append(addr_info)
+ if bad_addrs_infos:
+ for bad_addr_info in bad_addrs_infos:
+ addr_infos.remove(bad_addr_info)
+ return
+ raise ValueError(f"Address {addr} not found in addr_infos")
diff --git a/contrib/python/aiohappyeyeballs/ya.make b/contrib/python/aiohappyeyeballs/ya.make
new file mode 100644
index 00000000000..55dc6c9940e
--- /dev/null
+++ b/contrib/python/aiohappyeyeballs/ya.make
@@ -0,0 +1,26 @@
+# Generated by devtools/yamaker (pypi).
+
+PY3_LIBRARY()
+
+VERSION(2.6.1)
+
+LICENSE(Python-2.0)
+
+NO_LINT()
+
+PY_SRCS(
+ TOP_LEVEL
+ aiohappyeyeballs/__init__.py
+ aiohappyeyeballs/_staggered.py
+ aiohappyeyeballs/impl.py
+ aiohappyeyeballs/types.py
+ aiohappyeyeballs/utils.py
+)
+
+RESOURCE_FILES(
+ PREFIX contrib/python/aiohappyeyeballs/
+ .dist-info/METADATA
+ aiohappyeyeballs/py.typed
+)
+
+END()
diff --git a/contrib/python/aiohttp/.dist-info/METADATA b/contrib/python/aiohttp/.dist-info/METADATA
index cd312649136..7ad8cef0fd3 100644
--- a/contrib/python/aiohttp/.dist-info/METADATA
+++ b/contrib/python/aiohttp/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: aiohttp
-Version: 3.9.5
+Version: 3.10.6
Summary: Async http client/server framework (asyncio)
Home-page: https://github.com/aio-libs/aiohttp
Maintainer: aiohttp team <[email protected]>
@@ -28,20 +28,22 @@ Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
+Requires-Dist: aiohappyeyeballs >=2.3.0
Requires-Dist: aiosignal >=1.1.2
Requires-Dist: attrs >=17.3.0
Requires-Dist: frozenlist >=1.1.1
Requires-Dist: multidict <7.0,>=4.5
-Requires-Dist: yarl <2.0,>=1.0
+Requires-Dist: yarl <2.0,>=1.12.0
Requires-Dist: async-timeout <5.0,>=4.0 ; python_version < "3.11"
Provides-Extra: speedups
Requires-Dist: brotlicffi ; (platform_python_implementation != "CPython") and extra == 'speedups'
Requires-Dist: Brotli ; (platform_python_implementation == "CPython") and extra == 'speedups'
-Requires-Dist: aiodns ; (sys_platform == "linux" or sys_platform == "darwin") and extra == 'speedups'
+Requires-Dist: aiodns >=3.2.0 ; (sys_platform == "linux" or sys_platform == "darwin") and extra == 'speedups'
==================================
Async http client/server framework
@@ -193,7 +195,7 @@ Communication channels
*aio-libs Discussions*: https://github.com/aio-libs/aiohttp/discussions
-*gitter chat* https://gitter.im/aio-libs/Lobby
+*Matrix*: `#aio-libs:matrix.org <https://matrix.to/#/#aio-libs:matrix.org>`_
We support `Stack Overflow
<https://stackoverflow.com/questions/tagged/aiohttp>`_.
@@ -202,7 +204,6 @@ Please add *aiohttp* tag to your question there.
Requirements
============
-- async-timeout_
- attrs_
- multidict_
- yarl_
diff --git a/contrib/python/aiohttp/README.rst b/contrib/python/aiohttp/README.rst
index 90b7f713577..470ced9b29c 100644
--- a/contrib/python/aiohttp/README.rst
+++ b/contrib/python/aiohttp/README.rst
@@ -148,7 +148,7 @@ Communication channels
*aio-libs Discussions*: https://github.com/aio-libs/aiohttp/discussions
-*gitter chat* https://gitter.im/aio-libs/Lobby
+*Matrix*: `#aio-libs:matrix.org <https://matrix.to/#/#aio-libs:matrix.org>`_
We support `Stack Overflow
<https://stackoverflow.com/questions/tagged/aiohttp>`_.
@@ -157,7 +157,6 @@ Please add *aiohttp* tag to your question there.
Requirements
============
-- async-timeout_
- attrs_
- multidict_
- yarl_
diff --git a/contrib/python/aiohttp/aiohttp/__init__.py b/contrib/python/aiohttp/aiohttp/__init__.py
index e82e790b46a..8830d340940 100644
--- a/contrib/python/aiohttp/aiohttp/__init__.py
+++ b/contrib/python/aiohttp/aiohttp/__init__.py
@@ -1,40 +1,48 @@
-__version__ = "3.9.5"
+__version__ = "3.10.6"
from typing import TYPE_CHECKING, Tuple
from . import hdrs as hdrs
from .client import (
- BaseConnector as BaseConnector,
- ClientConnectionError as ClientConnectionError,
- ClientConnectorCertificateError as ClientConnectorCertificateError,
- ClientConnectorError as ClientConnectorError,
- ClientConnectorSSLError as ClientConnectorSSLError,
- ClientError as ClientError,
- ClientHttpProxyError as ClientHttpProxyError,
- ClientOSError as ClientOSError,
- ClientPayloadError as ClientPayloadError,
- ClientProxyConnectionError as ClientProxyConnectionError,
- ClientRequest as ClientRequest,
- ClientResponse as ClientResponse,
- ClientResponseError as ClientResponseError,
- ClientSession as ClientSession,
- ClientSSLError as ClientSSLError,
- ClientTimeout as ClientTimeout,
- ClientWebSocketResponse as ClientWebSocketResponse,
- ContentTypeError as ContentTypeError,
- Fingerprint as Fingerprint,
- InvalidURL as InvalidURL,
- NamedPipeConnector as NamedPipeConnector,
- RequestInfo as RequestInfo,
- ServerConnectionError as ServerConnectionError,
- ServerDisconnectedError as ServerDisconnectedError,
- ServerFingerprintMismatch as ServerFingerprintMismatch,
- ServerTimeoutError as ServerTimeoutError,
- TCPConnector as TCPConnector,
- TooManyRedirects as TooManyRedirects,
- UnixConnector as UnixConnector,
- WSServerHandshakeError as WSServerHandshakeError,
- request as request,
+ BaseConnector,
+ ClientConnectionError,
+ ClientConnectionResetError,
+ ClientConnectorCertificateError,
+ ClientConnectorError,
+ ClientConnectorSSLError,
+ ClientError,
+ ClientHttpProxyError,
+ ClientOSError,
+ ClientPayloadError,
+ ClientProxyConnectionError,
+ ClientRequest,
+ ClientResponse,
+ ClientResponseError,
+ ClientSession,
+ ClientSSLError,
+ ClientTimeout,
+ ClientWebSocketResponse,
+ ConnectionTimeoutError,
+ ContentTypeError,
+ Fingerprint,
+ InvalidURL,
+ InvalidUrlClientError,
+ InvalidUrlRedirectClientError,
+ NamedPipeConnector,
+ NonHttpUrlClientError,
+ NonHttpUrlRedirectClientError,
+ RedirectClientError,
+ RequestInfo,
+ ServerConnectionError,
+ ServerDisconnectedError,
+ ServerFingerprintMismatch,
+ ServerTimeoutError,
+ SocketTimeoutError,
+ TCPConnector,
+ TooManyRedirects,
+ UnixConnector,
+ WSServerHandshakeError,
+ request,
)
from .cookiejar import CookieJar as CookieJar, DummyCookieJar as DummyCookieJar
from .formdata import FormData as FormData
@@ -99,6 +107,7 @@ from .tracing import (
TraceRequestChunkSentParams as TraceRequestChunkSentParams,
TraceRequestEndParams as TraceRequestEndParams,
TraceRequestExceptionParams as TraceRequestExceptionParams,
+ TraceRequestHeadersSentParams as TraceRequestHeadersSentParams,
TraceRequestRedirectParams as TraceRequestRedirectParams,
TraceRequestStartParams as TraceRequestStartParams,
TraceResponseChunkReceivedParams as TraceResponseChunkReceivedParams,
@@ -116,6 +125,7 @@ __all__: Tuple[str, ...] = (
# client
"BaseConnector",
"ClientConnectionError",
+ "ClientConnectionResetError",
"ClientConnectorCertificateError",
"ClientConnectorError",
"ClientConnectorSSLError",
@@ -131,14 +141,21 @@ __all__: Tuple[str, ...] = (
"ClientSession",
"ClientTimeout",
"ClientWebSocketResponse",
+ "ConnectionTimeoutError",
"ContentTypeError",
"Fingerprint",
"InvalidURL",
+ "InvalidUrlClientError",
+ "InvalidUrlRedirectClientError",
+ "NonHttpUrlClientError",
+ "NonHttpUrlRedirectClientError",
+ "RedirectClientError",
"RequestInfo",
"ServerConnectionError",
"ServerDisconnectedError",
"ServerFingerprintMismatch",
"ServerTimeoutError",
+ "SocketTimeoutError",
"TCPConnector",
"TooManyRedirects",
"UnixConnector",
@@ -210,6 +227,7 @@ __all__: Tuple[str, ...] = (
"TraceRequestChunkSentParams",
"TraceRequestEndParams",
"TraceRequestExceptionParams",
+ "TraceRequestHeadersSentParams",
"TraceRequestRedirectParams",
"TraceRequestStartParams",
"TraceResponseChunkReceivedParams",
diff --git a/contrib/python/aiohttp/aiohttp/_helpers.pyx b/contrib/python/aiohttp/aiohttp/_helpers.pyx
index 665f367c5de..5f089225dc8 100644
--- a/contrib/python/aiohttp/aiohttp/_helpers.pyx
+++ b/contrib/python/aiohttp/aiohttp/_helpers.pyx
@@ -1,3 +1,6 @@
+
+cdef _sentinel = object()
+
cdef class reify:
"""Use as a class method decorator. It operates almost exactly like
the Python `@property` decorator, but it puts the result of the
@@ -19,17 +22,14 @@ cdef class reify:
return self.wrapped.__doc__
def __get__(self, inst, owner):
- try:
- try:
- return inst._cache[self.name]
- except KeyError:
- val = self.wrapped(inst)
- inst._cache[self.name] = val
- return val
- except AttributeError:
- if inst is None:
- return self
- raise
+ if inst is None:
+ return self
+ cdef dict cache = inst._cache
+ val = cache.get(self.name, _sentinel)
+ if val is _sentinel:
+ val = self.wrapped(inst)
+ cache[self.name] = val
+ return val
def __set__(self, inst, value):
raise AttributeError("reified property is read-only")
diff --git a/contrib/python/aiohttp/aiohttp/_http_parser.pyx b/contrib/python/aiohttp/aiohttp/_http_parser.pyx
index ec6edb2dfec..8e82c0fd77f 100644
--- a/contrib/python/aiohttp/aiohttp/_http_parser.pyx
+++ b/contrib/python/aiohttp/aiohttp/_http_parser.pyx
@@ -47,6 +47,7 @@ include "_headers.pxi"
from aiohttp cimport _find_header
+ALLOWED_UPGRADES = frozenset({"websocket"})
DEF DEFAULT_FREELIST_SIZE = 250
cdef extern from "Python.h":
@@ -417,7 +418,6 @@ cdef class HttpParser:
cdef _on_headers_complete(self):
self._process_header()
- method = http_method_str(self._cparser.method)
should_close = not cparser.llhttp_should_keep_alive(self._cparser)
upgrade = self._cparser.upgrade
chunked = self._cparser.flags & cparser.F_CHUNKED
@@ -425,8 +425,13 @@ cdef class HttpParser:
raw_headers = tuple(self._raw_headers)
headers = CIMultiDictProxy(self._headers)
- if upgrade or self._cparser.method == cparser.HTTP_CONNECT:
- self._upgraded = True
+ if self._cparser.type == cparser.HTTP_REQUEST:
+ allowed = upgrade and headers.get("upgrade", "").lower() in ALLOWED_UPGRADES
+ if allowed or self._cparser.method == cparser.HTTP_CONNECT:
+ self._upgraded = True
+ else:
+ if upgrade and self._cparser.status_code == 101:
+ self._upgraded = True
# do not support old websocket spec
if SEC_WEBSOCKET_KEY1 in headers:
@@ -441,6 +446,7 @@ cdef class HttpParser:
encoding = enc
if self._cparser.type == cparser.HTTP_REQUEST:
+ method = http_method_str(self._cparser.method)
msg = _new_request_message(
method, self._path,
self.http_version(), headers, raw_headers,
@@ -565,7 +571,7 @@ cdef class HttpParser:
if self._upgraded:
return messages, True, data[nb:]
else:
- return messages, False, b''
+ return messages, False, b""
def set_upgraded(self, val):
self._upgraded = val
@@ -748,10 +754,7 @@ cdef int cb_on_headers_complete(cparser.llhttp_t* parser) except -1:
pyparser._last_error = exc
return -1
else:
- if (
- pyparser._cparser.upgrade or
- pyparser._cparser.method == cparser.HTTP_CONNECT
- ):
+ if pyparser._upgraded or pyparser._cparser.method == cparser.HTTP_CONNECT:
return 2
else:
return 0
diff --git a/contrib/python/aiohttp/aiohttp/abc.py b/contrib/python/aiohttp/aiohttp/abc.py
index ee838998997..b309bcffe01 100644
--- a/contrib/python/aiohttp/aiohttp/abc.py
+++ b/contrib/python/aiohttp/aiohttp/abc.py
@@ -1,5 +1,6 @@
import asyncio
import logging
+import socket
from abc import ABC, abstractmethod
from collections.abc import Sized
from http.cookies import BaseCookie, Morsel
@@ -14,12 +15,12 @@ from typing import (
List,
Optional,
Tuple,
+ TypedDict,
)
from multidict import CIMultiDict
from yarl import URL
-from .helpers import get_running_loop
from .typedefs import LooseCookies
if TYPE_CHECKING:
@@ -119,11 +120,35 @@ class AbstractView(ABC):
"""Execute the view handler."""
+class ResolveResult(TypedDict):
+ """Resolve result.
+
+ This is the result returned from an AbstractResolver's
+ resolve method.
+
+ :param hostname: The hostname that was provided.
+ :param host: The IP address that was resolved.
+ :param port: The port that was resolved.
+ :param family: The address family that was resolved.
+ :param proto: The protocol that was resolved.
+ :param flags: The flags that were resolved.
+ """
+
+ hostname: str
+ host: str
+ port: int
+ family: int
+ proto: int
+ flags: int
+
+
class AbstractResolver(ABC):
"""Abstract DNS resolver."""
@abstractmethod
- async def resolve(self, host: str, port: int, family: int) -> List[Dict[str, Any]]:
+ async def resolve(
+ self, host: str, port: int = 0, family: socket.AddressFamily = socket.AF_INET
+ ) -> List[ResolveResult]:
"""Return IP address for given hostname"""
@abstractmethod
@@ -144,7 +169,7 @@ class AbstractCookieJar(Sized, IterableBase):
"""Abstract Cookie Jar."""
def __init__(self, *, loop: Optional[asyncio.AbstractEventLoop] = None) -> None:
- self._loop = get_running_loop(loop)
+ self._loop = loop or asyncio.get_event_loop()
@abstractmethod
def clear(self, predicate: Optional[ClearCookiePredicate] = None) -> None:
diff --git a/contrib/python/aiohttp/aiohttp/base_protocol.py b/contrib/python/aiohttp/aiohttp/base_protocol.py
index dc1f24f99cd..2fc2fa65885 100644
--- a/contrib/python/aiohttp/aiohttp/base_protocol.py
+++ b/contrib/python/aiohttp/aiohttp/base_protocol.py
@@ -1,6 +1,7 @@
import asyncio
from typing import Optional, cast
+from .client_exceptions import ClientConnectionResetError
from .helpers import set_exception
from .tcp_helpers import tcp_nodelay
@@ -85,7 +86,7 @@ class BaseProtocol(asyncio.Protocol):
async def _drain_helper(self) -> None:
if not self.connected:
- raise ConnectionResetError("Connection lost")
+ raise ClientConnectionResetError("Connection lost")
if not self._paused:
return
waiter = self._drain_waiter
diff --git a/contrib/python/aiohttp/aiohttp/client.py b/contrib/python/aiohttp/aiohttp/client.py
index 32d2c3b7119..186105bee9f 100644
--- a/contrib/python/aiohttp/aiohttp/client.py
+++ b/contrib/python/aiohttp/aiohttp/client.py
@@ -9,7 +9,7 @@ import sys
import traceback
import warnings
from contextlib import suppress
-from types import SimpleNamespace, TracebackType
+from types import TracebackType
from typing import (
TYPE_CHECKING,
Any,
@@ -27,6 +27,7 @@ from typing import (
Set,
Tuple,
Type,
+ TypedDict,
TypeVar,
Union,
)
@@ -38,25 +39,33 @@ from yarl import URL
from . import hdrs, http, payload
from .abc import AbstractCookieJar
from .client_exceptions import (
- ClientConnectionError as ClientConnectionError,
- ClientConnectorCertificateError as ClientConnectorCertificateError,
- ClientConnectorError as ClientConnectorError,
- ClientConnectorSSLError as ClientConnectorSSLError,
- ClientError as ClientError,
- ClientHttpProxyError as ClientHttpProxyError,
- ClientOSError as ClientOSError,
- ClientPayloadError as ClientPayloadError,
- ClientProxyConnectionError as ClientProxyConnectionError,
- ClientResponseError as ClientResponseError,
- ClientSSLError as ClientSSLError,
- ContentTypeError as ContentTypeError,
- InvalidURL as InvalidURL,
- ServerConnectionError as ServerConnectionError,
- ServerDisconnectedError as ServerDisconnectedError,
- ServerFingerprintMismatch as ServerFingerprintMismatch,
- ServerTimeoutError as ServerTimeoutError,
- TooManyRedirects as TooManyRedirects,
- WSServerHandshakeError as WSServerHandshakeError,
+ ClientConnectionError,
+ ClientConnectionResetError,
+ ClientConnectorCertificateError,
+ ClientConnectorError,
+ ClientConnectorSSLError,
+ ClientError,
+ ClientHttpProxyError,
+ ClientOSError,
+ ClientPayloadError,
+ ClientProxyConnectionError,
+ ClientResponseError,
+ ClientSSLError,
+ ConnectionTimeoutError,
+ ContentTypeError,
+ InvalidURL,
+ InvalidUrlClientError,
+ InvalidUrlRedirectClientError,
+ NonHttpUrlClientError,
+ NonHttpUrlRedirectClientError,
+ RedirectClientError,
+ ServerConnectionError,
+ ServerDisconnectedError,
+ ServerFingerprintMismatch,
+ ServerTimeoutError,
+ SocketTimeoutError,
+ TooManyRedirects,
+ WSServerHandshakeError,
)
from .client_reqrep import (
ClientRequest as ClientRequest,
@@ -67,6 +76,7 @@ from .client_reqrep import (
)
from .client_ws import ClientWebSocketResponse as ClientWebSocketResponse
from .connector import (
+ HTTP_AND_EMPTY_SCHEMA_SET,
BaseConnector as BaseConnector,
NamedPipeConnector as NamedPipeConnector,
TCPConnector as TCPConnector,
@@ -80,7 +90,6 @@ from .helpers import (
TimeoutHandle,
ceil_timeout,
get_env_proxy_for_url,
- get_running_loop,
method_must_be_empty_body,
sentinel,
strip_auth_from_url,
@@ -89,11 +98,12 @@ from .http import WS_KEY, HttpVersion, WebSocketReader, WebSocketWriter
from .http_websocket import WSHandshakeError, WSMessage, ws_ext_gen, ws_ext_parse
from .streams import FlowControlDataQueue
from .tracing import Trace, TraceConfig
-from .typedefs import JSONEncoder, LooseCookies, LooseHeaders, StrOrURL
+from .typedefs import JSONEncoder, LooseCookies, LooseHeaders, Query, StrOrURL
__all__ = (
# client_exceptions
"ClientConnectionError",
+ "ClientConnectionResetError",
"ClientConnectorCertificateError",
"ClientConnectorError",
"ClientConnectorSSLError",
@@ -104,12 +114,19 @@ __all__ = (
"ClientProxyConnectionError",
"ClientResponseError",
"ClientSSLError",
+ "ConnectionTimeoutError",
"ContentTypeError",
"InvalidURL",
+ "InvalidUrlClientError",
+ "RedirectClientError",
+ "NonHttpUrlClientError",
+ "InvalidUrlRedirectClientError",
+ "NonHttpUrlRedirectClientError",
"ServerConnectionError",
"ServerDisconnectedError",
"ServerFingerprintMismatch",
"ServerTimeoutError",
+ "SocketTimeoutError",
"TooManyRedirects",
"WSServerHandshakeError",
# client_reqrep
@@ -136,6 +153,37 @@ if TYPE_CHECKING:
else:
SSLContext = None
+if sys.version_info >= (3, 11) and TYPE_CHECKING:
+ from typing import Unpack
+
+
+class _RequestOptions(TypedDict, total=False):
+ params: Query
+ data: Any
+ json: Any
+ cookies: Union[LooseCookies, None]
+ headers: Union[LooseHeaders, None]
+ skip_auto_headers: Union[Iterable[str], None]
+ auth: Union[BasicAuth, None]
+ allow_redirects: bool
+ max_redirects: int
+ compress: Union[str, bool, None]
+ chunked: Union[bool, None]
+ expect100: bool
+ raise_for_status: Union[None, bool, Callable[[ClientResponse], Awaitable[None]]]
+ read_until_eof: bool
+ proxy: Union[StrOrURL, None]
+ proxy_auth: Union[BasicAuth, None]
+ timeout: "Union[ClientTimeout, _SENTINEL, int, float, None]"
+ ssl: Union[SSLContext, bool, Fingerprint]
+ server_hostname: Union[str, None]
+ proxy_headers: Union[LooseHeaders, None]
+ trace_request_ctx: Any #Union[Mapping[str, str], None]
+ read_bufsize: Union[int, None]
+ auto_decompress: Union[bool, None]
+ max_line_size: Union[int, None]
+ max_field_size: Union[int, None]
+
@attr.s(auto_attribs=True, frozen=True, slots=True)
class ClientTimeout:
@@ -162,7 +210,10 @@ class ClientTimeout:
# 5 Minute default read timeout
DEFAULT_TIMEOUT: Final[ClientTimeout] = ClientTimeout(total=5 * 60)
-_RetType = TypeVar("_RetType")
+# https://www.rfc-editor.org/rfc/rfc9110#section-9.2.2
+IDEMPOTENT_METHODS = frozenset({"GET", "HEAD", "OPTIONS", "TRACE", "PUT", "DELETE"})
+
+_RetType = TypeVar("_RetType", ClientResponse, ClientWebSocketResponse)
_CharsetResolver = Callable[[ClientResponse, bytes], str]
@@ -237,6 +288,21 @@ class ClientSession:
# We initialise _connector to None immediately, as it's referenced in __del__()
# and could cause issues if an exception occurs during initialisation.
self._connector: Optional[BaseConnector] = None
+
+ if loop is None:
+ if connector is not None:
+ loop = connector._loop
+
+ loop = loop or asyncio.get_event_loop()
+
+ if base_url is None or isinstance(base_url, URL):
+ self._base_url: Optional[URL] = base_url
+ else:
+ self._base_url = URL(base_url)
+ assert (
+ self._base_url.origin() == self._base_url
+ ), "Only absolute URLs without path part are supported"
+
if timeout is sentinel or timeout is None:
self._timeout = DEFAULT_TIMEOUT
if read_timeout is not sentinel:
@@ -272,19 +338,6 @@ class ClientSession:
"conflict, please setup "
"timeout.connect"
)
- if loop is None:
- if connector is not None:
- loop = connector._loop
-
- loop = get_running_loop(loop)
-
- if base_url is None or isinstance(base_url, URL):
- self._base_url: Optional[URL] = base_url
- else:
- self._base_url = URL(base_url)
- assert (
- self._base_url.origin() == self._base_url
- ), "Only absolute URLs without path part are supported"
if connector is None:
connector = TCPConnector(loop=loop)
@@ -369,11 +422,22 @@ class ClientSession:
context["source_traceback"] = self._source_traceback
self._loop.call_exception_handler(context)
- def request(
- self, method: str, url: StrOrURL, **kwargs: Any
- ) -> "_RequestContextManager":
- """Perform HTTP request."""
- return _RequestContextManager(self._request(method, url, **kwargs))
+ if sys.version_info >= (3, 11) and TYPE_CHECKING:
+
+ def request(
+ self,
+ method: str,
+ url: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> "_RequestContextManager": ...
+
+ else:
+
+ def request(
+ self, method: str, url: StrOrURL, **kwargs: Any
+ ) -> "_RequestContextManager":
+ """Perform HTTP request."""
+ return _RequestContextManager(self._request(method, url, **kwargs))
def _build_url(self, str_or_url: StrOrURL) -> URL:
url = URL(str_or_url)
@@ -388,7 +452,7 @@ class ClientSession:
method: str,
str_or_url: StrOrURL,
*,
- params: Optional[Mapping[str, str]] = None,
+ params: Query = None,
data: Any = None,
json: Any = None,
cookies: Optional[LooseCookies] = None,
@@ -397,7 +461,7 @@ class ClientSession:
auth: Optional[BasicAuth] = None,
allow_redirects: bool = True,
max_redirects: int = 10,
- compress: Optional[str] = None,
+ compress: Union[str, bool, None] = None,
chunked: Optional[bool] = None,
expect100: bool = False,
raise_for_status: Union[
@@ -413,7 +477,7 @@ class ClientSession:
ssl: Union[SSLContext, bool, Fingerprint] = True,
server_hostname: Optional[str] = None,
proxy_headers: Optional[LooseHeaders] = None,
- trace_request_ctx: Optional[SimpleNamespace] = None,
+ trace_request_ctx: Optional[Mapping[str, str]] = None,
read_bufsize: Optional[int] = None,
auto_decompress: Optional[bool] = None,
max_line_size: Optional[int] = None,
@@ -451,7 +515,11 @@ class ClientSession:
try:
url = self._build_url(str_or_url)
except ValueError as e:
- raise InvalidURL(str_or_url) from e
+ raise InvalidUrlClientError(str_or_url) from e
+
+ assert self._connector is not None
+ if url.scheme not in self._connector.allowed_protocol_schema_set:
+ raise NonHttpUrlClientError(url)
skip_headers = set(self._skip_auto_headers)
if skip_auto_headers is not None:
@@ -505,8 +573,19 @@ class ClientSession:
timer = tm.timer()
try:
with timer:
+ # https://www.rfc-editor.org/rfc/rfc9112.html#name-retrying-requests
+ retry_persistent_connection = False #method in IDEMPOTENT_METHODS
while True:
url, auth_from_url = strip_auth_from_url(url)
+ if not url.raw_host:
+ # NOTE: Bail early, otherwise, causes `InvalidURL` through
+ # NOTE: `self._request_class()` below.
+ err_exc_cls = (
+ InvalidUrlRedirectClientError
+ if redirects
+ else InvalidUrlClientError
+ )
+ raise err_exc_cls(url)
if auth and auth_from_url:
raise ValueError(
"Cannot combine AUTH argument with "
@@ -550,7 +629,7 @@ class ClientSession:
url,
params=params,
headers=headers,
- skip_auto_headers=skip_headers,
+ skip_auto_headers=skip_headers if skip_headers else None,
data=data,
cookies=all_cookies,
auth=auth,
@@ -577,13 +656,12 @@ class ClientSession:
real_timeout.connect,
ceil_threshold=real_timeout.ceil_threshold,
):
- assert self._connector is not None
conn = await self._connector.connect(
req, traces=traces, timeout=real_timeout
)
except asyncio.TimeoutError as exc:
- raise ServerTimeoutError(
- "Connection timeout " "to host {}".format(url)
+ raise ConnectionTimeoutError(
+ f"Connection timeout to host {url}"
) from exc
assert conn.transport is not None
@@ -612,6 +690,11 @@ class ClientSession:
except BaseException:
conn.close()
raise
+ except (ClientOSError, ServerDisconnectedError):
+ if retry_persistent_connection:
+ retry_persistent_connection = False
+ continue
+ raise
except ClientError:
raise
except OSError as exc:
@@ -659,25 +742,35 @@ class ClientSession:
resp.release()
try:
- parsed_url = URL(
+ parsed_redirect_url = URL(
r_url, encoded=not self._requote_redirect_url
)
-
except ValueError as e:
- raise InvalidURL(r_url) from e
+ raise InvalidUrlRedirectClientError(
+ r_url,
+ "Server attempted redirecting to a location that does not look like a URL",
+ ) from e
- scheme = parsed_url.scheme
- if scheme not in ("http", "https", ""):
+ scheme = parsed_redirect_url.scheme
+ if scheme not in HTTP_AND_EMPTY_SCHEMA_SET:
resp.close()
- raise ValueError("Can redirect only to http or https")
+ raise NonHttpUrlRedirectClientError(r_url)
elif not scheme:
- parsed_url = url.join(parsed_url)
+ parsed_redirect_url = url.join(parsed_redirect_url)
+
+ try:
+ redirect_origin = parsed_redirect_url.origin()
+ except ValueError as origin_val_err:
+ raise InvalidUrlRedirectClientError(
+ parsed_redirect_url,
+ "Invalid redirect URL origin",
+ ) from origin_val_err
- if url.origin() != parsed_url.origin():
+ if url.origin() != redirect_origin:
auth = None
headers.pop(hdrs.AUTHORIZATION, None)
- url = parsed_url
+ url = parsed_redirect_url
params = {}
resp.release()
continue
@@ -736,11 +829,11 @@ class ClientSession:
heartbeat: Optional[float] = None,
auth: Optional[BasicAuth] = None,
origin: Optional[str] = None,
- params: Optional[Mapping[str, str]] = None,
+ params: Query = None,
headers: Optional[LooseHeaders] = None,
proxy: Optional[StrOrURL] = None,
proxy_auth: Optional[BasicAuth] = None,
- ssl: Union[SSLContext, bool, None, Fingerprint] = True,
+ ssl: Union[SSLContext, bool, Fingerprint] = True,
verify_ssl: Optional[bool] = None,
fingerprint: Optional[bytes] = None,
ssl_context: Optional[SSLContext] = None,
@@ -788,11 +881,11 @@ class ClientSession:
heartbeat: Optional[float] = None,
auth: Optional[BasicAuth] = None,
origin: Optional[str] = None,
- params: Optional[Mapping[str, str]] = None,
+ params: Query = None,
headers: Optional[LooseHeaders] = None,
proxy: Optional[StrOrURL] = None,
proxy_auth: Optional[BasicAuth] = None,
- ssl: Optional[Union[SSLContext, bool, Fingerprint]] = True,
+ ssl: Union[SSLContext, bool, Fingerprint] = True,
verify_ssl: Optional[bool] = None,
fingerprint: Optional[bytes] = None,
ssl_context: Optional[SSLContext] = None,
@@ -828,6 +921,11 @@ class ClientSession:
# For the sake of backward compatibility, if user passes in None, convert it to True
if ssl is None:
+ warnings.warn(
+ "ssl=None is deprecated, please use ssl=True",
+ DeprecationWarning,
+ stacklevel=2,
+ )
ssl = True
ssl = _merge_ssl_params(ssl, verify_ssl, ssl_context, fingerprint)
@@ -922,6 +1020,16 @@ class ClientSession:
assert conn is not None
conn_proto = conn.protocol
assert conn_proto is not None
+
+ # For WS connection the read_timeout must be either receive_timeout or greater
+ # None == no timeout, i.e. infinite timeout, so None is the max timeout possible
+ if receive_timeout is None:
+ # Reset regardless
+ conn_proto.read_timeout = receive_timeout
+ elif conn_proto.read_timeout is not None:
+ # If read_timeout was set check which wins
+ conn_proto.read_timeout = max(receive_timeout, conn_proto.read_timeout)
+
transport = conn.transport
assert transport is not None
reader: FlowControlDataQueue[WSMessage] = FlowControlDataQueue(
@@ -970,61 +1078,111 @@ class ClientSession:
added_names.add(key)
return result
- def get(
- self, url: StrOrURL, *, allow_redirects: bool = True, **kwargs: Any
- ) -> "_RequestContextManager":
- """Perform HTTP GET request."""
- return _RequestContextManager(
- self._request(hdrs.METH_GET, url, allow_redirects=allow_redirects, **kwargs)
- )
+ if sys.version_info >= (3, 11) and TYPE_CHECKING:
+
+ def get(
+ self,
+ url: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> "_RequestContextManager": ...
+
+ def options(
+ self,
+ url: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> "_RequestContextManager": ...
+
+ def head(
+ self,
+ url: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> "_RequestContextManager": ...
+
+ def post(
+ self,
+ url: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> "_RequestContextManager": ...
- def options(
- self, url: StrOrURL, *, allow_redirects: bool = True, **kwargs: Any
- ) -> "_RequestContextManager":
- """Perform HTTP OPTIONS request."""
- return _RequestContextManager(
- self._request(
- hdrs.METH_OPTIONS, url, allow_redirects=allow_redirects, **kwargs
+ def put(
+ self,
+ url: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> "_RequestContextManager": ...
+
+ def patch(
+ self,
+ url: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> "_RequestContextManager": ...
+
+ def delete(
+ self,
+ url: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> "_RequestContextManager": ...
+
+ else:
+
+ def get(
+ self, url: StrOrURL, *, allow_redirects: bool = True, **kwargs: Any
+ ) -> "_RequestContextManager":
+ """Perform HTTP GET request."""
+ return _RequestContextManager(
+ self._request(
+ hdrs.METH_GET, url, allow_redirects=allow_redirects, **kwargs
+ )
)
- )
- def head(
- self, url: StrOrURL, *, allow_redirects: bool = False, **kwargs: Any
- ) -> "_RequestContextManager":
- """Perform HTTP HEAD request."""
- return _RequestContextManager(
- self._request(
- hdrs.METH_HEAD, url, allow_redirects=allow_redirects, **kwargs
+ def options(
+ self, url: StrOrURL, *, allow_redirects: bool = True, **kwargs: Any
+ ) -> "_RequestContextManager":
+ """Perform HTTP OPTIONS request."""
+ return _RequestContextManager(
+ self._request(
+ hdrs.METH_OPTIONS, url, allow_redirects=allow_redirects, **kwargs
+ )
)
- )
- def post(
- self, url: StrOrURL, *, data: Any = None, **kwargs: Any
- ) -> "_RequestContextManager":
- """Perform HTTP POST request."""
- return _RequestContextManager(
- self._request(hdrs.METH_POST, url, data=data, **kwargs)
- )
+ def head(
+ self, url: StrOrURL, *, allow_redirects: bool = False, **kwargs: Any
+ ) -> "_RequestContextManager":
+ """Perform HTTP HEAD request."""
+ return _RequestContextManager(
+ self._request(
+ hdrs.METH_HEAD, url, allow_redirects=allow_redirects, **kwargs
+ )
+ )
- def put(
- self, url: StrOrURL, *, data: Any = None, **kwargs: Any
- ) -> "_RequestContextManager":
- """Perform HTTP PUT request."""
- return _RequestContextManager(
- self._request(hdrs.METH_PUT, url, data=data, **kwargs)
- )
+ def post(
+ self, url: StrOrURL, *, data: Any = None, **kwargs: Any
+ ) -> "_RequestContextManager":
+ """Perform HTTP POST request."""
+ return _RequestContextManager(
+ self._request(hdrs.METH_POST, url, data=data, **kwargs)
+ )
- def patch(
- self, url: StrOrURL, *, data: Any = None, **kwargs: Any
- ) -> "_RequestContextManager":
- """Perform HTTP PATCH request."""
- return _RequestContextManager(
- self._request(hdrs.METH_PATCH, url, data=data, **kwargs)
- )
+ def put(
+ self, url: StrOrURL, *, data: Any = None, **kwargs: Any
+ ) -> "_RequestContextManager":
+ """Perform HTTP PUT request."""
+ return _RequestContextManager(
+ self._request(hdrs.METH_PUT, url, data=data, **kwargs)
+ )
- def delete(self, url: StrOrURL, **kwargs: Any) -> "_RequestContextManager":
- """Perform HTTP DELETE request."""
- return _RequestContextManager(self._request(hdrs.METH_DELETE, url, **kwargs))
+ def patch(
+ self, url: StrOrURL, *, data: Any = None, **kwargs: Any
+ ) -> "_RequestContextManager":
+ """Perform HTTP PATCH request."""
+ return _RequestContextManager(
+ self._request(hdrs.METH_PATCH, url, data=data, **kwargs)
+ )
+
+ def delete(self, url: StrOrURL, **kwargs: Any) -> "_RequestContextManager":
+ """Perform HTTP DELETE request."""
+ return _RequestContextManager(
+ self._request(hdrs.METH_DELETE, url, **kwargs)
+ )
async def close(self) -> None:
"""Close underlying connector.
@@ -1175,7 +1333,7 @@ class _BaseRequestContextManager(Coroutine[Any, Any, _RetType], Generic[_RetType
__slots__ = ("_coro", "_resp")
def __init__(self, coro: Coroutine["asyncio.Future[Any]", None, _RetType]) -> None:
- self._coro = coro
+ self._coro: Coroutine["asyncio.Future[Any]", None, _RetType] = coro
def send(self, arg: None) -> "asyncio.Future[Any]":
return self._coro.send(arg)
@@ -1194,12 +1352,8 @@ class _BaseRequestContextManager(Coroutine[Any, Any, _RetType], Generic[_RetType
return self.__await__()
async def __aenter__(self) -> _RetType:
- self._resp = await self._coro
- return self._resp
-
-
-class _RequestContextManager(_BaseRequestContextManager[ClientResponse]):
- __slots__ = ()
+ self._resp: _RetType = await self._coro
+ return await self._resp.__aenter__()
async def __aexit__(
self,
@@ -1207,25 +1361,11 @@ class _RequestContextManager(_BaseRequestContextManager[ClientResponse]):
exc: Optional[BaseException],
tb: Optional[TracebackType],
) -> None:
- # We're basing behavior on the exception as it can be caused by
- # user code unrelated to the status of the connection. If you
- # would like to close a connection you must do that
- # explicitly. Otherwise connection error handling should kick in
- # and close/recycle the connection as required.
- self._resp.release()
- await self._resp.wait_for_close()
-
+ await self._resp.__aexit__(exc_type, exc, tb)
-class _WSRequestContextManager(_BaseRequestContextManager[ClientWebSocketResponse]):
- __slots__ = ()
- async def __aexit__(
- self,
- exc_type: Optional[Type[BaseException]],
- exc: Optional[BaseException],
- tb: Optional[TracebackType],
- ) -> None:
- await self._resp.close()
+_RequestContextManager = _BaseRequestContextManager[ClientResponse]
+_WSRequestContextManager = _BaseRequestContextManager[ClientWebSocketResponse]
class _SessionRequestContextManager:
@@ -1265,7 +1405,7 @@ def request(
method: str,
url: StrOrURL,
*,
- params: Optional[Mapping[str, str]] = None,
+ params: Query = None,
data: Any = None,
json: Any = None,
headers: Optional[LooseHeaders] = None,
diff --git a/contrib/python/aiohttp/aiohttp/client_exceptions.py b/contrib/python/aiohttp/aiohttp/client_exceptions.py
index 9b6e44203c8..94991c42477 100644
--- a/contrib/python/aiohttp/aiohttp/client_exceptions.py
+++ b/contrib/python/aiohttp/aiohttp/client_exceptions.py
@@ -2,10 +2,11 @@
import asyncio
import warnings
-from typing import TYPE_CHECKING, Any, Optional, Tuple, Union
+from typing import TYPE_CHECKING, Optional, Tuple, Union
-from .http_parser import RawResponseMessage
-from .typedefs import LooseHeaders
+from multidict import MultiMapping
+
+from .typedefs import StrOrURL
try:
import ssl
@@ -17,18 +18,22 @@ except ImportError: # pragma: no cover
if TYPE_CHECKING:
from .client_reqrep import ClientResponse, ConnectionKey, Fingerprint, RequestInfo
+ from .http_parser import RawResponseMessage
else:
- RequestInfo = ClientResponse = ConnectionKey = None
+ RequestInfo = ClientResponse = ConnectionKey = RawResponseMessage = None
__all__ = (
"ClientError",
"ClientConnectionError",
+ "ClientConnectionResetError",
"ClientOSError",
"ClientConnectorError",
"ClientProxyConnectionError",
"ClientSSLError",
"ClientConnectorSSLError",
"ClientConnectorCertificateError",
+ "ConnectionTimeoutError",
+ "SocketTimeoutError",
"ServerConnectionError",
"ServerTimeoutError",
"ServerDisconnectedError",
@@ -39,6 +44,11 @@ __all__ = (
"ContentTypeError",
"ClientPayloadError",
"InvalidURL",
+ "InvalidUrlClientError",
+ "RedirectClientError",
+ "NonHttpUrlClientError",
+ "InvalidUrlRedirectClientError",
+ "NonHttpUrlRedirectClientError",
)
@@ -64,7 +74,7 @@ class ClientResponseError(ClientError):
code: Optional[int] = None,
status: Optional[int] = None,
message: str = "",
- headers: Optional[LooseHeaders] = None,
+ headers: Optional[MultiMapping[str]] = None,
) -> None:
self.request_info = request_info
if code is not None:
@@ -93,7 +103,7 @@ class ClientResponseError(ClientError):
return "{}, message={!r}, url={!r}".format(
self.status,
self.message,
- self.request_info.real_url,
+ str(self.request_info.real_url),
)
def __repr__(self) -> str:
@@ -150,6 +160,10 @@ class ClientConnectionError(ClientError):
"""Base class for client socket errors."""
+class ClientConnectionResetError(ClientConnectionError, ConnectionResetError):
+ """ConnectionResetError"""
+
+
class ClientOSError(ClientConnectionError, OSError):
"""OSError error."""
@@ -242,6 +256,14 @@ class ServerTimeoutError(ServerConnectionError, asyncio.TimeoutError):
"""Server timeout error."""
+class ConnectionTimeoutError(ServerTimeoutError):
+ """Connection timeout error."""
+
+
+class SocketTimeoutError(ServerTimeoutError):
+ """Socket timeout error."""
+
+
class ServerFingerprintMismatch(ServerConnectionError):
"""SSL certificate does not match expected fingerprint."""
@@ -271,17 +293,52 @@ class InvalidURL(ClientError, ValueError):
# Derive from ValueError for backward compatibility
- def __init__(self, url: Any) -> None:
+ def __init__(self, url: StrOrURL, description: Union[str, None] = None) -> None:
# The type of url is not yarl.URL because the exception can be raised
# on URL(url) call
- super().__init__(url)
+ self._url = url
+ self._description = description
+
+ if description:
+ super().__init__(url, description)
+ else:
+ super().__init__(url)
@property
- def url(self) -> Any:
- return self.args[0]
+ def url(self) -> StrOrURL:
+ return self._url
+
+ @property
+ def description(self) -> "str | None":
+ return self._description
def __repr__(self) -> str:
- return f"<{self.__class__.__name__} {self.url}>"
+ return f"<{self.__class__.__name__} {self}>"
+
+ def __str__(self) -> str:
+ if self._description:
+ return f"{self._url} - {self._description}"
+ return str(self._url)
+
+
+class InvalidUrlClientError(InvalidURL):
+ """Invalid URL client error."""
+
+
+class RedirectClientError(ClientError):
+ """Client redirect error."""
+
+
+class NonHttpUrlClientError(ClientError):
+ """Non http URL client error."""
+
+
+class InvalidUrlRedirectClientError(InvalidUrlClientError, RedirectClientError):
+ """Invalid URL redirect client error."""
+
+
+class NonHttpUrlRedirectClientError(NonHttpUrlClientError, RedirectClientError):
+ """Non http URL redirect client error."""
class ClientSSLError(ClientConnectorError):
diff --git a/contrib/python/aiohttp/aiohttp/client_proto.py b/contrib/python/aiohttp/aiohttp/client_proto.py
index 723f5aae5f4..8055811e40d 100644
--- a/contrib/python/aiohttp/aiohttp/client_proto.py
+++ b/contrib/python/aiohttp/aiohttp/client_proto.py
@@ -7,7 +7,7 @@ from .client_exceptions import (
ClientOSError,
ClientPayloadError,
ServerDisconnectedError,
- ServerTimeoutError,
+ SocketTimeoutError,
)
from .helpers import (
_EXC_SENTINEL,
@@ -50,15 +50,13 @@ class ResponseHandler(BaseProtocol, DataQueue[Tuple[RawResponseMessage, StreamRe
@property
def should_close(self) -> bool:
- if self._payload is not None and not self._payload.is_eof() or self._upgraded:
- return True
-
return (
self._should_close
+ or (self._payload is not None and not self._payload.is_eof())
or self._upgraded
- or self.exception() is not None
+ or self._exception is not None
or self._payload_parser is not None
- or len(self) > 0
+ or bool(self._buffer)
or bool(self._tail)
)
@@ -224,8 +222,16 @@ class ResponseHandler(BaseProtocol, DataQueue[Tuple[RawResponseMessage, StreamRe
def start_timeout(self) -> None:
self._reschedule_timeout()
+ @property
+ def read_timeout(self) -> Optional[float]:
+ return self._read_timeout
+
+ @read_timeout.setter
+ def read_timeout(self, read_timeout: Optional[float]) -> None:
+ self._read_timeout = read_timeout
+
def _on_read_timeout(self) -> None:
- exc = ServerTimeoutError("Timeout on reading data from socket")
+ exc = SocketTimeoutError("Timeout on reading data from socket")
self.set_exception(exc)
if self._payload is not None:
set_exception(self._payload, exc)
@@ -261,7 +267,15 @@ class ResponseHandler(BaseProtocol, DataQueue[Tuple[RawResponseMessage, StreamRe
# closed in this case
self.transport.close()
# should_close is True after the call
- self.set_exception(HttpProcessingError(), underlying_exc)
+ if isinstance(underlying_exc, HttpProcessingError):
+ exc = HttpProcessingError(
+ code=underlying_exc.code,
+ message=underlying_exc.message,
+ headers=underlying_exc.headers,
+ )
+ else:
+ exc = HttpProcessingError()
+ self.set_exception(exc, underlying_exc)
return
self._upgraded = upgraded
diff --git a/contrib/python/aiohttp/aiohttp/client_reqrep.py b/contrib/python/aiohttp/aiohttp/client_reqrep.py
index afe719da16e..aa8f54e67b8 100644
--- a/contrib/python/aiohttp/aiohttp/client_reqrep.py
+++ b/contrib/python/aiohttp/aiohttp/client_reqrep.py
@@ -27,7 +27,7 @@ from typing import (
import attr
from multidict import CIMultiDict, CIMultiDictProxy, MultiDict, MultiDictProxy
-from yarl import URL
+from yarl import URL, __version__ as yarl_version
from . import hdrs, helpers, http, multipart, payload
from .abc import AbstractStreamWriter
@@ -67,6 +67,7 @@ from .typedefs import (
JSONDecoder,
LooseCookies,
LooseHeaders,
+ Query,
RawHeaders,
)
@@ -88,6 +89,7 @@ if TYPE_CHECKING:
_CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]")
+_YARL_SUPPORTS_EXTEND_QUERY = tuple(map(int, yarl_version.split(".")[:2])) >= (1, 11)
json_re = re.compile(r"^application/(?:[\w.+-]+?\+)?json")
@@ -209,7 +211,7 @@ def _merge_ssl_params(
return ssl
[email protected](auto_attribs=True, slots=True, frozen=True)
[email protected](auto_attribs=True, slots=True, frozen=True, cache_hash=True)
class ConnectionKey:
# the key should contain an information about used proxy / TLS
# to prevent reusing wrong connections from a pool
@@ -245,7 +247,8 @@ class ClientRequest:
hdrs.ACCEPT_ENCODING: _gen_default_accept_encoding(),
}
- body = b""
+ # Type of body depends on PAYLOAD_REGISTRY, which is dynamic.
+ body: Any = b""
auth = None
response = None
@@ -262,14 +265,14 @@ class ClientRequest:
method: str,
url: URL,
*,
- params: Optional[Mapping[str, str]] = None,
+ params: Query = None,
headers: Optional[LooseHeaders] = None,
- skip_auto_headers: Iterable[str] = frozenset(),
+ skip_auto_headers: Optional[Iterable[str]] = None,
data: Any = None,
cookies: Optional[LooseCookies] = None,
auth: Optional[BasicAuth] = None,
version: http.HttpVersion = http.HttpVersion11,
- compress: Optional[str] = None,
+ compress: Union[str, bool, None] = None,
chunked: Optional[bool] = None,
expect100: bool = False,
loop: Optional[asyncio.AbstractEventLoop] = None,
@@ -300,10 +303,13 @@ class ClientRequest:
# assert session is not None
self._session = cast("ClientSession", session)
if params:
- q = MultiDict(url.query)
- url2 = url.with_query(params)
- q.extend(url2.query)
- url = url.with_query(q)
+ if _YARL_SUPPORTS_EXTEND_QUERY:
+ url = url.extend_query(params)
+ else:
+ q = MultiDict(url.query)
+ url2 = url.with_query(params)
+ q.extend(url2.query)
+ url = url.with_query(q)
self.original_url = url
self.url = url.with_fragment(None)
self.method = method.upper()
@@ -352,7 +358,12 @@ class ClientRequest:
if self.__writer is not None:
self.__writer.remove_done_callback(self.__reset_writer)
self.__writer = writer
- if writer is not None:
+ if writer is None:
+ return
+ if writer.done():
+ # The writer is already done, so we can reset it immediately.
+ self.__reset_writer()
+ else:
writer.add_done_callback(self.__reset_writer)
def is_ssl(self) -> bool:
@@ -402,8 +413,8 @@ class ClientRequest:
# basic auth info
username, password = url.user, url.password
- if username:
- self.auth = helpers.BasicAuth(username, password or "")
+ if username or password:
+ self.auth = helpers.BasicAuth(username or "", password or "")
def update_version(self, version: Union[http.HttpVersion, str]) -> None:
"""Convert request version to two elements tuple.
@@ -436,7 +447,7 @@ class ClientRequest:
if headers:
if isinstance(headers, (dict, MultiDictProxy, MultiDict)):
- headers = headers.items() # type: ignore[assignment]
+ headers = headers.items()
for key, value in headers: # type: ignore[misc]
# A special case for Host header
@@ -445,12 +456,18 @@ class ClientRequest:
else:
self.headers.add(key, value)
- def update_auto_headers(self, skip_auto_headers: Iterable[str]) -> None:
- self.skip_auto_headers = CIMultiDict(
- (hdr, None) for hdr in sorted(skip_auto_headers)
- )
- used_headers = self.headers.copy()
- used_headers.extend(self.skip_auto_headers) # type: ignore[arg-type]
+ def update_auto_headers(self, skip_auto_headers: Optional[Iterable[str]]) -> None:
+ if skip_auto_headers is not None:
+ self.skip_auto_headers = CIMultiDict(
+ (hdr, None) for hdr in sorted(skip_auto_headers)
+ )
+ used_headers = self.headers.copy()
+ used_headers.extend(self.skip_auto_headers) # type: ignore[arg-type]
+ else:
+ # Fast path when there are no headers to skip
+ # which is the most common case.
+ self.skip_auto_headers = CIMultiDict()
+ used_headers = self.headers
for hdr, val in self.DEFAULT_HEADERS.items():
if hdr not in used_headers:
@@ -486,11 +503,12 @@ class ClientRequest:
def update_content_encoding(self, data: Any) -> None:
"""Set request content encoding."""
- if data is None:
+ if not data:
+ # Don't compress an empty body.
+ self.compress = None
return
- enc = self.headers.get(hdrs.CONTENT_ENCODING, "").lower()
- if enc:
+ if self.headers.get(hdrs.CONTENT_ENCODING):
if self.compress:
raise ValueError(
"compress can not be set " "if Content-Encoding header is set"
@@ -566,10 +584,8 @@ class ClientRequest:
# copy payload headers
assert body.headers
- for (key, value) in body.headers.items():
- if key in self.headers:
- continue
- if key in self.skip_auto_headers:
+ for key, value in body.headers.items():
+ if key in self.headers or key in self.skip_auto_headers:
continue
self.headers[key] = value
@@ -592,6 +608,10 @@ class ClientRequest:
raise ValueError("proxy_auth must be None or BasicAuth() tuple")
self.proxy = proxy
self.proxy_auth = proxy_auth
+ if proxy_headers is not None and not isinstance(
+ proxy_headers, (MultiDict, MultiDictProxy)
+ ):
+ proxy_headers = CIMultiDict(proxy_headers)
self.proxy_headers = proxy_headers
def keep_alive(self) -> bool:
@@ -614,11 +634,8 @@ class ClientRequest:
"""Support coroutines that yields bytes objects."""
# 100 response
if self._continue is not None:
- try:
- await writer.drain()
- await self._continue
- except asyncio.CancelledError:
- return
+ await writer.drain()
+ await self._continue
protocol = conn.protocol
assert protocol is not None
@@ -627,10 +644,10 @@ class ClientRequest:
await self.body.write(writer)
else:
if isinstance(self.body, (bytes, bytearray)):
- self.body = (self.body,) # type: ignore[assignment]
+ self.body = (self.body,)
for chunk in self.body:
- await writer.write(chunk) # type: ignore[arg-type]
+ await writer.write(chunk)
except OSError as underlying_exc:
reraised_exc = underlying_exc
@@ -645,7 +662,9 @@ class ClientRequest:
set_exception(protocol, reraised_exc, underlying_exc)
except asyncio.CancelledError:
- await writer.write_eof()
+ # Body hasn't been fully sent, so connection can't be reused.
+ conn.close()
+ raise
except Exception as underlying_exc:
set_exception(
protocol,
@@ -681,16 +700,20 @@ class ClientRequest:
writer = StreamWriter(
protocol,
self.loop,
- on_chunk_sent=functools.partial(
- self._on_chunk_request_sent, self.method, self.url
+ on_chunk_sent=(
+ functools.partial(self._on_chunk_request_sent, self.method, self.url)
+ if self._traces
+ else None
),
- on_headers_sent=functools.partial(
- self._on_headers_request_sent, self.method, self.url
+ on_headers_sent=(
+ functools.partial(self._on_headers_request_sent, self.method, self.url)
+ if self._traces
+ else None
),
)
if self.compress:
- writer.enable_compression(self.compress)
+ writer.enable_compression(self.compress) # type: ignore[arg-type]
if self.chunked is not None:
writer.enable_chunking()
@@ -717,13 +740,20 @@ class ClientRequest:
self.headers[hdrs.CONNECTION] = connection
# status + headers
- status_line = "{0} {1} HTTP/{v.major}.{v.minor}".format(
- self.method, path, v=self.version
- )
+ v = self.version
+ status_line = f"{self.method} {path} HTTP/{v.major}.{v.minor}"
await writer.write_headers(status_line, self.headers)
+ coro = self.write_bytes(writer, conn)
- self._writer = self.loop.create_task(self.write_bytes(writer, conn))
+ if sys.version_info >= (3, 12):
+ # Optimization for Python 3.12, try to write
+ # bytes immediately to avoid having to schedule
+ # the task on the event loop.
+ task = asyncio.Task(coro, loop=self.loop, eager_start=True)
+ else:
+ task = self.loop.create_task(coro)
+ self._writer = task
response_class = self.response_class
assert response_class is not None
self.response = response_class(
@@ -741,8 +771,15 @@ class ClientRequest:
async def close(self) -> None:
if self._writer is not None:
- with contextlib.suppress(asyncio.CancelledError):
+ try:
await self._writer
+ except asyncio.CancelledError:
+ if (
+ sys.version_info >= (3, 11)
+ and (task := asyncio.current_task())
+ and task.cancelling()
+ ):
+ raise
def terminate(self) -> None:
if self._writer is not None:
@@ -782,6 +819,7 @@ class ClientResponse(HeadersMixin):
# post-init stage allows to not change ctor signature
_closed = True # to allow __del__ for non-initialized properly response
_released = False
+ _in_context = False
__writer = None
def __init__(
@@ -820,9 +858,9 @@ class ClientResponse(HeadersMixin):
# work after the response has finished reading the body.
if session is None:
# TODO: Fix session=None in tests (see ClientRequest.__init__).
- self._resolve_charset: Callable[
- ["ClientResponse", bytes], str
- ] = lambda *_: "utf-8"
+ self._resolve_charset: Callable[["ClientResponse", bytes], str] = (
+ lambda *_: "utf-8"
+ )
else:
self._resolve_charset = session._resolve_charset
if loop.get_debug():
@@ -840,7 +878,12 @@ class ClientResponse(HeadersMixin):
if self.__writer is not None:
self.__writer.remove_done_callback(self.__reset_writer)
self.__writer = writer
- if writer is not None:
+ if writer is None:
+ return
+ if writer.done():
+ # The writer is already done, so we can reset it immediately.
+ self.__reset_writer()
+ else:
writer.add_done_callback(self.__reset_writer)
@reify
@@ -1066,7 +1109,12 @@ class ClientResponse(HeadersMixin):
if not self.ok:
# reason should always be not None for a started response
assert self.reason is not None
- self.release()
+
+ # If we're in a context we can rely on __aexit__() to release as the
+ # exception propagates.
+ if not self._in_context:
+ self.release()
+
raise ClientResponseError(
self.request_info,
self.history,
@@ -1085,7 +1133,15 @@ class ClientResponse(HeadersMixin):
async def _wait_released(self) -> None:
if self._writer is not None:
- await self._writer
+ try:
+ await self._writer
+ except asyncio.CancelledError:
+ if (
+ sys.version_info >= (3, 11)
+ and (task := asyncio.current_task())
+ and task.cancelling()
+ ):
+ raise
self._release_connection()
def _cleanup_writer(self) -> None:
@@ -1101,7 +1157,15 @@ class ClientResponse(HeadersMixin):
async def wait_for_close(self) -> None:
if self._writer is not None:
- await self._writer
+ try:
+ await self._writer
+ except asyncio.CancelledError:
+ if (
+ sys.version_info >= (3, 11)
+ and (task := asyncio.current_task())
+ and task.cancelling()
+ ):
+ raise
self.release()
async def read(self) -> bytes:
@@ -1130,7 +1194,7 @@ class ClientResponse(HeadersMixin):
encoding = mimetype.parameters.get("charset")
if encoding:
- with contextlib.suppress(LookupError):
+ with contextlib.suppress(LookupError, ValueError):
return codecs.lookup(encoding).name
if mimetype.type == "application" and (
@@ -1176,6 +1240,7 @@ class ClientResponse(HeadersMixin):
raise ContentTypeError(
self.request_info,
self.history,
+ status=self.status,
message=(
"Attempt to decode JSON with " "unexpected mimetype: %s" % ctype
),
@@ -1192,6 +1257,7 @@ class ClientResponse(HeadersMixin):
return loads(stripped.decode(encoding))
async def __aenter__(self) -> "ClientResponse":
+ self._in_context = True
return self
async def __aexit__(
@@ -1200,6 +1266,7 @@ class ClientResponse(HeadersMixin):
exc_val: Optional[BaseException],
exc_tb: Optional[TracebackType],
) -> None:
+ self._in_context = False
# similar to _RequestContextManager, we do not need to check
# for exceptions, response object can close connection
# if state is broken
diff --git a/contrib/python/aiohttp/aiohttp/client_ws.py b/contrib/python/aiohttp/aiohttp/client_ws.py
index d9c74a30f52..c6b5da5103b 100644
--- a/contrib/python/aiohttp/aiohttp/client_ws.py
+++ b/contrib/python/aiohttp/aiohttp/client_ws.py
@@ -2,11 +2,12 @@
import asyncio
import sys
-from typing import Any, Optional, cast
+from types import TracebackType
+from typing import Any, Optional, Type, cast
-from .client_exceptions import ClientError
+from .client_exceptions import ClientError, ServerTimeoutError
from .client_reqrep import ClientResponse
-from .helpers import call_later, set_result
+from .helpers import calculate_timeout_when, set_result
from .http import (
WS_CLOSED_MESSAGE,
WS_CLOSING_MESSAGE,
@@ -62,63 +63,123 @@ class ClientWebSocketResponse:
self._autoping = autoping
self._heartbeat = heartbeat
self._heartbeat_cb: Optional[asyncio.TimerHandle] = None
+ self._heartbeat_when: float = 0.0
if heartbeat is not None:
self._pong_heartbeat = heartbeat / 2.0
self._pong_response_cb: Optional[asyncio.TimerHandle] = None
self._loop = loop
- self._waiting: Optional[asyncio.Future[bool]] = None
+ self._waiting: bool = False
+ self._close_wait: Optional[asyncio.Future[None]] = None
self._exception: Optional[BaseException] = None
self._compress = compress
self._client_notakeover = client_notakeover
+ self._ping_task: Optional[asyncio.Task[None]] = None
self._reset_heartbeat()
def _cancel_heartbeat(self) -> None:
- if self._pong_response_cb is not None:
- self._pong_response_cb.cancel()
- self._pong_response_cb = None
-
+ self._cancel_pong_response_cb()
if self._heartbeat_cb is not None:
self._heartbeat_cb.cancel()
self._heartbeat_cb = None
+ if self._ping_task is not None:
+ self._ping_task.cancel()
+ self._ping_task = None
+
+ def _cancel_pong_response_cb(self) -> None:
+ if self._pong_response_cb is not None:
+ self._pong_response_cb.cancel()
+ self._pong_response_cb = None
def _reset_heartbeat(self) -> None:
- self._cancel_heartbeat()
+ if self._heartbeat is None:
+ return
+ self._cancel_pong_response_cb()
+ loop = self._loop
+ assert loop is not None
+ conn = self._conn
+ timeout_ceil_threshold = (
+ conn._connector._timeout_ceil_threshold if conn is not None else 5
+ )
+ now = loop.time()
+ when = calculate_timeout_when(now, self._heartbeat, timeout_ceil_threshold)
+ self._heartbeat_when = when
+ if self._heartbeat_cb is None:
+ # We do not cancel the previous heartbeat_cb here because
+ # it generates a significant amount of TimerHandle churn
+ # which causes asyncio to rebuild the heap frequently.
+ # Instead _send_heartbeat() will reschedule the next
+ # heartbeat if it fires too early.
+ self._heartbeat_cb = loop.call_at(when, self._send_heartbeat)
- if self._heartbeat is not None:
- self._heartbeat_cb = call_later(
- self._send_heartbeat,
- self._heartbeat,
- self._loop,
- timeout_ceil_threshold=self._conn._connector._timeout_ceil_threshold
- if self._conn is not None
- else 5,
+ def _send_heartbeat(self) -> None:
+ self._heartbeat_cb = None
+ loop = self._loop
+ now = loop.time()
+ if now < self._heartbeat_when:
+ # Heartbeat fired too early, reschedule
+ self._heartbeat_cb = loop.call_at(
+ self._heartbeat_when, self._send_heartbeat
)
+ return
- def _send_heartbeat(self) -> None:
- if self._heartbeat is not None and not self._closed:
- # fire-and-forget a task is not perfect but maybe ok for
- # sending ping. Otherwise we need a long-living heartbeat
- # task in the class.
- self._loop.create_task(self._writer.ping())
+ conn = self._conn
+ timeout_ceil_threshold = (
+ conn._connector._timeout_ceil_threshold if conn is not None else 5
+ )
+ when = calculate_timeout_when(now, self._pong_heartbeat, timeout_ceil_threshold)
+ self._cancel_pong_response_cb()
+ self._pong_response_cb = loop.call_at(when, self._pong_not_received)
- if self._pong_response_cb is not None:
- self._pong_response_cb.cancel()
- self._pong_response_cb = call_later(
- self._pong_not_received,
- self._pong_heartbeat,
- self._loop,
- timeout_ceil_threshold=self._conn._connector._timeout_ceil_threshold
- if self._conn is not None
- else 5,
- )
+ if sys.version_info >= (3, 12):
+ # Optimization for Python 3.12, try to send the ping
+ # immediately to avoid having to schedule
+ # the task on the event loop.
+ ping_task = asyncio.Task(self._writer.ping(), loop=loop, eager_start=True)
+ else:
+ ping_task = loop.create_task(self._writer.ping())
+
+ if not ping_task.done():
+ self._ping_task = ping_task
+ ping_task.add_done_callback(self._ping_task_done)
+ else:
+ self._ping_task_done(ping_task)
+
+ def _ping_task_done(self, task: "asyncio.Task[None]") -> None:
+ """Callback for when the ping task completes."""
+ if not task.cancelled() and (exc := task.exception()):
+ self._handle_ping_pong_exception(exc)
+ self._ping_task = None
def _pong_not_received(self) -> None:
- if not self._closed:
- self._closed = True
- self._close_code = WSCloseCode.ABNORMAL_CLOSURE
- self._exception = asyncio.TimeoutError()
- self._response.close()
+ self._handle_ping_pong_exception(ServerTimeoutError())
+
+ def _handle_ping_pong_exception(self, exc: BaseException) -> None:
+ """Handle exceptions raised during ping/pong processing."""
+ if self._closed:
+ return
+ self._set_closed()
+ self._close_code = WSCloseCode.ABNORMAL_CLOSURE
+ self._exception = exc
+ self._response.close()
+ if self._waiting and not self._closing:
+ self._reader.feed_data(WSMessage(WSMsgType.ERROR, exc, None))
+
+ def _set_closed(self) -> None:
+ """Set the connection to closed.
+
+ Cancel any heartbeat timers and set the closed flag.
+ """
+ self._closed = True
+ self._cancel_heartbeat()
+
+ def _set_closing(self) -> None:
+ """Set the connection to closing.
+
+ Cancel any heartbeat timers and set the closing flag.
+ """
+ self._closing = True
+ self._cancel_heartbeat()
@property
def closed(self) -> bool:
@@ -181,14 +242,15 @@ class ClientWebSocketResponse:
async def close(self, *, code: int = WSCloseCode.OK, message: bytes = b"") -> bool:
# we need to break `receive()` cycle first,
# `close()` may be called from different task
- if self._waiting is not None and not self._closing:
- self._closing = True
+ if self._waiting and not self._closing:
+ assert self._loop is not None
+ self._close_wait = self._loop.create_future()
+ self._set_closing()
self._reader.feed_data(WS_CLOSING_MESSAGE, 0)
- await self._waiting
+ await self._close_wait
if not self._closed:
- self._cancel_heartbeat()
- self._closed = True
+ self._set_closed()
try:
await self._writer.close(code, message)
except asyncio.CancelledError:
@@ -219,7 +281,7 @@ class ClientWebSocketResponse:
self._response.close()
return True
- if msg.type == WSMsgType.CLOSE:
+ if msg.type is WSMsgType.CLOSE:
self._close_code = msg.data
self._response.close()
return True
@@ -227,8 +289,10 @@ class ClientWebSocketResponse:
return False
async def receive(self, timeout: Optional[float] = None) -> WSMessage:
+ receive_timeout = timeout or self._receive_timeout
+
while True:
- if self._waiting is not None:
+ if self._waiting:
raise RuntimeError("Concurrent call to receive() is not allowed")
if self._closed:
@@ -238,15 +302,22 @@ class ClientWebSocketResponse:
return WS_CLOSED_MESSAGE
try:
- self._waiting = self._loop.create_future()
+ self._waiting = True
try:
- async with async_timeout.timeout(timeout or self._receive_timeout):
+ if receive_timeout:
+ # Entering the context manager and creating
+ # Timeout() object can take almost 50% of the
+ # run time in this loop so we avoid it if
+ # there is no read timeout.
+ async with async_timeout.timeout(receive_timeout):
+ msg = await self._reader.read()
+ else:
msg = await self._reader.read()
self._reset_heartbeat()
finally:
- waiter = self._waiting
- self._waiting = None
- set_result(waiter, True)
+ self._waiting = False
+ if self._close_wait:
+ set_result(self._close_wait, None)
except (asyncio.CancelledError, asyncio.TimeoutError):
self._close_code = WSCloseCode.ABNORMAL_CLOSURE
raise
@@ -255,7 +326,8 @@ class ClientWebSocketResponse:
await self.close()
return WSMessage(WSMsgType.CLOSED, None, None)
except ClientError:
- self._closed = True
+ # Likely ServerDisconnectedError when connection is lost
+ self._set_closed()
self._close_code = WSCloseCode.ABNORMAL_CLOSURE
return WS_CLOSED_MESSAGE
except WebSocketError as exc:
@@ -264,35 +336,35 @@ class ClientWebSocketResponse:
return WSMessage(WSMsgType.ERROR, exc, None)
except Exception as exc:
self._exception = exc
- self._closing = True
+ self._set_closing()
self._close_code = WSCloseCode.ABNORMAL_CLOSURE
await self.close()
return WSMessage(WSMsgType.ERROR, exc, None)
- if msg.type == WSMsgType.CLOSE:
- self._closing = True
+ if msg.type is WSMsgType.CLOSE:
+ self._set_closing()
self._close_code = msg.data
if not self._closed and self._autoclose:
await self.close()
- elif msg.type == WSMsgType.CLOSING:
- self._closing = True
- elif msg.type == WSMsgType.PING and self._autoping:
+ elif msg.type is WSMsgType.CLOSING:
+ self._set_closing()
+ elif msg.type is WSMsgType.PING and self._autoping:
await self.pong(msg.data)
continue
- elif msg.type == WSMsgType.PONG and self._autoping:
+ elif msg.type is WSMsgType.PONG and self._autoping:
continue
return msg
async def receive_str(self, *, timeout: Optional[float] = None) -> str:
msg = await self.receive(timeout)
- if msg.type != WSMsgType.TEXT:
+ if msg.type is not WSMsgType.TEXT:
raise TypeError(f"Received message {msg.type}:{msg.data!r} is not str")
return cast(str, msg.data)
async def receive_bytes(self, *, timeout: Optional[float] = None) -> bytes:
msg = await self.receive(timeout)
- if msg.type != WSMsgType.BINARY:
+ if msg.type is not WSMsgType.BINARY:
raise TypeError(f"Received message {msg.type}:{msg.data!r} is not bytes")
return cast(bytes, msg.data)
@@ -313,3 +385,14 @@ class ClientWebSocketResponse:
if msg.type in (WSMsgType.CLOSE, WSMsgType.CLOSING, WSMsgType.CLOSED):
raise StopAsyncIteration
return msg
+
+ async def __aenter__(self) -> "ClientWebSocketResponse":
+ return self
+
+ async def __aexit__(
+ self,
+ exc_type: Optional[Type[BaseException]],
+ exc_val: Optional[BaseException],
+ exc_tb: Optional[TracebackType],
+ ) -> None:
+ await self.close()
diff --git a/contrib/python/aiohttp/aiohttp/compression_utils.py b/contrib/python/aiohttp/aiohttp/compression_utils.py
index 9631d377e9a..ab4a2f1cc84 100644
--- a/contrib/python/aiohttp/aiohttp/compression_utils.py
+++ b/contrib/python/aiohttp/aiohttp/compression_utils.py
@@ -50,9 +50,11 @@ class ZLibCompressor(ZlibBaseHandler):
max_sync_chunk_size: Optional[int] = MAX_SYNC_CHUNK_SIZE,
):
super().__init__(
- mode=encoding_to_mode(encoding, suppress_deflate_header)
- if wbits is None
- else wbits,
+ mode=(
+ encoding_to_mode(encoding, suppress_deflate_header)
+ if wbits is None
+ else wbits
+ ),
executor=executor,
max_sync_chunk_size=max_sync_chunk_size,
)
diff --git a/contrib/python/aiohttp/aiohttp/connector.py b/contrib/python/aiohttp/aiohttp/connector.py
index f95ebe84c66..8288a0115b7 100644
--- a/contrib/python/aiohttp/aiohttp/connector.py
+++ b/contrib/python/aiohttp/aiohttp/connector.py
@@ -1,6 +1,7 @@
import asyncio
import functools
import random
+import socket
import sys
import traceback
import warnings
@@ -22,6 +23,7 @@ from typing import (
List,
Literal,
Optional,
+ Sequence,
Set,
Tuple,
Type,
@@ -29,10 +31,11 @@ from typing import (
cast,
)
+import aiohappyeyeballs
import attr
from . import hdrs, helpers
-from .abc import AbstractResolver
+from .abc import AbstractResolver, ResolveResult
from .client_exceptions import (
ClientConnectionError,
ClientConnectorCertificateError,
@@ -47,7 +50,7 @@ from .client_exceptions import (
)
from .client_proto import ResponseHandler
from .client_reqrep import ClientRequest, Fingerprint, _merge_ssl_params
-from .helpers import ceil_timeout, get_running_loop, is_ip_address, noop, sentinel
+from .helpers import ceil_timeout, is_ip_address, noop, sentinel
from .locks import EventResultOrError
from .resolver import DefaultResolver
@@ -60,6 +63,14 @@ except ImportError: # pragma: no cover
SSLContext = object # type: ignore[misc,assignment]
+EMPTY_SCHEMA_SET = frozenset({""})
+HTTP_SCHEMA_SET = frozenset({"http", "https"})
+WS_SCHEMA_SET = frozenset({"ws", "wss"})
+
+HTTP_AND_EMPTY_SCHEMA_SET = HTTP_SCHEMA_SET | EMPTY_SCHEMA_SET
+HIGH_LEVEL_SCHEMA_SET = HTTP_AND_EMPTY_SCHEMA_SET | WS_SCHEMA_SET
+
+
__all__ = ("BaseConnector", "TCPConnector", "UnixConnector", "NamedPipeConnector")
@@ -208,6 +219,8 @@ class BaseConnector:
# abort transport after 2 seconds (cleanup broken connections)
_cleanup_closed_period = 2.0
+ allowed_protocol_schema_set = HIGH_LEVEL_SCHEMA_SET
+
def __init__(
self,
*,
@@ -229,7 +242,7 @@ class BaseConnector:
if keepalive_timeout is sentinel:
keepalive_timeout = 15.0
- loop = get_running_loop(loop)
+ loop = loop or asyncio.get_event_loop()
self._timeout_ceil_threshold = timeout_ceil_threshold
self._closed = False
@@ -240,9 +253,9 @@ class BaseConnector:
self._limit = limit
self._limit_per_host = limit_per_host
self._acquired: Set[ResponseHandler] = set()
- self._acquired_per_host: DefaultDict[
- ConnectionKey, Set[ResponseHandler]
- ] = defaultdict(set)
+ self._acquired_per_host: DefaultDict[ConnectionKey, Set[ResponseHandler]] = (
+ defaultdict(set)
+ )
self._keepalive_timeout = cast(float, keepalive_timeout)
self._force_close = force_close
@@ -691,14 +704,14 @@ class BaseConnector:
class _DNSCacheTable:
def __init__(self, ttl: Optional[float] = None) -> None:
- self._addrs_rr: Dict[Tuple[str, int], Tuple[Iterator[Dict[str, Any]], int]] = {}
+ self._addrs_rr: Dict[Tuple[str, int], Tuple[Iterator[ResolveResult], int]] = {}
self._timestamps: Dict[Tuple[str, int], float] = {}
self._ttl = ttl
def __contains__(self, host: object) -> bool:
return host in self._addrs_rr
- def add(self, key: Tuple[str, int], addrs: List[Dict[str, Any]]) -> None:
+ def add(self, key: Tuple[str, int], addrs: List[ResolveResult]) -> None:
self._addrs_rr[key] = (cycle(addrs), len(addrs))
if self._ttl is not None:
@@ -714,7 +727,7 @@ class _DNSCacheTable:
self._addrs_rr.clear()
self._timestamps.clear()
- def next_addrs(self, key: Tuple[str, int]) -> List[Dict[str, Any]]:
+ def next_addrs(self, key: Tuple[str, int]) -> List[ResolveResult]:
loop, length = self._addrs_rr[key]
addrs = list(islice(loop, length))
# Consume one more element to shift internal state of `cycle`
@@ -728,6 +741,35 @@ class _DNSCacheTable:
return self._timestamps[key] + self._ttl < monotonic()
+def _make_ssl_context(verified: bool) -> SSLContext:
+ """Create SSL context.
+
+ This method is not async-friendly and should be called from a thread
+ because it will load certificates from disk and do other blocking I/O.
+ """
+ if ssl is None:
+ # No ssl support
+ return None
+ if verified:
+ return ssl.create_default_context()
+ sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
+ sslcontext.options |= ssl.OP_NO_SSLv2
+ sslcontext.options |= ssl.OP_NO_SSLv3
+ sslcontext.check_hostname = False
+ sslcontext.verify_mode = ssl.CERT_NONE
+ sslcontext.options |= ssl.OP_NO_COMPRESSION
+ sslcontext.set_default_verify_paths()
+ return sslcontext
+
+
+# The default SSLContext objects are created at import time
+# since they do blocking I/O to load certificates from disk,
+# and imports should always be done before the event loop starts
+# or in a thread.
+_SSL_CONTEXT_VERIFIED = _make_ssl_context(True)
+_SSL_CONTEXT_UNVERIFIED = _make_ssl_context(False)
+
+
class TCPConnector(BaseConnector):
"""TCP connector.
@@ -735,7 +777,7 @@ class TCPConnector(BaseConnector):
fingerprint - Pass the binary sha256
digest of the expected certificate in DER format to verify
that the certificate the server presents matches. See also
- https://en.wikipedia.org/wiki/Transport_Layer_Security#Certificate_pinning
+ https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning
resolver - Enable DNS lookups and use this
resolver
use_dns_cache - Use memory cache for DNS lookups.
@@ -750,9 +792,15 @@ class TCPConnector(BaseConnector):
limit_per_host - Number of simultaneous connections to one host.
enable_cleanup_closed - Enables clean-up closed ssl transports.
Disabled by default.
+ happy_eyeballs_delay - This is the “Connection Attempt Delay”
+ as defined in RFC 8305. To disable
+ the happy eyeballs algorithm, set to None.
+ interleave - “First Address Family Count” as defined in RFC 8305
loop - Optional event loop.
"""
+ allowed_protocol_schema_set = HIGH_LEVEL_SCHEMA_SET | frozenset({"tcp"})
+
def __init__(
self,
*,
@@ -760,7 +808,7 @@ class TCPConnector(BaseConnector):
fingerprint: Optional[bytes] = None,
use_dns_cache: bool = True,
ttl_dns_cache: Optional[int] = 10,
- family: int = 0,
+ family: socket.AddressFamily = socket.AddressFamily.AF_UNSPEC,
ssl_context: Optional[SSLContext] = None,
ssl: Union[bool, Fingerprint, SSLContext] = True,
local_addr: Optional[Tuple[str, int]] = None,
@@ -772,6 +820,8 @@ class TCPConnector(BaseConnector):
enable_cleanup_closed: bool = False,
loop: Optional[asyncio.AbstractEventLoop] = None,
timeout_ceil_threshold: float = 5,
+ happy_eyeballs_delay: Optional[float] = 0.25,
+ interleave: Optional[int] = None,
):
super().__init__(
keepalive_timeout=keepalive_timeout,
@@ -792,13 +842,19 @@ class TCPConnector(BaseConnector):
self._cached_hosts = _DNSCacheTable(ttl=ttl_dns_cache)
self._throttle_dns_events: Dict[Tuple[str, int], EventResultOrError] = {}
self._family = family
- self._local_addr = local_addr
+ self._local_addr_infos = aiohappyeyeballs.addr_to_addr_infos(local_addr)
+ self._happy_eyeballs_delay = happy_eyeballs_delay
+ self._interleave = interleave
+ self._resolve_host_tasks: Set["asyncio.Task[List[ResolveResult]]"] = set()
def close(self) -> Awaitable[None]:
"""Close all ongoing DNS calls."""
for ev in self._throttle_dns_events.values():
ev.cancel()
+ for t in self._resolve_host_tasks:
+ t.cancel()
+
return super().close()
@property
@@ -823,8 +879,8 @@ class TCPConnector(BaseConnector):
self._cached_hosts.clear()
async def _resolve_host(
- self, host: str, port: int, traces: Optional[List["Trace"]] = None
- ) -> List[Dict[str, Any]]:
+ self, host: str, port: int, traces: Optional[Sequence["Trace"]] = None
+ ) -> List[ResolveResult]:
"""Resolve host and return list of addresses."""
if is_ip_address(host):
return [
@@ -876,11 +932,13 @@ class TCPConnector(BaseConnector):
resolved_host_task = asyncio.create_task(
self._resolve_host_with_throttle(key, host, port, traces)
)
+ self._resolve_host_tasks.add(resolved_host_task)
+ resolved_host_task.add_done_callback(self._resolve_host_tasks.discard)
try:
return await asyncio.shield(resolved_host_task)
except asyncio.CancelledError:
- def drop_exception(fut: "asyncio.Future[List[Dict[str, Any]]]") -> None:
+ def drop_exception(fut: "asyncio.Future[List[ResolveResult]]") -> None:
with suppress(Exception, asyncio.CancelledError):
fut.result()
@@ -892,8 +950,8 @@ class TCPConnector(BaseConnector):
key: Tuple[str, int],
host: str,
port: int,
- traces: Optional[List["Trace"]],
- ) -> List[Dict[str, Any]]:
+ traces: Optional[Sequence["Trace"]],
+ ) -> List[ResolveResult]:
"""Resolve host with a dns events throttle."""
if key in self._throttle_dns_events:
# get event early, before any await (#4014)
@@ -945,29 +1003,6 @@ class TCPConnector(BaseConnector):
return proto
- @staticmethod
- @functools.lru_cache(None)
- def _make_ssl_context(verified: bool) -> SSLContext:
- if verified:
- return ssl.create_default_context()
- else:
- sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
- sslcontext.options |= ssl.OP_NO_SSLv2
- sslcontext.options |= ssl.OP_NO_SSLv3
- sslcontext.check_hostname = False
- sslcontext.verify_mode = ssl.CERT_NONE
- try:
- sslcontext.options |= ssl.OP_NO_COMPRESSION
- except AttributeError as attr_err:
- warnings.warn(
- "{!s}: The Python interpreter is compiled "
- "against OpenSSL < 1.0.0. Ref: "
- "https://docs.python.org/3/library/ssl.html"
- "#ssl.OP_NO_COMPRESSION".format(attr_err),
- )
- sslcontext.set_default_verify_paths()
- return sslcontext
-
def _get_ssl_context(self, req: ClientRequest) -> Optional[SSLContext]:
"""Logic to get the correct SSL context
@@ -982,25 +1017,25 @@ class TCPConnector(BaseConnector):
3. if verify_ssl is False in req, generate a SSL context that
won't verify
"""
- if req.is_ssl():
- if ssl is None: # pragma: no cover
- raise RuntimeError("SSL is not supported.")
- sslcontext = req.ssl
- if isinstance(sslcontext, ssl.SSLContext):
- return sslcontext
- if sslcontext is not True:
- # not verified or fingerprinted
- return self._make_ssl_context(False)
- sslcontext = self._ssl
- if isinstance(sslcontext, ssl.SSLContext):
- return sslcontext
- if sslcontext is not True:
- # not verified or fingerprinted
- return self._make_ssl_context(False)
- return self._make_ssl_context(True)
- else:
+ if not req.is_ssl():
return None
+ if ssl is None: # pragma: no cover
+ raise RuntimeError("SSL is not supported.")
+ sslcontext = req.ssl
+ if isinstance(sslcontext, ssl.SSLContext):
+ return sslcontext
+ if sslcontext is not True:
+ # not verified or fingerprinted
+ return _SSL_CONTEXT_UNVERIFIED
+ sslcontext = self._ssl
+ if isinstance(sslcontext, ssl.SSLContext):
+ return sslcontext
+ if sslcontext is not True:
+ # not verified or fingerprinted
+ return _SSL_CONTEXT_UNVERIFIED
+ return _SSL_CONTEXT_VERIFIED
+
def _get_fingerprint(self, req: ClientRequest) -> Optional["Fingerprint"]:
ret = req.ssl
if isinstance(ret, Fingerprint):
@@ -1013,6 +1048,36 @@ class TCPConnector(BaseConnector):
async def _wrap_create_connection(
self,
*args: Any,
+ addr_infos: List[aiohappyeyeballs.AddrInfoType],
+ req: ClientRequest,
+ timeout: "ClientTimeout",
+ client_error: Type[Exception] = ClientConnectorError,
+ **kwargs: Any,
+ ) -> Tuple[asyncio.Transport, ResponseHandler]:
+ try:
+ async with ceil_timeout(
+ timeout.sock_connect, ceil_threshold=timeout.ceil_threshold
+ ):
+ sock = await aiohappyeyeballs.start_connection(
+ addr_infos=addr_infos,
+ local_addr_infos=self._local_addr_infos,
+ happy_eyeballs_delay=self._happy_eyeballs_delay,
+ interleave=self._interleave,
+ loop=self._loop,
+ )
+ return await self._loop.create_connection(*args, **kwargs, sock=sock)
+ except cert_errors as exc:
+ raise ClientConnectorCertificateError(req.connection_key, exc) from exc
+ except ssl_errors as exc:
+ raise ClientConnectorSSLError(req.connection_key, exc) from exc
+ except OSError as exc:
+ if exc.errno is None and isinstance(exc, asyncio.TimeoutError):
+ raise
+ raise client_error(req.connection_key, exc) from exc
+
+ async def _wrap_existing_connection(
+ self,
+ *args: Any,
req: ClientRequest,
timeout: "ClientTimeout",
client_error: Type[Exception] = ClientConnectorError,
@@ -1121,13 +1186,11 @@ class TCPConnector(BaseConnector):
) -> Tuple[asyncio.BaseTransport, ResponseHandler]:
"""Wrap the raw TCP transport with TLS."""
tls_proto = self._factory() # Create a brand new proto for TLS
-
- # Safety of the `cast()` call here is based on the fact that
- # internally `_get_ssl_context()` only returns `None` when
- # `req.is_ssl()` evaluates to `False` which is never gonna happen
- # in this code path. Of course, it's rather fragile
- # maintainability-wise but this is to be solved separately.
- sslcontext = cast(ssl.SSLContext, self._get_ssl_context(req))
+ sslcontext = self._get_ssl_context(req)
+ if TYPE_CHECKING:
+ # _start_tls_connection is unreachable in the current code path
+ # if sslcontext is None.
+ assert sslcontext is not None
try:
async with ceil_timeout(
@@ -1176,6 +1239,27 @@ class TCPConnector(BaseConnector):
return tls_transport, tls_proto
+ def _convert_hosts_to_addr_infos(
+ self, hosts: List[ResolveResult]
+ ) -> List[aiohappyeyeballs.AddrInfoType]:
+ """Converts the list of hosts to a list of addr_infos.
+
+ The list of hosts is the result of a DNS lookup. The list of
+ addr_infos is the result of a call to `socket.getaddrinfo()`.
+ """
+ addr_infos: List[aiohappyeyeballs.AddrInfoType] = []
+ for hinfo in hosts:
+ host = hinfo["host"]
+ is_ipv6 = ":" in host
+ family = socket.AF_INET6 if is_ipv6 else socket.AF_INET
+ if self._family and self._family != family:
+ continue
+ addr = (host, hinfo["port"], 0, 0) if is_ipv6 else (host, hinfo["port"])
+ addr_infos.append(
+ (family, socket.SOCK_STREAM, socket.IPPROTO_TCP, "", addr)
+ )
+ return addr_infos
+
async def _create_direct_connection(
self,
req: ClientRequest,
@@ -1209,36 +1293,27 @@ class TCPConnector(BaseConnector):
raise ClientConnectorError(req.connection_key, exc) from exc
last_exc: Optional[Exception] = None
-
- for hinfo in hosts:
- host = hinfo["host"]
- port = hinfo["port"]
-
+ addr_infos = self._convert_hosts_to_addr_infos(hosts)
+ while addr_infos:
# Strip trailing dots, certificates contain FQDN without dots.
# See https://github.com/aio-libs/aiohttp/issues/3636
server_hostname = (
- (req.server_hostname or hinfo["hostname"]).rstrip(".")
- if sslcontext
- else None
+ (req.server_hostname or host).rstrip(".") if sslcontext else None
)
try:
transp, proto = await self._wrap_create_connection(
self._factory,
- host,
- port,
timeout=timeout,
ssl=sslcontext,
- family=hinfo["family"],
- proto=hinfo["proto"],
- flags=hinfo["flags"],
+ addr_infos=addr_infos,
server_hostname=server_hostname,
- local_addr=self._local_addr,
req=req,
client_error=client_error,
)
except ClientConnectorError as exc:
last_exc = exc
+ aiohappyeyeballs.pop_addr_infos_interleave(addr_infos, self._interleave)
continue
if req.is_ssl() and fingerprint:
@@ -1249,6 +1324,10 @@ class TCPConnector(BaseConnector):
if not self._cleanup_closed_disabled:
self._cleanup_closed_transports.append(transp)
last_exc = exc
+ # Remove the bad peer from the list of addr_infos
+ sock: socket.socket = transp.get_extra_info("socket")
+ bad_peer = sock.getpeername()
+ aiohappyeyeballs.remove_addr_infos(addr_infos, bad_peer)
continue
return transp, proto
@@ -1367,7 +1446,7 @@ class TCPConnector(BaseConnector):
if not runtime_has_start_tls:
# HTTP proxy with support for upgrade to HTTPS
sslcontext = self._get_ssl_context(req)
- return await self._wrap_create_connection(
+ return await self._wrap_existing_connection(
self._factory,
timeout=timeout,
ssl=sslcontext,
@@ -1401,6 +1480,8 @@ class UnixConnector(BaseConnector):
loop - Optional event loop.
"""
+ allowed_protocol_schema_set = HIGH_LEVEL_SCHEMA_SET | frozenset({"unix"})
+
def __init__(
self,
path: str,
@@ -1457,6 +1538,8 @@ class NamedPipeConnector(BaseConnector):
loop - Optional event loop.
"""
+ allowed_protocol_schema_set = HIGH_LEVEL_SCHEMA_SET | frozenset({"npipe"})
+
def __init__(
self,
path: str,
diff --git a/contrib/python/aiohttp/aiohttp/cookiejar.py b/contrib/python/aiohttp/aiohttp/cookiejar.py
index a348f112cb5..c78d5fa7e72 100644
--- a/contrib/python/aiohttp/aiohttp/cookiejar.py
+++ b/contrib/python/aiohttp/aiohttp/cookiejar.py
@@ -2,6 +2,8 @@ import asyncio
import calendar
import contextlib
import datetime
+import heapq
+import itertools
import os # noqa
import pathlib
import pickle
@@ -9,8 +11,7 @@ import re
import time
from collections import defaultdict
from http.cookies import BaseCookie, Morsel, SimpleCookie
-from math import ceil
-from typing import ( # noqa
+from typing import (
DefaultDict,
Dict,
Iterable,
@@ -35,6 +36,15 @@ __all__ = ("CookieJar", "DummyCookieJar")
CookieItem = Union[str, "Morsel[str]"]
+# We cache these string methods here as their use is in performance critical code.
+_FORMAT_PATH = "{}/{}".format
+_FORMAT_DOMAIN_REVERSED = "{1}.{0}".format
+
+# The minimum number of scheduled cookie expirations before we start cleaning up
+# the expiration heap. This is a performance optimization to avoid cleaning up the
+# heap too often when there are only a few scheduled expirations.
+_MIN_SCHEDULED_COOKIE_EXPIRATION = 100
+
class CookieJar(AbstractCookieJar):
"""Implements cookie storage adhering to RFC 6265."""
@@ -85,6 +95,9 @@ class CookieJar(AbstractCookieJar):
self._cookies: DefaultDict[Tuple[str, str], SimpleCookie] = defaultdict(
SimpleCookie
)
+ self._morsel_cache: DefaultDict[Tuple[str, str], Dict[str, Morsel[str]]] = (
+ defaultdict(dict)
+ )
self._host_only_cookies: Set[Tuple[str, str]] = set()
self._unsafe = unsafe
self._quote_cookie = quote_cookie
@@ -100,7 +113,7 @@ class CookieJar(AbstractCookieJar):
for url in treat_as_secure_origin
]
self._treat_as_secure_origin = treat_as_secure_origin
- self._next_expiration: float = ceil(time.time())
+ self._expire_heap: List[Tuple[float, Tuple[str, str, str]]] = []
self._expirations: Dict[Tuple[str, str, str], float] = {}
def save(self, file_path: PathLike) -> None:
@@ -115,34 +128,26 @@ class CookieJar(AbstractCookieJar):
def clear(self, predicate: Optional[ClearCookiePredicate] = None) -> None:
if predicate is None:
- self._next_expiration = ceil(time.time())
+ self._expire_heap.clear()
self._cookies.clear()
+ self._morsel_cache.clear()
self._host_only_cookies.clear()
self._expirations.clear()
return
- to_del = []
now = time.time()
- for (domain, path), cookie in self._cookies.items():
- for name, morsel in cookie.items():
- key = (domain, path, name)
- if (
- key in self._expirations and self._expirations[key] <= now
- ) or predicate(morsel):
- to_del.append(key)
-
- for domain, path, name in to_del:
- self._host_only_cookies.discard((domain, name))
- key = (domain, path, name)
- if key in self._expirations:
- del self._expirations[(domain, path, name)]
- self._cookies[(domain, path)].pop(name, None)
-
- self._next_expiration = (
- min(*self._expirations.values(), self.SUB_MAX_TIME) + 1
- if self._expirations
- else self.MAX_TIME
- )
+ to_del = [
+ key
+ for (domain, path), cookie in self._cookies.items()
+ for name, morsel in cookie.items()
+ if (
+ (key := (domain, path, name)) in self._expirations
+ and self._expirations[key] <= now
+ )
+ or predicate(morsel)
+ ]
+ if to_del:
+ self._delete_cookies(to_del)
def clear_domain(self, domain: str) -> None:
self.clear(lambda x: self._is_domain_match(domain, x["domain"]))
@@ -153,14 +158,70 @@ class CookieJar(AbstractCookieJar):
yield from val.values()
def __len__(self) -> int:
- return sum(1 for i in self)
+ """Return number of cookies.
+
+ This function does not iterate self to avoid unnecessary expiration
+ checks.
+ """
+ return sum(len(cookie.values()) for cookie in self._cookies.values())
def _do_expiration(self) -> None:
- self.clear(lambda x: False)
+ """Remove expired cookies."""
+ if not (expire_heap_len := len(self._expire_heap)):
+ return
+
+ # If the expiration heap grows larger than the number expirations
+ # times two, we clean it up to avoid keeping expired entries in
+ # the heap and consuming memory. We guard this with a minimum
+ # threshold to avoid cleaning up the heap too often when there are
+ # only a few scheduled expirations.
+ if (
+ expire_heap_len > _MIN_SCHEDULED_COOKIE_EXPIRATION
+ and expire_heap_len > len(self._expirations) * 2
+ ):
+ # Remove any expired entries from the expiration heap
+ # that do not match the expiration time in the expirations
+ # as it means the cookie has been re-added to the heap
+ # with a different expiration time.
+ self._expire_heap = [
+ entry
+ for entry in self._expire_heap
+ if self._expirations.get(entry[1]) == entry[0]
+ ]
+ heapq.heapify(self._expire_heap)
+
+ now = time.time()
+ to_del: List[Tuple[str, str, str]] = []
+ # Find any expired cookies and add them to the to-delete list
+ while self._expire_heap:
+ when, cookie_key = self._expire_heap[0]
+ if when > now:
+ break
+ heapq.heappop(self._expire_heap)
+ # Check if the cookie hasn't been re-added to the heap
+ # with a different expiration time as it will be removed
+ # later when it reaches the top of the heap and its
+ # expiration time is met.
+ if self._expirations.get(cookie_key) == when:
+ to_del.append(cookie_key)
+
+ if to_del:
+ self._delete_cookies(to_del)
+
+ def _delete_cookies(self, to_del: List[Tuple[str, str, str]]) -> None:
+ for domain, path, name in to_del:
+ self._host_only_cookies.discard((domain, name))
+ self._cookies[(domain, path)].pop(name, None)
+ self._morsel_cache[(domain, path)].pop(name, None)
+ self._expirations.pop((domain, path, name), None)
def _expire_cookie(self, when: float, domain: str, path: str, name: str) -> None:
- self._next_expiration = min(self._next_expiration, when)
- self._expirations[(domain, path, name)] = when
+ cookie_key = (domain, path, name)
+ if self._expirations.get(cookie_key) == when:
+ # Avoid adding duplicates to the heap
+ return
+ heapq.heappush(self._expire_heap, (when, cookie_key))
+ self._expirations[cookie_key] = when
def update_cookies(self, cookies: LooseCookies, response_url: URL = URL()) -> None:
"""Update cookies."""
@@ -182,7 +243,7 @@ class CookieJar(AbstractCookieJar):
domain = cookie["domain"]
# ignore domains with trailing dots
- if domain.endswith("."):
+ if domain and domain[-1] == ".":
domain = ""
del cookie["domain"]
@@ -192,7 +253,7 @@ class CookieJar(AbstractCookieJar):
self._host_only_cookies.add((hostname, name))
domain = cookie["domain"] = hostname
- if domain.startswith("."):
+ if domain and domain[0] == ".":
# Remove leading dot
domain = domain[1:]
cookie["domain"] = domain
@@ -202,7 +263,7 @@ class CookieJar(AbstractCookieJar):
continue
path = cookie["path"]
- if not path or not path.startswith("/"):
+ if not path or path[0] != "/":
# Set the cookie's path to the response path
path = response_url.path
if not path.startswith("/"):
@@ -211,9 +272,9 @@ class CookieJar(AbstractCookieJar):
# Cut everything from the last slash to the end
path = "/" + path[1 : path.rfind("/")]
cookie["path"] = path
+ path = path.rstrip("/")
- max_age = cookie["max-age"]
- if max_age:
+ if max_age := cookie["max-age"]:
try:
delta_seconds = int(max_age)
max_age_expiration = min(time.time() + delta_seconds, self.MAX_TIME)
@@ -221,16 +282,18 @@ class CookieJar(AbstractCookieJar):
except ValueError:
cookie["max-age"] = ""
- else:
- expires = cookie["expires"]
- if expires:
- expire_time = self._parse_date(expires)
- if expire_time:
- self._expire_cookie(expire_time, domain, path, name)
- else:
- cookie["expires"] = ""
+ elif expires := cookie["expires"]:
+ if expire_time := self._parse_date(expires):
+ self._expire_cookie(expire_time, domain, path, name)
+ else:
+ cookie["expires"] = ""
- self._cookies[(domain, path)][name] = cookie
+ key = (domain, path)
+ if self._cookies[key].get(name) != cookie:
+ # Don't blow away the cache if the same
+ # cookie gets set again
+ self._cookies[key][name] = cookie
+ self._morsel_cache[key].pop(name, None)
self._do_expiration()
@@ -256,36 +319,52 @@ class CookieJar(AbstractCookieJar):
request_origin = request_url.origin()
is_not_secure = request_origin not in self._treat_as_secure_origin
- # Point 2: https://www.rfc-editor.org/rfc/rfc6265.html#section-5.4
- for cookie in sorted(self, key=lambda c: len(c["path"])):
- name = cookie.key
- domain = cookie["domain"]
+ # Send shared cookie
+ for c in self._cookies[("", "")].values():
+ filtered[c.key] = c.value
- # Send shared cookies
- if not domain:
- filtered[name] = cookie.value
- continue
+ if is_ip_address(hostname):
+ if not self._unsafe:
+ return filtered
+ domains: Iterable[str] = (hostname,)
+ else:
+ # Get all the subdomains that might match a cookie (e.g. "foo.bar.com", "bar.com", "com")
+ domains = itertools.accumulate(
+ reversed(hostname.split(".")), _FORMAT_DOMAIN_REVERSED
+ )
- if not self._unsafe and is_ip_address(hostname):
- continue
+ # Get all the path prefixes that might match a cookie (e.g. "", "/foo", "/foo/bar")
+ paths = itertools.accumulate(request_url.path.split("/"), _FORMAT_PATH)
+ # Create every combination of (domain, path) pairs.
+ pairs = itertools.product(domains, paths)
+
+ path_len = len(request_url.path)
+ # Point 2: https://www.rfc-editor.org/rfc/rfc6265.html#section-5.4
+ for p in pairs:
+ for name, cookie in self._cookies[p].items():
+ domain = cookie["domain"]
- if (domain, name) in self._host_only_cookies:
- if domain != hostname:
+ if (domain, name) in self._host_only_cookies and domain != hostname:
continue
- elif not self._is_domain_match(domain, hostname):
- continue
- if not self._is_path_match(request_url.path, cookie["path"]):
- continue
+ # Skip edge case when the cookie has a trailing slash but request doesn't.
+ if len(cookie["path"]) > path_len:
+ continue
- if is_not_secure and cookie["secure"]:
- continue
+ if is_not_secure and cookie["secure"]:
+ continue
- # It's critical we use the Morsel so the coded_value
- # (based on cookie version) is preserved
- mrsl_val = cast("Morsel[str]", cookie.get(cookie.key, Morsel()))
- mrsl_val.set(cookie.key, cookie.value, cookie.coded_value)
- filtered[name] = mrsl_val
+ # We already built the Morsel so reuse it here
+ if name in self._morsel_cache[p]:
+ filtered[name] = self._morsel_cache[p][name]
+ continue
+
+ # It's critical we use the Morsel so the coded_value
+ # (based on cookie version) is preserved
+ mrsl_val = cast("Morsel[str]", cookie.get(cookie.key, Morsel()))
+ mrsl_val.set(cookie.key, cookie.value, cookie.coded_value)
+ self._morsel_cache[p][name] = mrsl_val
+ filtered[name] = mrsl_val
return filtered
@@ -305,25 +384,6 @@ class CookieJar(AbstractCookieJar):
return not is_ip_address(hostname)
- @staticmethod
- def _is_path_match(req_path: str, cookie_path: str) -> bool:
- """Implements path matching adhering to RFC 6265."""
- if not req_path.startswith("/"):
- req_path = "/"
-
- if req_path == cookie_path:
- return True
-
- if not req_path.startswith(cookie_path):
- return False
-
- if cookie_path.endswith("/"):
- return True
-
- non_matching = req_path[len(cookie_path) :]
-
- return non_matching.startswith("/")
-
@classmethod
def _parse_date(cls, date_str: str) -> Optional[int]:
"""Implements date string parsing adhering to RFC 6265."""
diff --git a/contrib/python/aiohttp/aiohttp/helpers.py b/contrib/python/aiohttp/aiohttp/helpers.py
index 284033b7a04..40705b16d71 100644
--- a/contrib/python/aiohttp/aiohttp/helpers.py
+++ b/contrib/python/aiohttp/aiohttp/helpers.py
@@ -14,7 +14,6 @@ import platform
import re
import sys
import time
-import warnings
import weakref
from collections import namedtuple
from contextlib import suppress
@@ -35,7 +34,6 @@ from typing import (
List,
Mapping,
Optional,
- Pattern,
Protocol,
Tuple,
Type,
@@ -52,7 +50,7 @@ from multidict import MultiDict, MultiDictProxy, MultiMapping
from yarl import URL
from . import hdrs
-from .log import client_logger, internal_logger
+from .log import client_logger
if sys.version_info >= (3, 11):
import asyncio as async_timeout
@@ -165,9 +163,9 @@ class BasicAuth(namedtuple("BasicAuth", ["login", "password", "encoding"])):
"""Create BasicAuth from url."""
if not isinstance(url, URL):
raise TypeError("url should be yarl.URL instance")
- if url.user is None:
+ if url.user is None and url.password is None:
return None
- return cls(url.user, url.password or "", encoding=encoding)
+ return cls(url.user or "", url.password or "", encoding=encoding)
def encode(self) -> str:
"""Encode credentials."""
@@ -287,38 +285,6 @@ def proxies_from_env() -> Dict[str, ProxyInfo]:
return ret
-def current_task(
- loop: Optional[asyncio.AbstractEventLoop] = None,
-) -> "Optional[asyncio.Task[Any]]":
- return asyncio.current_task(loop=loop)
-
-
-def get_running_loop(
- loop: Optional[asyncio.AbstractEventLoop] = None,
-) -> asyncio.AbstractEventLoop:
- if loop is None:
- loop = asyncio.get_event_loop()
- if not loop.is_running():
- warnings.warn(
- "The object should be created within an async function",
- DeprecationWarning,
- stacklevel=3,
- )
- if loop.get_debug():
- internal_logger.warning(
- "The object should be created within an async function", stack_info=True
- )
- return loop
-
-
-def isasyncgenfunction(obj: Any) -> bool:
- func = getattr(inspect, "isasyncgenfunction", None)
- if func is not None:
- return func(obj) # type: ignore[no-any-return]
- else:
- return False
-
-
def get_env_proxy_for_url(url: URL) -> Tuple[URL, Optional[BasicAuth]]:
"""Get a permitted proxy for the given URL from the env."""
if url.host is not None and proxy_bypass(url.host):
@@ -504,44 +470,51 @@ try:
except ImportError:
pass
-_ipv4_pattern = (
- r"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}"
- r"(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
-)
-_ipv6_pattern = (
- r"^(?:(?:(?:[A-F0-9]{1,4}:){6}|(?=(?:[A-F0-9]{0,4}:){0,6}"
- r"(?:[0-9]{1,3}\.){3}[0-9]{1,3}$)(([0-9A-F]{1,4}:){0,5}|:)"
- r"((:[0-9A-F]{1,4}){1,5}:|:)|::(?:[A-F0-9]{1,4}:){5})"
- r"(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}"
- r"(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-F0-9]{1,4}:){7}"
- r"[A-F0-9]{1,4}|(?=(?:[A-F0-9]{0,4}:){0,7}[A-F0-9]{0,4}$)"
- r"(([0-9A-F]{1,4}:){1,7}|:)((:[0-9A-F]{1,4}){1,7}|:)|(?:[A-F0-9]{1,4}:){7}"
- r":|:(:[A-F0-9]{1,4}){7})$"
-)
-_ipv4_regex = re.compile(_ipv4_pattern)
-_ipv6_regex = re.compile(_ipv6_pattern, flags=re.IGNORECASE)
-_ipv4_regexb = re.compile(_ipv4_pattern.encode("ascii"))
-_ipv6_regexb = re.compile(_ipv6_pattern.encode("ascii"), flags=re.IGNORECASE)
+def is_ipv4_address(host: Optional[Union[str, bytes]]) -> bool:
+ """Check if host looks like an IPv4 address.
-def _is_ip_address(
- regex: Pattern[str], regexb: Pattern[bytes], host: Optional[Union[str, bytes]]
-) -> bool:
- if host is None:
+ This function does not validate that the format is correct, only that
+ the host is a str or bytes, and its all numeric.
+
+ This check is only meant as a heuristic to ensure that
+ a host is not a domain name.
+ """
+ if not host:
return False
+ # For a host to be an ipv4 address, it must be all numeric.
if isinstance(host, str):
- return bool(regex.match(host))
- elif isinstance(host, (bytes, bytearray, memoryview)):
- return bool(regexb.match(host))
- else:
- raise TypeError(f"{host} [{type(host)}] is not a str or bytes")
+ return host.replace(".", "").isdigit()
+ if isinstance(host, (bytes, bytearray, memoryview)):
+ return host.decode("ascii").replace(".", "").isdigit()
+ raise TypeError(f"{host} [{type(host)}] is not a str or bytes")
+
+def is_ipv6_address(host: Optional[Union[str, bytes]]) -> bool:
+ """Check if host looks like an IPv6 address.
-is_ipv4_address = functools.partial(_is_ip_address, _ipv4_regex, _ipv4_regexb)
-is_ipv6_address = functools.partial(_is_ip_address, _ipv6_regex, _ipv6_regexb)
+ This function does not validate that the format is correct, only that
+ the host contains a colon and that it is a str or bytes.
+
+ This check is only meant as a heuristic to ensure that
+ a host is not a domain name.
+ """
+ if not host:
+ return False
+ # The host must contain a colon to be an IPv6 address.
+ if isinstance(host, str):
+ return ":" in host
+ if isinstance(host, (bytes, bytearray, memoryview)):
+ return b":" in host
+ raise TypeError(f"{host} [{type(host)}] is not a str or bytes")
def is_ip_address(host: Optional[Union[str, bytes, bytearray, memoryview]]) -> bool:
+ """Check if host looks like an IP Address.
+
+ This check is only meant as a heuristic to ensure that
+ a host is not a domain name.
+ """
return is_ipv4_address(host) or is_ipv6_address(host)
@@ -619,12 +592,23 @@ def call_later(
loop: asyncio.AbstractEventLoop,
timeout_ceil_threshold: float = 5,
) -> Optional[asyncio.TimerHandle]:
- if timeout is not None and timeout > 0:
- when = loop.time() + timeout
- if timeout > timeout_ceil_threshold:
- when = ceil(when)
- return loop.call_at(when, cb)
- return None
+ if timeout is None or timeout <= 0:
+ return None
+ now = loop.time()
+ when = calculate_timeout_when(now, timeout, timeout_ceil_threshold)
+ return loop.call_at(when, cb)
+
+
+def calculate_timeout_when(
+ loop_time: float,
+ timeout: float,
+ timeout_ceiling_threshold: float,
+) -> float:
+ """Calculate when to execute a timeout."""
+ when = loop_time + timeout
+ if timeout > timeout_ceiling_threshold:
+ return ceil(when)
+ return when
class TimeoutHandle:
@@ -651,7 +635,7 @@ class TimeoutHandle:
def close(self) -> None:
self._callbacks.clear()
- def start(self) -> Optional[asyncio.Handle]:
+ def start(self) -> Optional[asyncio.TimerHandle]:
timeout = self._timeout
if timeout is not None and timeout > 0:
when = self._loop.time() + timeout
@@ -709,7 +693,7 @@ class TimerContext(BaseTimerContext):
raise asyncio.TimeoutError from None
def __enter__(self) -> BaseTimerContext:
- task = current_task(loop=self._loop)
+ task = asyncio.current_task(loop=self._loop)
if task is None:
raise RuntimeError(
@@ -749,7 +733,7 @@ def ceil_timeout(
if delay is None or delay <= 0:
return async_timeout.timeout(None)
- loop = get_running_loop()
+ loop = asyncio.get_running_loop()
now = loop.time()
when = now + delay
if delay > ceil_threshold:
@@ -784,7 +768,8 @@ class HeadersMixin:
raw = self._headers.get(hdrs.CONTENT_TYPE)
if self._stored_content_type != raw:
self._parse_content_type(raw)
- return self._content_type # type: ignore[return-value]
+ assert self._content_type is not None
+ return self._content_type
@property
def charset(self) -> Optional[str]:
@@ -792,7 +777,8 @@ class HeadersMixin:
raw = self._headers.get(hdrs.CONTENT_TYPE)
if self._stored_content_type != raw:
self._parse_content_type(raw)
- return self._content_dict.get("charset") # type: ignore[union-attr]
+ assert self._content_dict is not None
+ return self._content_dict.get("charset")
@property
def content_length(self) -> Optional[int]:
@@ -818,8 +804,7 @@ class ErrorableProtocol(Protocol):
self,
exc: BaseException,
exc_cause: BaseException = ...,
- ) -> None:
- ... # pragma: no cover
+ ) -> None: ... # pragma: no cover
def set_exception(
@@ -905,12 +890,10 @@ class ChainMapProxy(Mapping[Union[str, AppKey[Any]], Any]):
)
@overload # type: ignore[override]
- def __getitem__(self, key: AppKey[_T]) -> _T:
- ...
+ def __getitem__(self, key: AppKey[_T]) -> _T: ...
@overload
- def __getitem__(self, key: str) -> Any:
- ...
+ def __getitem__(self, key: str) -> Any: ...
def __getitem__(self, key: Union[str, AppKey[_T]]) -> Any:
for mapping in self._maps:
@@ -921,16 +904,13 @@ class ChainMapProxy(Mapping[Union[str, AppKey[Any]], Any]):
raise KeyError(key)
@overload # type: ignore[override]
- def get(self, key: AppKey[_T], default: _S) -> Union[_T, _S]:
- ...
+ def get(self, key: AppKey[_T], default: _S) -> Union[_T, _S]: ...
@overload
- def get(self, key: AppKey[_T], default: None = ...) -> Optional[_T]:
- ...
+ def get(self, key: AppKey[_T], default: None = ...) -> Optional[_T]: ...
@overload
- def get(self, key: str, default: Any = ...) -> Any:
- ...
+ def get(self, key: str, default: Any = ...) -> Any: ...
def get(self, key: Union[str, AppKey[_T]], default: Any = None) -> Any:
try:
@@ -993,6 +973,7 @@ def parse_http_date(date_str: Optional[str]) -> Optional[datetime.datetime]:
return None
def must_be_empty_body(method: str, code: int) -> bool:
"""Check if a request must return an empty body."""
return (
diff --git a/contrib/python/aiohttp/aiohttp/http_exceptions.py b/contrib/python/aiohttp/aiohttp/http_exceptions.py
index 72eac3a3cac..c43ee0d9659 100644
--- a/contrib/python/aiohttp/aiohttp/http_exceptions.py
+++ b/contrib/python/aiohttp/aiohttp/http_exceptions.py
@@ -1,6 +1,5 @@
"""Low-level http related exceptions."""
-
from textwrap import indent
from typing import Optional, Union
diff --git a/contrib/python/aiohttp/aiohttp/http_parser.py b/contrib/python/aiohttp/aiohttp/http_parser.py
index 013511917e8..686a2d02e28 100644
--- a/contrib/python/aiohttp/aiohttp/http_parser.py
+++ b/contrib/python/aiohttp/aiohttp/http_parser.py
@@ -47,7 +47,6 @@ from .http_exceptions import (
TransferEncodingError,
)
from .http_writer import HttpVersion, HttpVersion10
-from .log import internal_logger
from .streams import EMPTY_PAYLOAD, StreamReader
from .typedefs import RawHeaders
@@ -249,7 +248,6 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
timer: Optional[BaseTimerContext] = None,
code: Optional[int] = None,
method: Optional[str] = None,
- readall: bool = False,
payload_exception: Optional[Type[BaseException]] = None,
response_with_body: bool = True,
read_until_eof: bool = False,
@@ -263,7 +261,6 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
self.timer = timer
self.code = code
self.method = method
- self.readall = readall
self.payload_exception = payload_exception
self.response_with_body = response_with_body
self.read_until_eof = read_until_eof
@@ -280,8 +277,10 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
)
@abc.abstractmethod
- def parse_message(self, lines: List[bytes]) -> _MsgT:
- pass
+ def parse_message(self, lines: List[bytes]) -> _MsgT: ...
+
+ @abc.abstractmethod
+ def _is_chunked_te(self, te: str) -> bool: ...
def feed_eof(self) -> Optional[_MsgT]:
if self._payload_parser is not None:
@@ -318,6 +317,7 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
start_pos = 0
loop = self.loop
+ should_close = False
while start_pos < data_len:
# read HTTP message (request/response line + headers), \r\n\r\n
@@ -330,6 +330,9 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
continue
if pos >= start_pos:
+ if should_close:
+ raise BadHttpMessage("Data after `Connection: close`")
+
# line found
line = data[start_pos:pos]
if SEP == b"\n": # For lax response parsing
@@ -393,7 +396,6 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
method=method,
compression=msg.compression,
code=self.code,
- readall=self.readall,
response_with_body=self.response_with_body,
auto_decompress=self._auto_decompress,
lax=self.lax,
@@ -413,7 +415,6 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
payload,
method=msg.method,
compression=msg.compression,
- readall=True,
auto_decompress=self._auto_decompress,
lax=self.lax,
)
@@ -431,7 +432,6 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
method=method,
compression=msg.compression,
code=self.code,
- readall=True,
response_with_body=self.response_with_body,
auto_decompress=self._auto_decompress,
lax=self.lax,
@@ -442,6 +442,7 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
payload = EMPTY_PAYLOAD
messages.append((msg, payload))
+ should_close = msg.should_close
else:
self._tail = data[start_pos:]
data = EMPTY
@@ -543,10 +544,8 @@ class HttpParser(abc.ABC, Generic[_MsgT]):
# chunking
te = headers.get(hdrs.TRANSFER_ENCODING)
if te is not None:
- if "chunked" == te.lower():
+ if self._is_chunked_te(te):
chunked = True
- else:
- raise BadHttpMessage("Request has invalid `Transfer-Encoding`")
if hdrs.CONTENT_LENGTH in headers:
raise BadHttpMessage(
@@ -656,6 +655,12 @@ class HttpRequestParser(HttpParser[RawRequestMessage]):
url,
)
+ def _is_chunked_te(self, te: str) -> bool:
+ if te.rsplit(",", maxsplit=1)[-1].strip(" \t").lower() == "chunked":
+ return True
+ # https://www.rfc-editor.org/rfc/rfc9112#section-6.3-2.4.3
+ raise BadHttpMessage("Request has invalid `Transfer-Encoding`")
+
class HttpResponseParser(HttpParser[RawResponseMessage]):
"""Read response status line and headers.
@@ -741,6 +746,10 @@ class HttpResponseParser(HttpParser[RawResponseMessage]):
chunked,
)
+ def _is_chunked_te(self, te: str) -> bool:
+ # https://www.rfc-editor.org/rfc/rfc9112#section-6.3-2.4.2
+ return te.rsplit(",", maxsplit=1)[-1].strip(" \t").lower() == "chunked"
+
class HttpPayloadParser:
def __init__(
@@ -751,13 +760,12 @@ class HttpPayloadParser:
compression: Optional[str] = None,
code: Optional[int] = None,
method: Optional[str] = None,
- readall: bool = False,
response_with_body: bool = True,
auto_decompress: bool = True,
lax: bool = False,
) -> None:
self._length = 0
- self._type = ParseState.PARSE_NONE
+ self._type = ParseState.PARSE_UNTIL_EOF
self._chunk = ChunkState.PARSE_CHUNKED_SIZE
self._chunk_size = 0
self._chunk_tail = b""
@@ -779,7 +787,6 @@ class HttpPayloadParser:
self._type = ParseState.PARSE_NONE
real_payload.feed_eof()
self.done = True
-
elif chunked:
self._type = ParseState.PARSE_CHUNKED
elif length is not None:
@@ -788,16 +795,6 @@ class HttpPayloadParser:
if self._length == 0:
real_payload.feed_eof()
self.done = True
- else:
- if readall and code != 204:
- self._type = ParseState.PARSE_UNTIL_EOF
- elif method in ("PUT", "POST"):
- internal_logger.warning( # pragma: no cover
- "Content-Length or Transfer-Encoding header is required"
- )
- self._type = ParseState.PARSE_NONE
- real_payload.feed_eof()
- self.done = True
self.payload = real_payload
@@ -888,13 +885,13 @@ class HttpPayloadParser:
self._chunk_size = 0
self.payload.feed_data(chunk[:required], required)
chunk = chunk[required:]
- if self._lax and chunk.startswith(b"\r"):
- chunk = chunk[1:]
self._chunk = ChunkState.PARSE_CHUNKED_CHUNK_EOF
self.payload.end_http_chunk_receiving()
# toss the CRLF at the end of the chunk
if self._chunk == ChunkState.PARSE_CHUNKED_CHUNK_EOF:
+ if self._lax and chunk.startswith(b"\r"):
+ chunk = chunk[1:]
if chunk[: len(SEP)] == SEP:
chunk = chunk[len(SEP) :]
self._chunk = ChunkState.PARSE_CHUNKED_SIZE
diff --git a/contrib/python/aiohttp/aiohttp/http_websocket.py b/contrib/python/aiohttp/aiohttp/http_websocket.py
index 39f2e4a5c15..fb00ebc7d35 100644
--- a/contrib/python/aiohttp/aiohttp/http_websocket.py
+++ b/contrib/python/aiohttp/aiohttp/http_websocket.py
@@ -8,6 +8,7 @@ import re
import sys
import zlib
from enum import IntEnum
+from functools import partial
from struct import Struct
from typing import (
Any,
@@ -24,6 +25,7 @@ from typing import (
)
from .base_protocol import BaseProtocol
+from .client_exceptions import ClientConnectionResetError
from .compression_utils import ZLibCompressor, ZLibDecompressor
from .helpers import NO_EXTENSIONS, set_exception
from .streams import DataQueue
@@ -93,6 +95,14 @@ class WSMsgType(IntEnum):
error = ERROR
+MESSAGE_TYPES_WITH_CONTENT: Final = frozenset(
+ {
+ WSMsgType.BINARY,
+ WSMsgType.TEXT,
+ WSMsgType.CONTINUATION,
+ }
+)
+
WS_KEY: Final[bytes] = b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
@@ -103,8 +113,10 @@ PACK_LEN1 = Struct("!BB").pack
PACK_LEN2 = Struct("!BBH").pack
PACK_LEN3 = Struct("!BBQ").pack
PACK_CLOSE_CODE = Struct("!H").pack
+PACK_RANDBITS = Struct("!L").pack
MSG_SIZE: Final[int] = 2**14
DEFAULT_LIMIT: Final[int] = 2**16
+MASK_LEN: Final[int] = 4
class WSMessage(NamedTuple):
@@ -294,7 +306,7 @@ class WebSocketReader:
self._frame_opcode: Optional[int] = None
self._frame_payload = bytearray()
- self._tail = b""
+ self._tail: bytes = b""
self._has_mask = False
self._frame_mask: Optional[bytes] = None
self._payload_length = 0
@@ -311,17 +323,101 @@ class WebSocketReader:
return True, data
try:
- return self._feed_data(data)
+ self._feed_data(data)
except Exception as exc:
self._exc = exc
set_exception(self.queue, exc)
return True, b""
- def _feed_data(self, data: bytes) -> Tuple[bool, bytes]:
+ return False, b""
+
+ def _feed_data(self, data: bytes) -> None:
for fin, opcode, payload, compressed in self.parse_frame(data):
- if compressed and not self._decompressobj:
- self._decompressobj = ZLibDecompressor(suppress_deflate_header=True)
- if opcode == WSMsgType.CLOSE:
+ if opcode in MESSAGE_TYPES_WITH_CONTENT:
+ # load text/binary
+ is_continuation = opcode == WSMsgType.CONTINUATION
+ if not fin:
+ # got partial frame payload
+ if not is_continuation:
+ self._opcode = opcode
+ self._partial += payload
+ if self._max_msg_size and len(self._partial) >= self._max_msg_size:
+ raise WebSocketError(
+ WSCloseCode.MESSAGE_TOO_BIG,
+ "Message size {} exceeds limit {}".format(
+ len(self._partial), self._max_msg_size
+ ),
+ )
+ continue
+
+ has_partial = bool(self._partial)
+ if is_continuation:
+ if self._opcode is None:
+ raise WebSocketError(
+ WSCloseCode.PROTOCOL_ERROR,
+ "Continuation frame for non started message",
+ )
+ opcode = self._opcode
+ self._opcode = None
+ # previous frame was non finished
+ # we should get continuation opcode
+ elif has_partial:
+ raise WebSocketError(
+ WSCloseCode.PROTOCOL_ERROR,
+ "The opcode in non-fin frame is expected "
+ "to be zero, got {!r}".format(opcode),
+ )
+
+ if has_partial:
+ assembled_payload = self._partial + payload
+ self._partial.clear()
+ else:
+ assembled_payload = payload
+
+ if self._max_msg_size and len(assembled_payload) >= self._max_msg_size:
+ raise WebSocketError(
+ WSCloseCode.MESSAGE_TOO_BIG,
+ "Message size {} exceeds limit {}".format(
+ len(assembled_payload), self._max_msg_size
+ ),
+ )
+
+ # Decompress process must to be done after all packets
+ # received.
+ if compressed:
+ if not self._decompressobj:
+ self._decompressobj = ZLibDecompressor(
+ suppress_deflate_header=True
+ )
+ payload_merged = self._decompressobj.decompress_sync(
+ assembled_payload + _WS_DEFLATE_TRAILING, self._max_msg_size
+ )
+ if self._decompressobj.unconsumed_tail:
+ left = len(self._decompressobj.unconsumed_tail)
+ raise WebSocketError(
+ WSCloseCode.MESSAGE_TOO_BIG,
+ "Decompressed message size {} exceeds limit {}".format(
+ self._max_msg_size + left, self._max_msg_size
+ ),
+ )
+ else:
+ payload_merged = bytes(assembled_payload)
+
+ if opcode == WSMsgType.TEXT:
+ try:
+ text = payload_merged.decode("utf-8")
+ except UnicodeDecodeError as exc:
+ raise WebSocketError(
+ WSCloseCode.INVALID_TEXT, "Invalid UTF-8 text message"
+ ) from exc
+
+ self.queue.feed_data(WSMessage(WSMsgType.TEXT, text, ""), len(text))
+ continue
+
+ self.queue.feed_data(
+ WSMessage(WSMsgType.BINARY, payload_merged, ""), len(payload_merged)
+ )
+ elif opcode == WSMsgType.CLOSE:
if len(payload) >= 2:
close_code = UNPACK_CLOSE_CODE(payload[:2])[0]
if close_code < 3000 and close_code not in ALLOWED_CLOSE_CODES:
@@ -356,241 +452,145 @@ class WebSocketReader:
WSMessage(WSMsgType.PONG, payload, ""), len(payload)
)
- elif (
- opcode not in (WSMsgType.TEXT, WSMsgType.BINARY)
- and self._opcode is None
- ):
+ else:
raise WebSocketError(
WSCloseCode.PROTOCOL_ERROR, f"Unexpected opcode={opcode!r}"
)
- else:
- # load text/binary
- if not fin:
- # got partial frame payload
- if opcode != WSMsgType.CONTINUATION:
- self._opcode = opcode
- self._partial.extend(payload)
- if self._max_msg_size and len(self._partial) >= self._max_msg_size:
- raise WebSocketError(
- WSCloseCode.MESSAGE_TOO_BIG,
- "Message size {} exceeds limit {}".format(
- len(self._partial), self._max_msg_size
- ),
- )
- else:
- # previous frame was non finished
- # we should get continuation opcode
- if self._partial:
- if opcode != WSMsgType.CONTINUATION:
- raise WebSocketError(
- WSCloseCode.PROTOCOL_ERROR,
- "The opcode in non-fin frame is expected "
- "to be zero, got {!r}".format(opcode),
- )
-
- if opcode == WSMsgType.CONTINUATION:
- assert self._opcode is not None
- opcode = self._opcode
- self._opcode = None
-
- self._partial.extend(payload)
- if self._max_msg_size and len(self._partial) >= self._max_msg_size:
- raise WebSocketError(
- WSCloseCode.MESSAGE_TOO_BIG,
- "Message size {} exceeds limit {}".format(
- len(self._partial), self._max_msg_size
- ),
- )
-
- # Decompress process must to be done after all packets
- # received.
- if compressed:
- assert self._decompressobj is not None
- self._partial.extend(_WS_DEFLATE_TRAILING)
- payload_merged = self._decompressobj.decompress_sync(
- self._partial, self._max_msg_size
- )
- if self._decompressobj.unconsumed_tail:
- left = len(self._decompressobj.unconsumed_tail)
- raise WebSocketError(
- WSCloseCode.MESSAGE_TOO_BIG,
- "Decompressed message size {} exceeds limit {}".format(
- self._max_msg_size + left, self._max_msg_size
- ),
- )
- else:
- payload_merged = bytes(self._partial)
-
- self._partial.clear()
-
- if opcode == WSMsgType.TEXT:
- try:
- text = payload_merged.decode("utf-8")
- self.queue.feed_data(
- WSMessage(WSMsgType.TEXT, text, ""), len(text)
- )
- except UnicodeDecodeError as exc:
- raise WebSocketError(
- WSCloseCode.INVALID_TEXT, "Invalid UTF-8 text message"
- ) from exc
- else:
- self.queue.feed_data(
- WSMessage(WSMsgType.BINARY, payload_merged, ""),
- len(payload_merged),
- )
-
- return False, b""
def parse_frame(
self, buf: bytes
) -> List[Tuple[bool, Optional[int], bytearray, Optional[bool]]]:
"""Return the next frame from the socket."""
- frames = []
+ frames: List[Tuple[bool, Optional[int], bytearray, Optional[bool]]] = []
if self._tail:
buf, self._tail = self._tail + buf, b""
- start_pos = 0
+ start_pos: int = 0
buf_length = len(buf)
while True:
# read header
- if self._state == WSParserState.READ_HEADER:
- if buf_length - start_pos >= 2:
- data = buf[start_pos : start_pos + 2]
- start_pos += 2
- first_byte, second_byte = data
+ if self._state is WSParserState.READ_HEADER:
+ if buf_length - start_pos < 2:
+ break
+ data = buf[start_pos : start_pos + 2]
+ start_pos += 2
+ first_byte, second_byte = data
- fin = (first_byte >> 7) & 1
- rsv1 = (first_byte >> 6) & 1
- rsv2 = (first_byte >> 5) & 1
- rsv3 = (first_byte >> 4) & 1
- opcode = first_byte & 0xF
+ fin = (first_byte >> 7) & 1
+ rsv1 = (first_byte >> 6) & 1
+ rsv2 = (first_byte >> 5) & 1
+ rsv3 = (first_byte >> 4) & 1
+ opcode = first_byte & 0xF
- # frame-fin = %x0 ; more frames of this message follow
- # / %x1 ; final frame of this message
- # frame-rsv1 = %x0 ;
- # 1 bit, MUST be 0 unless negotiated otherwise
- # frame-rsv2 = %x0 ;
- # 1 bit, MUST be 0 unless negotiated otherwise
- # frame-rsv3 = %x0 ;
- # 1 bit, MUST be 0 unless negotiated otherwise
- #
- # Remove rsv1 from this test for deflate development
- if rsv2 or rsv3 or (rsv1 and not self._compress):
- raise WebSocketError(
- WSCloseCode.PROTOCOL_ERROR,
- "Received frame with non-zero reserved bits",
- )
+ # frame-fin = %x0 ; more frames of this message follow
+ # / %x1 ; final frame of this message
+ # frame-rsv1 = %x0 ;
+ # 1 bit, MUST be 0 unless negotiated otherwise
+ # frame-rsv2 = %x0 ;
+ # 1 bit, MUST be 0 unless negotiated otherwise
+ # frame-rsv3 = %x0 ;
+ # 1 bit, MUST be 0 unless negotiated otherwise
+ #
+ # Remove rsv1 from this test for deflate development
+ if rsv2 or rsv3 or (rsv1 and not self._compress):
+ raise WebSocketError(
+ WSCloseCode.PROTOCOL_ERROR,
+ "Received frame with non-zero reserved bits",
+ )
- if opcode > 0x7 and fin == 0:
- raise WebSocketError(
- WSCloseCode.PROTOCOL_ERROR,
- "Received fragmented control frame",
- )
+ if opcode > 0x7 and fin == 0:
+ raise WebSocketError(
+ WSCloseCode.PROTOCOL_ERROR,
+ "Received fragmented control frame",
+ )
- has_mask = (second_byte >> 7) & 1
- length = second_byte & 0x7F
+ has_mask = (second_byte >> 7) & 1
+ length = second_byte & 0x7F
- # Control frames MUST have a payload
- # length of 125 bytes or less
- if opcode > 0x7 and length > 125:
- raise WebSocketError(
- WSCloseCode.PROTOCOL_ERROR,
- "Control frame payload cannot be " "larger than 125 bytes",
- )
+ # Control frames MUST have a payload
+ # length of 125 bytes or less
+ if opcode > 0x7 and length > 125:
+ raise WebSocketError(
+ WSCloseCode.PROTOCOL_ERROR,
+ "Control frame payload cannot be " "larger than 125 bytes",
+ )
- # Set compress status if last package is FIN
- # OR set compress status if this is first fragment
- # Raise error if not first fragment with rsv1 = 0x1
- if self._frame_fin or self._compressed is None:
- self._compressed = True if rsv1 else False
- elif rsv1:
- raise WebSocketError(
- WSCloseCode.PROTOCOL_ERROR,
- "Received frame with non-zero reserved bits",
- )
+ # Set compress status if last package is FIN
+ # OR set compress status if this is first fragment
+ # Raise error if not first fragment with rsv1 = 0x1
+ if self._frame_fin or self._compressed is None:
+ self._compressed = True if rsv1 else False
+ elif rsv1:
+ raise WebSocketError(
+ WSCloseCode.PROTOCOL_ERROR,
+ "Received frame with non-zero reserved bits",
+ )
- self._frame_fin = bool(fin)
- self._frame_opcode = opcode
- self._has_mask = bool(has_mask)
- self._payload_length_flag = length
- self._state = WSParserState.READ_PAYLOAD_LENGTH
- else:
- break
+ self._frame_fin = bool(fin)
+ self._frame_opcode = opcode
+ self._has_mask = bool(has_mask)
+ self._payload_length_flag = length
+ self._state = WSParserState.READ_PAYLOAD_LENGTH
# read payload length
- if self._state == WSParserState.READ_PAYLOAD_LENGTH:
- length = self._payload_length_flag
- if length == 126:
- if buf_length - start_pos >= 2:
- data = buf[start_pos : start_pos + 2]
- start_pos += 2
- length = UNPACK_LEN2(data)[0]
- self._payload_length = length
- self._state = (
- WSParserState.READ_PAYLOAD_MASK
- if self._has_mask
- else WSParserState.READ_PAYLOAD
- )
- else:
+ if self._state is WSParserState.READ_PAYLOAD_LENGTH:
+ length_flag = self._payload_length_flag
+ if length_flag == 126:
+ if buf_length - start_pos < 2:
break
- elif length > 126:
- if buf_length - start_pos >= 8:
- data = buf[start_pos : start_pos + 8]
- start_pos += 8
- length = UNPACK_LEN3(data)[0]
- self._payload_length = length
- self._state = (
- WSParserState.READ_PAYLOAD_MASK
- if self._has_mask
- else WSParserState.READ_PAYLOAD
- )
- else:
+ data = buf[start_pos : start_pos + 2]
+ start_pos += 2
+ self._payload_length = UNPACK_LEN2(data)[0]
+ elif length_flag > 126:
+ if buf_length - start_pos < 8:
break
+ data = buf[start_pos : start_pos + 8]
+ start_pos += 8
+ self._payload_length = UNPACK_LEN3(data)[0]
else:
- self._payload_length = length
- self._state = (
- WSParserState.READ_PAYLOAD_MASK
- if self._has_mask
- else WSParserState.READ_PAYLOAD
- )
+ self._payload_length = length_flag
+
+ self._state = (
+ WSParserState.READ_PAYLOAD_MASK
+ if self._has_mask
+ else WSParserState.READ_PAYLOAD
+ )
# read payload mask
- if self._state == WSParserState.READ_PAYLOAD_MASK:
- if buf_length - start_pos >= 4:
- self._frame_mask = buf[start_pos : start_pos + 4]
- start_pos += 4
- self._state = WSParserState.READ_PAYLOAD
- else:
+ if self._state is WSParserState.READ_PAYLOAD_MASK:
+ if buf_length - start_pos < 4:
break
+ self._frame_mask = buf[start_pos : start_pos + 4]
+ start_pos += 4
+ self._state = WSParserState.READ_PAYLOAD
- if self._state == WSParserState.READ_PAYLOAD:
+ if self._state is WSParserState.READ_PAYLOAD:
length = self._payload_length
payload = self._frame_payload
chunk_len = buf_length - start_pos
if length >= chunk_len:
self._payload_length = length - chunk_len
- payload.extend(buf[start_pos:])
+ payload += buf[start_pos:]
start_pos = buf_length
else:
self._payload_length = 0
- payload.extend(buf[start_pos : start_pos + length])
+ payload += buf[start_pos : start_pos + length]
start_pos = start_pos + length
- if self._payload_length == 0:
- if self._has_mask:
- assert self._frame_mask is not None
- _websocket_mask(self._frame_mask, payload)
+ if self._payload_length != 0:
+ break
- frames.append(
- (self._frame_fin, self._frame_opcode, payload, self._compressed)
- )
+ if self._has_mask:
+ assert self._frame_mask is not None
+ _websocket_mask(self._frame_mask, payload)
- self._frame_payload = bytearray()
- self._state = WSParserState.READ_HEADER
- else:
- break
+ frames.append(
+ (self._frame_fin, self._frame_opcode, payload, self._compressed)
+ )
+ self._frame_payload = bytearray()
+ self._state = WSParserState.READ_HEADER
self._tail = buf[start_pos:]
@@ -612,7 +612,7 @@ class WebSocketWriter:
self.protocol = protocol
self.transport = transport
self.use_mask = use_mask
- self.randrange = random.randrange
+ self.get_random_bits = partial(random.getrandbits, 32)
self.compress = compress
self.notakeover = notakeover
self._closing = False
@@ -625,14 +625,20 @@ class WebSocketWriter:
) -> None:
"""Send a frame over the websocket with message as its payload."""
if self._closing and not (opcode & WSMsgType.CLOSE):
- raise ConnectionResetError("Cannot write to closing transport")
+ raise ClientConnectionResetError("Cannot write to closing transport")
+ # RSV are the reserved bits in the frame header. They are used to
+ # indicate that the frame is using an extension.
+ # https://datatracker.ietf.org/doc/html/rfc6455#section-5.2
rsv = 0
-
# Only compress larger packets (disabled)
# Does small packet needs to be compressed?
# if self.compress and opcode < 8 and len(message) > 124:
if (compress or self.compress) and opcode < 8:
+ # RSV1 (rsv = 0x40) is set for compressed frames
+ # https://datatracker.ietf.org/doc/html/rfc7692#section-7.2.3.1
+ rsv = 0x40
+
if compress:
# Do not set self._compress if compressing is for this frame
compressobj = self._make_compress_obj(compress)
@@ -651,29 +657,39 @@ class WebSocketWriter:
)
if message.endswith(_WS_DEFLATE_TRAILING):
message = message[:-4]
- rsv = rsv | 0x40
msg_length = len(message)
use_mask = self.use_mask
- if use_mask:
- mask_bit = 0x80
- else:
- mask_bit = 0
+ mask_bit = 0x80 if use_mask else 0
+ # Depending on the message length, the header is assembled differently.
+ # The first byte is reserved for the opcode and the RSV bits.
+ first_byte = 0x80 | rsv | opcode
if msg_length < 126:
- header = PACK_LEN1(0x80 | rsv | opcode, msg_length | mask_bit)
+ header = PACK_LEN1(first_byte, msg_length | mask_bit)
+ header_len = 2
elif msg_length < (1 << 16):
- header = PACK_LEN2(0x80 | rsv | opcode, 126 | mask_bit, msg_length)
+ header = PACK_LEN2(first_byte, 126 | mask_bit, msg_length)
+ header_len = 4
else:
- header = PACK_LEN3(0x80 | rsv | opcode, 127 | mask_bit, msg_length)
+ header = PACK_LEN3(first_byte, 127 | mask_bit, msg_length)
+ header_len = 10
+
+ # https://datatracker.ietf.org/doc/html/rfc6455#section-5.3
+ # If we are using a mask, we need to generate it randomly
+ # and apply it to the message before sending it. A mask is
+ # a 32-bit value that is applied to the message using a
+ # bitwise XOR operation. It is used to prevent certain types
+ # of attacks on the websocket protocol. The mask is only used
+ # when aiohttp is acting as a client. Servers do not use a mask.
if use_mask:
- mask_int = self.randrange(0, 0xFFFFFFFF)
- mask = mask_int.to_bytes(4, "big")
+ mask = PACK_RANDBITS(self.get_random_bits())
message = bytearray(message)
_websocket_mask(mask, message)
self._write(header + mask + message)
- self._output_size += len(header) + len(mask) + msg_length
+ self._output_size += header_len + MASK_LEN + msg_length
+
else:
if msg_length > MSG_SIZE:
self._write(header)
@@ -681,11 +697,16 @@ class WebSocketWriter:
else:
self._write(header + message)
- self._output_size += len(header) + msg_length
+ self._output_size += header_len + msg_length
# It is safe to return control to the event loop when using compression
# after this point as we have already sent or buffered all the data.
+ # Once we have written output_size up to the limit, we call the
+ # drain helper which waits for the transport to be ready to accept
+ # more data. This is a flow control mechanism to prevent the buffer
+ # from growing too large. The drain helper will return right away
+ # if the writer is not paused.
if self._output_size > self._limit:
self._output_size = 0
await self.protocol._drain_helper()
@@ -699,7 +720,7 @@ class WebSocketWriter:
def _write(self, data: bytes) -> None:
if self.transport is None or self.transport.is_closing():
- raise ConnectionResetError("Cannot write to closing transport")
+ raise ClientConnectionResetError("Cannot write to closing transport")
self.transport.write(data)
async def pong(self, message: Union[bytes, str] = b"") -> None:
diff --git a/contrib/python/aiohttp/aiohttp/http_writer.py b/contrib/python/aiohttp/aiohttp/http_writer.py
index d6b02e6f566..dc07a358c70 100644
--- a/contrib/python/aiohttp/aiohttp/http_writer.py
+++ b/contrib/python/aiohttp/aiohttp/http_writer.py
@@ -8,6 +8,7 @@ from multidict import CIMultiDict
from .abc import AbstractStreamWriter
from .base_protocol import BaseProtocol
+from .client_exceptions import ClientConnectionResetError
from .compression_utils import ZLibCompressor
from .helpers import NO_EXTENSIONS
@@ -70,9 +71,9 @@ class StreamWriter(AbstractStreamWriter):
size = len(chunk)
self.buffer_size += size
self.output_size += size
- transport = self.transport
- if not self._protocol.connected or transport is None or transport.is_closing():
- raise ConnectionResetError("Cannot write to closing transport")
+ transport = self._protocol.transport
+ if transport is None or transport.is_closing():
+ raise ClientConnectionResetError("Cannot write to closing transport")
transport.write(chunk)
async def write(
diff --git a/contrib/python/aiohttp/aiohttp/multipart.py b/contrib/python/aiohttp/aiohttp/multipart.py
index 71fc2654a1c..49c05c5af25 100644
--- a/contrib/python/aiohttp/aiohttp/multipart.py
+++ b/contrib/python/aiohttp/aiohttp/multipart.py
@@ -2,6 +2,7 @@ import base64
import binascii
import json
import re
+import sys
import uuid
import warnings
import zlib
@@ -10,7 +11,6 @@ from types import TracebackType
from typing import (
TYPE_CHECKING,
Any,
- AsyncIterator,
Deque,
Dict,
Iterator,
@@ -48,6 +48,13 @@ from .payload import (
)
from .streams import StreamReader
+if sys.version_info >= (3, 11):
+ from typing import Self
+else:
+ from typing import TypeVar
+
+ Self = TypeVar("Self", bound="BodyPartReader")
+
__all__ = (
"MultipartReader",
"MultipartWriter",
@@ -266,6 +273,7 @@ class BodyPartReader:
) -> None:
self.headers = headers
self._boundary = boundary
+ self._boundary_len = len(boundary) + 2 # Boundary + \r\n
self._content = content
self._default_charset = default_charset
self._at_eof = False
@@ -279,8 +287,8 @@ class BodyPartReader:
self._content_eof = 0
self._cache: Dict[str, Any] = {}
- def __aiter__(self) -> AsyncIterator["BodyPartReader"]:
- return self # type: ignore[return-value]
+ def __aiter__(self: Self):
+ return self
async def __anext__(self) -> bytes:
part = await self.next()
@@ -322,6 +330,31 @@ class BodyPartReader:
else:
chunk = await self._read_chunk_from_stream(size)
+ # For the case of base64 data, we must read a fragment of size with a
+ # remainder of 0 by dividing by 4 for string without symbols \n or \r
+ encoding = self.headers.get(CONTENT_TRANSFER_ENCODING)
+ if encoding and encoding.lower() == "base64":
+ stripped_chunk = b"".join(chunk.split())
+ remainder = len(stripped_chunk) % 4
+
+ while remainder != 0 and not self.at_eof():
+ over_chunk_size = 4 - remainder
+ over_chunk = b""
+
+ if self._prev_chunk:
+ over_chunk = self._prev_chunk[:over_chunk_size]
+ self._prev_chunk = self._prev_chunk[len(over_chunk) :]
+
+ if len(over_chunk) != over_chunk_size:
+ over_chunk += await self._content.read(4 - len(over_chunk))
+
+ if not over_chunk:
+ self._at_eof = True
+
+ stripped_chunk += b"".join(over_chunk.split())
+ chunk += over_chunk
+ remainder = len(stripped_chunk) % 4
+
self._read_bytes += len(chunk)
if self._read_bytes == self._length:
self._at_eof = True
@@ -346,15 +379,25 @@ class BodyPartReader:
# Reads content chunk of body part with unknown length.
# The Content-Length header for body part is not necessary.
assert (
- size >= len(self._boundary) + 2
+ size >= self._boundary_len
), "Chunk size must be greater or equal than boundary length + 2"
first_chunk = self._prev_chunk is None
if first_chunk:
self._prev_chunk = await self._content.read(size)
- chunk = await self._content.read(size)
- self._content_eof += int(self._content.at_eof())
- assert self._content_eof < 3, "Reading after EOF"
+ chunk = b""
+ # content.read() may return less than size, so we need to loop to ensure
+ # we have enough data to detect the boundary.
+ while len(chunk) < self._boundary_len:
+ chunk += await self._content.read(size)
+ self._content_eof += int(self._content.at_eof())
+ assert self._content_eof < 3, "Reading after EOF"
+ if self._content_eof:
+ break
+ if len(chunk) > size:
+ self._content.unread_data(chunk[size:])
+ chunk = chunk[:size]
+
assert self._prev_chunk is not None
window = self._prev_chunk + chunk
sub = b"\r\n" + self._boundary
@@ -518,6 +561,8 @@ class BodyPartReader:
@payload_type(BodyPartReader, order=Order.try_first)
class BodyPartReaderPayload(Payload):
+ _value: BodyPartReader
+
def __init__(self, value: BodyPartReader, *args: Any, **kwargs: Any) -> None:
super().__init__(value, *args, **kwargs)
@@ -530,6 +575,9 @@ class BodyPartReaderPayload(Payload):
if params:
self.set_content_disposition("attachment", True, **params)
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ raise TypeError("Unable to decode.")
+
async def write(self, writer: Any) -> None:
field = self._value
chunk = await field.read_chunk(size=2**16)
@@ -566,10 +614,8 @@ class MultipartReader:
self._at_bof = True
self._unread: List[bytes] = []
- def __aiter__(
- self,
- ) -> AsyncIterator["BodyPartReader"]:
- return self # type: ignore[return-value]
+ def __aiter__(self: Self):
+ return self
async def __anext__(
self,
@@ -749,6 +795,8 @@ _Part = Tuple[Payload, str, str]
class MultipartWriter(Payload):
"""Multipart body writer."""
+ _value: None
+
def __init__(self, subtype: str = "mixed", boundary: Optional[str] = None) -> None:
boundary = boundary if boundary is not None else uuid.uuid4().hex
# The underlying Payload API demands a str (utf-8), not bytes,
@@ -929,6 +977,16 @@ class MultipartWriter(Payload):
total += 2 + len(self._boundary) + 4 # b'--'+self._boundary+b'--\r\n'
return total
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ return "".join(
+ "--"
+ + self.boundary
+ + "\n"
+ + part._binary_headers.decode(encoding, errors)
+ + part.decode()
+ for part, _e, _te in self._parts
+ )
+
async def write(self, writer: Any, close_boundary: bool = True) -> None:
"""Write body."""
for part, encoding, te_encoding in self._parts:
diff --git a/contrib/python/aiohttp/aiohttp/payload.py b/contrib/python/aiohttp/aiohttp/payload.py
index 6593b05c6f7..27636977774 100644
--- a/contrib/python/aiohttp/aiohttp/payload.py
+++ b/contrib/python/aiohttp/aiohttp/payload.py
@@ -11,7 +11,6 @@ from typing import (
IO,
TYPE_CHECKING,
Any,
- ByteString,
Dict,
Final,
Iterable,
@@ -209,6 +208,13 @@ class Payload(ABC):
)
@abstractmethod
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ """Return string representation of the value.
+
+ This is named decode() to allow compatibility with bytes objects.
+ """
+
+ @abstractmethod
async def write(self, writer: AbstractStreamWriter) -> None:
"""Write payload.
@@ -217,7 +223,11 @@ class Payload(ABC):
class BytesPayload(Payload):
- def __init__(self, value: ByteString, *args: Any, **kwargs: Any) -> None:
+ _value: bytes
+
+ def __init__(
+ self, value: Union[bytes, bytearray, memoryview], *args: Any, **kwargs: Any
+ ) -> None:
if not isinstance(value, (bytes, bytearray, memoryview)):
raise TypeError(f"value argument must be byte-ish, not {type(value)!r}")
@@ -241,6 +251,9 @@ class BytesPayload(Payload):
**kwargs,
)
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ return self._value.decode(encoding, errors)
+
async def write(self, writer: AbstractStreamWriter) -> None:
await writer.write(self._value)
@@ -282,7 +295,7 @@ class StringIOPayload(StringPayload):
class IOBasePayload(Payload):
- _value: IO[Any]
+ _value: io.IOBase
def __init__(
self, value: IO[Any], disposition: str = "attachment", *args: Any, **kwargs: Any
@@ -306,9 +319,12 @@ class IOBasePayload(Payload):
finally:
await loop.run_in_executor(None, self._value.close)
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ return "".join(r.decode(encoding, errors) for r in self._value.readlines())
+
class TextIOPayload(IOBasePayload):
- _value: TextIO
+ _value: io.TextIOBase
def __init__(
self,
@@ -345,6 +361,9 @@ class TextIOPayload(IOBasePayload):
except OSError:
return None
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ return self._value.read()
+
async def write(self, writer: AbstractStreamWriter) -> None:
loop = asyncio.get_event_loop()
try:
@@ -362,6 +381,8 @@ class TextIOPayload(IOBasePayload):
class BytesIOPayload(IOBasePayload):
+ _value: io.BytesIO
+
@property
def size(self) -> int:
position = self._value.tell()
@@ -369,17 +390,27 @@ class BytesIOPayload(IOBasePayload):
self._value.seek(position)
return end - position
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ return self._value.read().decode(encoding, errors)
+
class BufferedReaderPayload(IOBasePayload):
+ _value: io.BufferedIOBase
+
@property
def size(self) -> Optional[int]:
try:
return os.fstat(self._value.fileno()).st_size - self._value.tell()
- except OSError:
+ except (OSError, AttributeError):
# data.fileno() is not supported, e.g.
# io.BufferedReader(io.BytesIO(b'data'))
+ # For some file-like objects (e.g. tarfile), the fileno() attribute may
+ # not exist at all, and will instead raise an AttributeError.
return None
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ return self._value.read().decode(encoding, errors)
+
class JsonPayload(BytesPayload):
def __init__(
@@ -416,6 +447,7 @@ else:
class AsyncIterablePayload(Payload):
_iter: Optional[_AsyncIterator] = None
+ _value: _AsyncIterable
def __init__(self, value: _AsyncIterable, *args: Any, **kwargs: Any) -> None:
if not isinstance(value, AsyncIterable):
@@ -443,6 +475,9 @@ class AsyncIterablePayload(Payload):
except StopAsyncIteration:
self._iter = None
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ raise TypeError("Unable to decode.")
+
class StreamReaderPayload(AsyncIterablePayload):
def __init__(self, value: StreamReader, *args: Any, **kwargs: Any) -> None:
diff --git a/contrib/python/aiohttp/aiohttp/payload_streamer.py b/contrib/python/aiohttp/aiohttp/payload_streamer.py
index 364f763ae74..831fdc0a77f 100644
--- a/contrib/python/aiohttp/aiohttp/payload_streamer.py
+++ b/contrib/python/aiohttp/aiohttp/payload_streamer.py
@@ -65,6 +65,9 @@ class StreamWrapperPayload(Payload):
async def write(self, writer: AbstractStreamWriter) -> None:
await self._value(writer)
+ def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
+ raise TypeError("Unable to decode.")
+
@payload_type(streamer)
class StreamPayload(StreamWrapperPayload):
diff --git a/contrib/python/aiohttp/aiohttp/pytest_plugin.py b/contrib/python/aiohttp/aiohttp/pytest_plugin.py
index 5754747bf48..55964ead041 100644
--- a/contrib/python/aiohttp/aiohttp/pytest_plugin.py
+++ b/contrib/python/aiohttp/aiohttp/pytest_plugin.py
@@ -1,13 +1,21 @@
import asyncio
import contextlib
+import inspect
import warnings
-from typing import Any, Awaitable, Callable, Dict, Iterator, Optional, Type, Union
+from typing import (
+ Any,
+ Awaitable,
+ Callable,
+ Dict,
+ Iterator,
+ Optional,
+ Protocol,
+ Type,
+ Union,
+)
import pytest
-from aiohttp.helpers import isasyncgenfunction
-from aiohttp.web import Application
-
from .test_utils import (
BaseTestServer,
RawTestServer,
@@ -18,15 +26,35 @@ from .test_utils import (
teardown_test_loop,
unused_port as _unused_port,
)
+from .web import Application
+from .web_protocol import _RequestHandler
try:
import uvloop
except ImportError: # pragma: no cover
uvloop = None # type: ignore[assignment]
-AiohttpClient = Callable[[Union[Application, BaseTestServer]], Awaitable[TestClient]]
-AiohttpRawServer = Callable[[Application], Awaitable[RawTestServer]]
-AiohttpServer = Callable[[Application], Awaitable[TestServer]]
+
+class AiohttpClient(Protocol):
+ def __call__(
+ self,
+ __param: Union[Application, BaseTestServer],
+ *,
+ server_kwargs: Optional[Dict[str, Any]] = None,
+ **kwargs: Any
+ ) -> Awaitable[TestClient]: ...
+
+
+class AiohttpServer(Protocol):
+ def __call__(
+ self, app: Application, *, port: Optional[int] = None, **kwargs: Any
+ ) -> Awaitable[TestServer]: ...
+
+
+class AiohttpRawServer(Protocol):
+ def __call__(
+ self, handler: _RequestHandler, *, port: Optional[int] = None, **kwargs: Any
+ ) -> Awaitable[RawTestServer]: ...
def pytest_addoption(parser): # type: ignore[no-untyped-def]
@@ -57,7 +85,7 @@ def pytest_fixture_setup(fixturedef): # type: ignore[no-untyped-def]
"""
func = fixturedef.func
- if isasyncgenfunction(func):
+ if inspect.isasyncgenfunction(func):
# async generator fixture
is_async_gen = True
elif asyncio.iscoroutinefunction(func):
@@ -262,7 +290,9 @@ def aiohttp_server(loop: asyncio.AbstractEventLoop) -> Iterator[AiohttpServer]:
"""
servers = []
- async def go(app, *, port=None, **kwargs): # type: ignore[no-untyped-def]
+ async def go(
+ app: Application, *, port: Optional[int] = None, **kwargs: Any
+ ) -> TestServer:
server = TestServer(app, port=port)
await server.start_server(loop=loop, **kwargs)
servers.append(server)
@@ -295,7 +325,9 @@ def aiohttp_raw_server(loop: asyncio.AbstractEventLoop) -> Iterator[AiohttpRawSe
"""
servers = []
- async def go(handler, *, port=None, **kwargs): # type: ignore[no-untyped-def]
+ async def go(
+ handler: _RequestHandler, *, port: Optional[int] = None, **kwargs: Any
+ ) -> RawTestServer:
server = RawTestServer(handler, port=port)
await server.start_server(loop=loop, **kwargs)
servers.append(server)
diff --git a/contrib/python/aiohttp/aiohttp/resolver.py b/contrib/python/aiohttp/aiohttp/resolver.py
index c03230c744e..06855fa13fd 100644
--- a/contrib/python/aiohttp/aiohttp/resolver.py
+++ b/contrib/python/aiohttp/aiohttp/resolver.py
@@ -1,20 +1,25 @@
import asyncio
import socket
-from typing import Any, Dict, List, Optional, Type, Union
+import sys
+from typing import Any, Dict, List, Optional, Tuple, Type, Union
-from .abc import AbstractResolver
-from .helpers import get_running_loop
+from .abc import AbstractResolver, ResolveResult
__all__ = ("ThreadedResolver", "AsyncResolver", "DefaultResolver")
+
try:
import aiodns
- # aiodns_default = hasattr(aiodns.DNSResolver, 'gethostbyname')
+ aiodns_default = hasattr(aiodns.DNSResolver, "getaddrinfo")
except ImportError: # pragma: no cover
- aiodns = None
+ aiodns = None # type: ignore[assignment]
+ aiodns_default = False
+
-aiodns_default = False
+_NUMERIC_SOCKET_FLAGS = socket.AI_NUMERICHOST | socket.AI_NUMERICSERV
+_NAME_SOCKET_FLAGS = socket.NI_NUMERICHOST | socket.NI_NUMERICSERV
+_SUPPORTS_SCOPE_ID = sys.version_info >= (3, 9, 0)
class ThreadedResolver(AbstractResolver):
@@ -25,48 +30,48 @@ class ThreadedResolver(AbstractResolver):
"""
def __init__(self, loop: Optional[asyncio.AbstractEventLoop] = None) -> None:
- self._loop = get_running_loop(loop)
+ self._loop = loop or asyncio.get_event_loop()
async def resolve(
- self, hostname: str, port: int = 0, family: int = socket.AF_INET
- ) -> List[Dict[str, Any]]:
+ self, host: str, port: int = 0, family: socket.AddressFamily = socket.AF_INET
+ ) -> List[ResolveResult]:
infos = await self._loop.getaddrinfo(
- hostname,
+ host,
port,
type=socket.SOCK_STREAM,
family=family,
# flags=socket.AI_ADDRCONFIG,
)
- hosts = []
+ hosts: List[ResolveResult] = []
for family, _, proto, _, address in infos:
if family == socket.AF_INET6:
if len(address) < 3:
# IPv6 is not supported by Python build,
# or IPv6 is not enabled in the host
continue
- if address[3]:
+ if address[3] and _SUPPORTS_SCOPE_ID:
# This is essential for link-local IPv6 addresses.
# LL IPv6 is a VERY rare case. Strictly speaking, we should use
# getnameinfo() unconditionally, but performance makes sense.
- host, _port = socket.getnameinfo(
- address, socket.NI_NUMERICHOST | socket.NI_NUMERICSERV
+ resolved_host, _port = await self._loop.getnameinfo(
+ address, _NAME_SOCKET_FLAGS
)
port = int(_port)
else:
- host, port = address[:2]
+ resolved_host, port = address[:2]
else: # IPv4
assert family == socket.AF_INET
- host, port = address # type: ignore[misc]
+ resolved_host, port = address # type: ignore[misc]
hosts.append(
- {
- "hostname": hostname,
- "host": host,
- "port": port,
- "family": family,
- "proto": proto,
- "flags": socket.AI_NUMERICHOST | socket.AI_NUMERICSERV,
- }
+ ResolveResult(
+ hostname=host,
+ host=resolved_host,
+ port=port,
+ family=family,
+ proto=proto,
+ flags=_NUMERIC_SOCKET_FLAGS,
+ )
)
return hosts
@@ -87,32 +92,56 @@ class AsyncResolver(AbstractResolver):
if aiodns is None:
raise RuntimeError("Resolver requires aiodns library")
- self._loop = get_running_loop(loop)
- self._resolver = aiodns.DNSResolver(*args, loop=loop, **kwargs)
+ self._resolver = aiodns.DNSResolver(*args, **kwargs)
if not hasattr(self._resolver, "gethostbyname"):
# aiodns 1.1 is not available, fallback to DNSResolver.query
self.resolve = self._resolve_with_query # type: ignore
async def resolve(
- self, host: str, port: int = 0, family: int = socket.AF_INET
- ) -> List[Dict[str, Any]]:
+ self, host: str, port: int = 0, family: socket.AddressFamily = socket.AF_INET
+ ) -> List[ResolveResult]:
try:
- resp = await self._resolver.gethostbyname(host, family)
+ resp = await self._resolver.getaddrinfo(
+ host,
+ port=port,
+ type=socket.SOCK_STREAM,
+ family=family,
+ flags=socket.AI_ADDRCONFIG,
+ )
except aiodns.error.DNSError as exc:
msg = exc.args[1] if len(exc.args) >= 1 else "DNS lookup failed"
raise OSError(msg) from exc
- hosts = []
- for address in resp.addresses:
+ hosts: List[ResolveResult] = []
+ for node in resp.nodes:
+ address: Union[Tuple[bytes, int], Tuple[bytes, int, int, int]] = node.addr
+ family = node.family
+ if family == socket.AF_INET6:
+ if len(address) > 3 and address[3] and _SUPPORTS_SCOPE_ID:
+ # This is essential for link-local IPv6 addresses.
+ # LL IPv6 is a VERY rare case. Strictly speaking, we should use
+ # getnameinfo() unconditionally, but performance makes sense.
+ result = await self._resolver.getnameinfo(
+ (address[0].decode("ascii"), *address[1:]),
+ _NAME_SOCKET_FLAGS,
+ )
+ resolved_host = result.node
+ else:
+ resolved_host = address[0].decode("ascii")
+ port = address[1]
+ else: # IPv4
+ assert family == socket.AF_INET
+ resolved_host = address[0].decode("ascii")
+ port = address[1]
hosts.append(
- {
- "hostname": host,
- "host": address,
- "port": port,
- "family": family,
- "proto": 0,
- "flags": socket.AI_NUMERICHOST | socket.AI_NUMERICSERV,
- }
+ ResolveResult(
+ hostname=host,
+ host=resolved_host,
+ port=port,
+ family=family,
+ proto=0,
+ flags=_NUMERIC_SOCKET_FLAGS,
+ )
)
if not hosts:
diff --git a/contrib/python/aiohttp/aiohttp/streams.py b/contrib/python/aiohttp/aiohttp/streams.py
index b9b9c3fd96f..c927cfbb1b3 100644
--- a/contrib/python/aiohttp/aiohttp/streams.py
+++ b/contrib/python/aiohttp/aiohttp/streams.py
@@ -296,6 +296,9 @@ class StreamReader(AsyncStreamReaderMixin):
set_result(waiter, None)
async def _wait(self, func_name: str) -> None:
+ if not self._protocol.connected:
+ raise RuntimeError("Connection closed.")
+
# StreamReader uses a future to link the protocol feed_data() method
# to a read coroutine. Running two read coroutines at the same time
# would have an unexpected behaviour. It would not possible to know
diff --git a/contrib/python/aiohttp/aiohttp/test_utils.py b/contrib/python/aiohttp/aiohttp/test_utils.py
index a36e8599689..01496b6711a 100644
--- a/contrib/python/aiohttp/aiohttp/test_utils.py
+++ b/contrib/python/aiohttp/aiohttp/test_utils.py
@@ -11,17 +11,7 @@ import sys
import warnings
from abc import ABC, abstractmethod
from types import TracebackType
-from typing import (
- TYPE_CHECKING,
- Any,
- Callable,
- Iterator,
- List,
- Optional,
- Type,
- Union,
- cast,
-)
+from typing import TYPE_CHECKING, Any, Callable, Iterator, List, Optional, Type, cast
from unittest import IsolatedAsyncioTestCase, mock
from aiosignal import Signal
@@ -29,7 +19,11 @@ from multidict import CIMultiDict, CIMultiDictProxy
from yarl import URL
import aiohttp
-from aiohttp.client import _RequestContextManager, _WSRequestContextManager
+from aiohttp.client import (
+ _RequestContextManager,
+ _RequestOptions,
+ _WSRequestContextManager,
+)
from . import ClientSession, hdrs
from .abc import AbstractCookieJar
@@ -37,6 +31,7 @@ from .client_reqrep import ClientResponse
from .client_ws import ClientWebSocketResponse
from .helpers import sentinel
from .http import HttpVersion, RawRequestMessage
+from .streams import EMPTY_PAYLOAD, StreamReader
from .typedefs import StrOrURL
from .web import (
Application,
@@ -55,6 +50,9 @@ if TYPE_CHECKING:
else:
SSLContext = None
+if sys.version_info >= (3, 11) and TYPE_CHECKING:
+ from typing import Unpack
+
REUSE_ADDRESS = os.name == "posix" and sys.platform != "cygwin"
@@ -90,7 +88,7 @@ class BaseTestServer(ABC):
def __init__(
self,
*,
- scheme: Union[str, object] = sentinel,
+ scheme: str = "",
loop: Optional[asyncio.AbstractEventLoop] = None,
host: str = "127.0.0.1",
port: Optional[int] = None,
@@ -121,10 +119,13 @@ class BaseTestServer(ABC):
await self.runner.setup()
if not self.port:
self.port = 0
+ absolute_host = self.host
try:
version = ipaddress.ip_address(self.host).version
except ValueError:
version = 4
+ if version == 6:
+ absolute_host = f"[{self.host}]"
family = socket.AF_INET6 if version == 6 else socket.AF_INET
_sock = self.socket_factory(self.host, self.port, family)
self.host, self.port = _sock.getsockname()[:2]
@@ -135,13 +136,9 @@ class BaseTestServer(ABC):
sockets = server.sockets # type: ignore[attr-defined]
assert sockets is not None
self.port = sockets[0].getsockname()[1]
- if self.scheme is sentinel:
- if self._ssl:
- scheme = "https"
- else:
- scheme = "http"
- self.scheme = scheme
- self._root = URL(f"{self.scheme}://{self.host}:{self.port}")
+ if not self.scheme:
+ self.scheme = "https" if self._ssl else "http"
+ self._root = URL(f"{self.scheme}://{absolute_host}:{self.port}")
@abstractmethod # pragma: no cover
async def _make_runner(self, **kwargs: Any) -> BaseRunner:
@@ -222,7 +219,7 @@ class TestServer(BaseTestServer):
self,
app: Application,
*,
- scheme: Union[str, object] = sentinel,
+ scheme: str = "",
host: str = "127.0.0.1",
port: Optional[int] = None,
**kwargs: Any,
@@ -239,7 +236,7 @@ class RawTestServer(BaseTestServer):
self,
handler: _RequestHandler,
*,
- scheme: Union[str, object] = sentinel,
+ scheme: str = "",
host: str = "127.0.0.1",
port: Optional[int] = None,
**kwargs: Any,
@@ -324,45 +321,101 @@ class TestClient:
self._responses.append(resp)
return resp
- def request(
- self, method: str, path: StrOrURL, **kwargs: Any
- ) -> _RequestContextManager:
- """Routes a request to tested http server.
+ if sys.version_info >= (3, 11) and TYPE_CHECKING:
- The interface is identical to aiohttp.ClientSession.request,
- except the loop kwarg is overridden by the instance used by the
- test server.
+ def request(
+ self, method: str, path: StrOrURL, **kwargs: Unpack[_RequestOptions]
+ ) -> _RequestContextManager: ...
- """
- return _RequestContextManager(self._request(method, path, **kwargs))
+ def get(
+ self,
+ path: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> _RequestContextManager: ...
+
+ def options(
+ self,
+ path: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> _RequestContextManager: ...
+
+ def head(
+ self,
+ path: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> _RequestContextManager: ...
+
+ def post(
+ self,
+ path: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> _RequestContextManager: ...
+
+ def put(
+ self,
+ path: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> _RequestContextManager: ...
+
+ def patch(
+ self,
+ path: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> _RequestContextManager: ...
- def get(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
- """Perform an HTTP GET request."""
- return _RequestContextManager(self._request(hdrs.METH_GET, path, **kwargs))
+ def delete(
+ self,
+ path: StrOrURL,
+ **kwargs: Unpack[_RequestOptions],
+ ) -> _RequestContextManager: ...
- def post(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
- """Perform an HTTP POST request."""
- return _RequestContextManager(self._request(hdrs.METH_POST, path, **kwargs))
+ else:
+
+ def request(
+ self, method: str, path: StrOrURL, **kwargs: Any
+ ) -> _RequestContextManager:
+ """Routes a request to tested http server.
+
+ The interface is identical to aiohttp.ClientSession.request,
+ except the loop kwarg is overridden by the instance used by the
+ test server.
+
+ """
+ return _RequestContextManager(self._request(method, path, **kwargs))
+
+ def get(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
+ """Perform an HTTP GET request."""
+ return _RequestContextManager(self._request(hdrs.METH_GET, path, **kwargs))
- def options(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
- """Perform an HTTP OPTIONS request."""
- return _RequestContextManager(self._request(hdrs.METH_OPTIONS, path, **kwargs))
+ def post(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
+ """Perform an HTTP POST request."""
+ return _RequestContextManager(self._request(hdrs.METH_POST, path, **kwargs))
- def head(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
- """Perform an HTTP HEAD request."""
- return _RequestContextManager(self._request(hdrs.METH_HEAD, path, **kwargs))
+ def options(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
+ """Perform an HTTP OPTIONS request."""
+ return _RequestContextManager(
+ self._request(hdrs.METH_OPTIONS, path, **kwargs)
+ )
- def put(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
- """Perform an HTTP PUT request."""
- return _RequestContextManager(self._request(hdrs.METH_PUT, path, **kwargs))
+ def head(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
+ """Perform an HTTP HEAD request."""
+ return _RequestContextManager(self._request(hdrs.METH_HEAD, path, **kwargs))
- def patch(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
- """Perform an HTTP PATCH request."""
- return _RequestContextManager(self._request(hdrs.METH_PATCH, path, **kwargs))
+ def put(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
+ """Perform an HTTP PUT request."""
+ return _RequestContextManager(self._request(hdrs.METH_PUT, path, **kwargs))
- def delete(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
- """Perform an HTTP PATCH request."""
- return _RequestContextManager(self._request(hdrs.METH_DELETE, path, **kwargs))
+ def patch(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
+ """Perform an HTTP PATCH request."""
+ return _RequestContextManager(
+ self._request(hdrs.METH_PATCH, path, **kwargs)
+ )
+
+ def delete(self, path: StrOrURL, **kwargs: Any) -> _RequestContextManager:
+ """Perform an HTTP PATCH request."""
+ return _RequestContextManager(
+ self._request(hdrs.METH_DELETE, path, **kwargs)
+ )
def ws_connect(self, path: StrOrURL, **kwargs: Any) -> _WSRequestContextManager:
"""Initiate websocket connection.
@@ -582,7 +635,7 @@ def make_mocked_request(
writer: Any = sentinel,
protocol: Any = sentinel,
transport: Any = sentinel,
- payload: Any = sentinel,
+ payload: StreamReader = EMPTY_PAYLOAD,
sslcontext: Optional[SSLContext] = None,
client_max_size: int = 1024**2,
loop: Any = ...,
@@ -651,9 +704,6 @@ def make_mocked_request(
protocol.transport = transport
protocol.writer = writer
- if payload is sentinel:
- payload = mock.Mock()
-
req = Request(
message, payload, protocol, writer, task, loop, client_max_size=client_max_size
)
diff --git a/contrib/python/aiohttp/aiohttp/tracing.py b/contrib/python/aiohttp/aiohttp/tracing.py
index fe3eda9abb7..067a132464e 100644
--- a/contrib/python/aiohttp/aiohttp/tracing.py
+++ b/contrib/python/aiohttp/aiohttp/tracing.py
@@ -1,5 +1,5 @@
from types import SimpleNamespace
-from typing import TYPE_CHECKING, Awaitable, Optional, Protocol, Type, TypeVar
+from typing import TYPE_CHECKING, Awaitable, Mapping, Optional, Protocol, Type, TypeVar
import attr
from aiosignal import Signal
@@ -42,59 +42,29 @@ class TraceConfig:
def __init__(
self, trace_config_ctx_factory: Type[SimpleNamespace] = SimpleNamespace
) -> None:
- self._on_request_start: _TracingSignal[
- TraceRequestStartParams
- ] = Signal(self)
- self._on_request_chunk_sent: _TracingSignal[
- TraceRequestChunkSentParams
- ] = Signal(self)
- self._on_response_chunk_received: _TracingSignal[
- TraceResponseChunkReceivedParams
- ] = Signal(self)
- self._on_request_end: _TracingSignal[TraceRequestEndParams] = Signal(
- self
+ self._on_request_start: _TracingSignal[TraceRequestStartParams] = (
+ Signal(self)
)
- self._on_request_exception: _TracingSignal[
- TraceRequestExceptionParams
- ] = Signal(self)
- self._on_request_redirect: _TracingSignal[
- TraceRequestRedirectParams
- ] = Signal(self)
- self._on_connection_queued_start: _TracingSignal[
- TraceConnectionQueuedStartParams
- ] = Signal(self)
- self._on_connection_queued_end: _TracingSignal[
- TraceConnectionQueuedEndParams
- ] = Signal(self)
- self._on_connection_create_start: _TracingSignal[
- TraceConnectionCreateStartParams
- ] = Signal(self)
- self._on_connection_create_end: _TracingSignal[
- TraceConnectionCreateEndParams
- ] = Signal(self)
- self._on_connection_reuseconn: _TracingSignal[
- TraceConnectionReuseconnParams
- ] = Signal(self)
- self._on_dns_resolvehost_start: _TracingSignal[
- TraceDnsResolveHostStartParams
- ] = Signal(self)
- self._on_dns_resolvehost_end: _TracingSignal[
- TraceDnsResolveHostEndParams
- ] = Signal(self)
- self._on_dns_cache_hit: _TracingSignal[
- TraceDnsCacheHitParams
- ] = Signal(self)
- self._on_dns_cache_miss: _TracingSignal[
- TraceDnsCacheMissParams
- ] = Signal(self)
- self._on_request_headers_sent: _TracingSignal[
- TraceRequestHeadersSentParams
- ] = Signal(self)
+ self._on_request_chunk_sent: _TracingSignal[TraceRequestChunkSentParams] = Signal(self)
+ self._on_response_chunk_received: _TracingSignal[TraceResponseChunkReceivedParams] = Signal(self)
+ self._on_request_end: _TracingSignal[TraceRequestEndParams] = Signal(self)
+ self._on_request_exception: _TracingSignal[TraceRequestExceptionParams] = Signal(self)
+ self._on_request_redirect: _TracingSignal[TraceRequestRedirectParams] = Signal(self)
+ self._on_connection_queued_start: _TracingSignal[TraceConnectionQueuedStartParams] = Signal(self)
+ self._on_connection_queued_end: _TracingSignal[TraceConnectionQueuedEndParams] = Signal(self)
+ self._on_connection_create_start: _TracingSignal[TraceConnectionCreateStartParams] = Signal(self)
+ self._on_connection_create_end: _TracingSignal[TraceConnectionCreateEndParams] = Signal(self)
+ self._on_connection_reuseconn: _TracingSignal[TraceConnectionReuseconnParams] = Signal(self)
+ self._on_dns_resolvehost_start: _TracingSignal[TraceDnsResolveHostStartParams] = Signal(self)
+ self._on_dns_resolvehost_end: _TracingSignal[TraceDnsResolveHostEndParams] = Signal(self)
+ self._on_dns_cache_hit: _TracingSignal[TraceDnsCacheHitParams] = (Signal(self))
+ self._on_dns_cache_miss: _TracingSignal[TraceDnsCacheMissParams] = (Signal(self))
+ self._on_request_headers_sent: _TracingSignal[TraceRequestHeadersSentParams] = Signal(self)
self._trace_config_ctx_factory = trace_config_ctx_factory
def trace_config_ctx(
- self, trace_request_ctx: Optional[SimpleNamespace] = None
+ self, trace_request_ctx: Optional[Mapping[str, str]] = None
) -> SimpleNamespace:
"""Return a new trace_config_ctx instance"""
return self._trace_config_ctx_factory(trace_request_ctx=trace_request_ctx)
@@ -122,7 +92,9 @@ class TraceConfig:
return self._on_request_start
@property
- def on_request_chunk_sent(self) -> "_TracingSignal[TraceRequestChunkSentParams]":
+ def on_request_chunk_sent(
+ self,
+ ) -> "_TracingSignal[TraceRequestChunkSentParams]":
return self._on_request_chunk_sent
@property
diff --git a/contrib/python/aiohttp/aiohttp/typedefs.py b/contrib/python/aiohttp/aiohttp/typedefs.py
index 5e963e1a10e..668d4fc344f 100644
--- a/contrib/python/aiohttp/aiohttp/typedefs.py
+++ b/contrib/python/aiohttp/aiohttp/typedefs.py
@@ -7,6 +7,8 @@ from typing import (
Callable,
Iterable,
Mapping,
+ Protocol,
+ Sequence,
Tuple,
Union,
)
@@ -14,6 +16,18 @@ from typing import (
from multidict import CIMultiDict, CIMultiDictProxy, MultiDict, MultiDictProxy, istr
from yarl import URL
+try:
+ # Available in yarl>=1.10.0
+ from yarl import Query as _Query
+except ImportError: # pragma: no cover
+ SimpleQuery = Union[str, int, float] # pragma: no cover
+ QueryVariable = Union[SimpleQuery, "Sequence[SimpleQuery]"] # pragma: no cover
+ _Query = Union[ # type: ignore[misc] # pragma: no cover
+ None, str, "Mapping[str, QueryVariable]", "Sequence[Tuple[str, QueryVariable]]"
+ ]
+
+Query = _Query
+
DEFAULT_JSON_ENCODER = json.dumps
DEFAULT_JSON_DECODER = json.loads
@@ -34,7 +48,13 @@ else:
Byteish = Union[bytes, bytearray, memoryview]
JSONEncoder = Callable[[Any], str]
JSONDecoder = Callable[[str], Any]
-LooseHeaders = Union[Mapping[Union[str, istr], str], _CIMultiDict, _CIMultiDictProxy]
+LooseHeaders = Union[
+ Mapping[str, str],
+ Mapping[istr, str],
+ _CIMultiDict,
+ _CIMultiDictProxy,
+ Iterable[Tuple[Union[str, istr], str]],
+]
RawHeaders = Tuple[Tuple[bytes, bytes], ...]
StrOrURL = Union[str, URL]
@@ -51,4 +71,5 @@ LooseCookies = Union[
Handler = Callable[["Request"], Awaitable["StreamResponse"]]
Middleware = Callable[["Request", Handler], Awaitable["StreamResponse"]]
+
PathLike = Union[str, "os.PathLike[str]"]
diff --git a/contrib/python/aiohttp/aiohttp/web.py b/contrib/python/aiohttp/aiohttp/web.py
index e9116507f4e..88bf14bf828 100644
--- a/contrib/python/aiohttp/aiohttp/web.py
+++ b/contrib/python/aiohttp/aiohttp/web.py
@@ -7,7 +7,6 @@ import warnings
from argparse import ArgumentParser
from collections.abc import Iterable
from contextlib import suppress
-from functools import partial
from importlib import import_module
from typing import (
Any,
@@ -21,7 +20,6 @@ from typing import (
Union,
cast,
)
-from weakref import WeakSet
from .abc import AbstractAccessLogger
from .helpers import AppKey as AppKey
@@ -320,23 +318,6 @@ async def _run_app(
reuse_port: Optional[bool] = None,
handler_cancellation: bool = False,
) -> None:
- async def wait(
- starting_tasks: "WeakSet[asyncio.Task[object]]", shutdown_timeout: float
- ) -> None:
- # Wait for pending tasks for a given time limit.
- t = asyncio.current_task()
- assert t is not None
- starting_tasks.add(t)
- with suppress(asyncio.TimeoutError):
- await asyncio.wait_for(_wait(starting_tasks), timeout=shutdown_timeout)
-
- async def _wait(exclude: "WeakSet[asyncio.Task[object]]") -> None:
- t = asyncio.current_task()
- assert t is not None
- exclude.add(t)
- while tasks := asyncio.all_tasks().difference(exclude):
- await asyncio.wait(tasks)
-
# An internal function to actually do all dirty job for application running
if asyncio.iscoroutine(app):
app = await app
@@ -355,12 +336,6 @@ async def _run_app(
)
await runner.setup()
- # On shutdown we want to avoid waiting on tasks which run forever.
- # It's very likely that all tasks which run forever will have been created by
- # the time we have completed the application startup (in runner.setup()),
- # so we just record all running tasks here and exclude them later.
- starting_tasks: "WeakSet[asyncio.Task[object]]" = WeakSet(asyncio.all_tasks())
- runner.shutdown_callback = partial(wait, starting_tasks, shutdown_timeout)
sites: List[BaseSite] = []
@@ -545,10 +520,14 @@ def run_app(
except (GracefulExit, KeyboardInterrupt): # pragma: no cover
pass
finally:
- _cancel_tasks({main_task}, loop)
- _cancel_tasks(asyncio.all_tasks(loop), loop)
- loop.run_until_complete(loop.shutdown_asyncgens())
- loop.close()
+ try:
+ main_task.cancel()
+ with suppress(asyncio.CancelledError):
+ loop.run_until_complete(main_task)
+ finally:
+ _cancel_tasks(asyncio.all_tasks(loop), loop)
+ loop.run_until_complete(loop.shutdown_asyncgens())
+ loop.close()
def main(argv: List[str]) -> None:
diff --git a/contrib/python/aiohttp/aiohttp/web_app.py b/contrib/python/aiohttp/aiohttp/web_app.py
index 8e0e91bcfe3..ab11981a8a5 100644
--- a/contrib/python/aiohttp/aiohttp/web_app.py
+++ b/contrib/python/aiohttp/aiohttp/web_app.py
@@ -1,7 +1,7 @@
import asyncio
import logging
import warnings
-from functools import partial, update_wrapper
+from functools import lru_cache, partial, update_wrapper
from typing import (
TYPE_CHECKING,
Any,
@@ -38,7 +38,7 @@ from .helpers import DEBUG, AppKey
from .http_parser import RawRequestMessage
from .log import web_logger
from .streams import StreamReader
-from .typedefs import Middleware
+from .typedefs import Handler, Middleware
from .web_exceptions import NotAppKeyWarning
from .web_log import AccessLogger
from .web_middlewares import _fix_request_current_app
@@ -76,6 +76,18 @@ else:
_T = TypeVar("_T")
_U = TypeVar("_U")
+_Resource = TypeVar("_Resource", bound=AbstractResource)
+
+
+@lru_cache(None)
+def _build_middlewares(
+ handler: Handler, apps: Tuple["Application", ...]
+) -> Callable[[Request], Awaitable[StreamResponse]]:
+ """Apply middlewares to handler."""
+ for app in apps[::-1]:
+ for m, _ in app._middlewares_handlers: # type: ignore[union-attr]
+ handler = update_wrapper(partial(m, handler=handler), handler) # type: ignore[misc]
+ return handler
class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
@@ -88,6 +100,7 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
"_handler_args",
"_middlewares",
"_middlewares_handlers",
+ "_has_legacy_middlewares",
"_run_middlewares",
"_state",
"_frozen",
@@ -142,6 +155,7 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
self._middlewares_handlers: _MiddlewaresHandlers = None
# initialized on freezing
self._run_middlewares: Optional[bool] = None
+ self._has_legacy_middlewares: bool = True
self._state: Dict[Union[AppKey[Any], str], object] = {}
self._frozen = False
@@ -183,12 +197,10 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
return self is other
@overload # type: ignore[override]
- def __getitem__(self, key: AppKey[_T]) -> _T:
- ...
+ def __getitem__(self, key: AppKey[_T]) -> _T: ...
@overload
- def __getitem__(self, key: str) -> Any:
- ...
+ def __getitem__(self, key: str) -> Any: ...
def __getitem__(self, key: Union[str, AppKey[_T]]) -> Any:
return self._state[key]
@@ -202,12 +214,10 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
)
@overload # type: ignore[override]
- def __setitem__(self, key: AppKey[_T], value: _T) -> None:
- ...
+ def __setitem__(self, key: AppKey[_T], value: _T) -> None: ...
@overload
- def __setitem__(self, key: str, value: Any) -> None:
- ...
+ def __setitem__(self, key: str, value: Any) -> None: ...
def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
self._check_frozen()
@@ -231,17 +241,17 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
def __iter__(self) -> Iterator[Union[str, AppKey[Any]]]:
return iter(self._state)
+ def __hash__(self) -> int:
+ return id(self)
+
@overload # type: ignore[override]
- def get(self, key: AppKey[_T], default: None = ...) -> Optional[_T]:
- ...
+ def get(self, key: AppKey[_T], default: None = ...) -> Optional[_T]: ...
@overload
- def get(self, key: AppKey[_T], default: _U) -> Union[_T, _U]:
- ...
+ def get(self, key: AppKey[_T], default: _U) -> Union[_T, _U]: ...
@overload
- def get(self, key: str, default: Any = ...) -> Any:
- ...
+ def get(self, key: str, default: Any = ...) -> Any: ...
def get(self, key: Union[str, AppKey[_T]], default: Any = None) -> Any:
return self._state.get(key, default)
@@ -290,6 +300,9 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
self._on_shutdown.freeze()
self._on_cleanup.freeze()
self._middlewares_handlers = tuple(self._prepare_middleware())
+ self._has_legacy_middlewares = any(
+ not new_style for _, new_style in self._middlewares_handlers
+ )
# If current app and any subapp do not have middlewares avoid run all
# of the code footprint that it implies, which have a middleware
@@ -334,7 +347,7 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
reg_handler("on_shutdown")
reg_handler("on_cleanup")
- def add_subapp(self, prefix: str, subapp: "Application") -> AbstractResource:
+ def add_subapp(self, prefix: str, subapp: "Application") -> PrefixedSubAppResource:
if not isinstance(prefix, str):
raise TypeError("Prefix must be str")
prefix = prefix.rstrip("/")
@@ -344,8 +357,8 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
return self._add_subapp(factory, subapp)
def _add_subapp(
- self, resource_factory: Callable[[], AbstractResource], subapp: "Application"
- ) -> AbstractResource:
+ self, resource_factory: Callable[[], _Resource], subapp: "Application"
+ ) -> _Resource:
if self.frozen:
raise RuntimeError("Cannot add sub application to frozen application")
if subapp.frozen:
@@ -359,7 +372,7 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
subapp._set_loop(self._loop)
return resource
- def add_domain(self, domain: str, subapp: "Application") -> AbstractResource:
+ def add_domain(self, domain: str, subapp: "Application") -> MatchedSubAppResource:
if not isinstance(domain, str):
raise TypeError("Domain must be str")
elif "*" in domain:
@@ -520,29 +533,30 @@ class Application(MutableMapping[Union[str, AppKey[Any]], Any]):
match_info.freeze()
- resp = None
request._match_info = match_info
- expect = request.headers.get(hdrs.EXPECT)
- if expect:
+
+ if request.headers.get(hdrs.EXPECT):
resp = await match_info.expect_handler(request)
await request.writer.drain()
+ if resp is not None:
+ return resp
- if resp is None:
- handler = match_info.handler
+ handler = match_info.handler
- if self._run_middlewares:
+ if self._run_middlewares:
+ if not self._has_legacy_middlewares:
+ handler = _build_middlewares(handler, match_info.apps)
+ else:
for app in match_info.apps[::-1]:
for m, new_style in app._middlewares_handlers: # type: ignore[union-attr]
if new_style:
handler = update_wrapper(
- partial(m, handler=handler), handler
+ partial(m, handler=handler), handler # type: ignore[misc]
)
else:
handler = await m(app, handler) # type: ignore[arg-type,assignment]
- resp = await handler(request)
-
- return resp
+ return await handler(request)
def __call__(self) -> "Application":
"""gunicorn compatibility"""
@@ -585,7 +599,7 @@ class CleanupContext(_CleanupContextBase):
await it.__anext__()
except StopAsyncIteration:
pass
- except Exception as exc:
+ except (Exception, asyncio.CancelledError) as exc:
errors.append(exc)
else:
errors.append(RuntimeError(f"{it!r} has more than one 'yield'"))
diff --git a/contrib/python/aiohttp/aiohttp/web_fileresponse.py b/contrib/python/aiohttp/aiohttp/web_fileresponse.py
index 7dbe50f0a5a..f0de75e9f1b 100644
--- a/contrib/python/aiohttp/aiohttp/web_fileresponse.py
+++ b/contrib/python/aiohttp/aiohttp/web_fileresponse.py
@@ -1,7 +1,11 @@
import asyncio
-import mimetypes
import os
import pathlib
+import sys
+from contextlib import suppress
+from mimetypes import MimeTypes
+from stat import S_ISREG
+from types import MappingProxyType
from typing import ( # noqa
IO,
TYPE_CHECKING,
@@ -22,6 +26,8 @@ from .abc import AbstractStreamWriter
from .helpers import ETAG_ANY, ETag, must_be_empty_body
from .typedefs import LooseHeaders, PathLike
from .web_exceptions import (
+ HTTPForbidden,
+ HTTPNotFound,
HTTPNotModified,
HTTPPartialContent,
HTTPPreconditionFailed,
@@ -40,6 +46,35 @@ _T_OnChunkSent = Optional[Callable[[bytes], Awaitable[None]]]
NOSENDFILE: Final[bool] = bool(os.environ.get("AIOHTTP_NOSENDFILE"))
+CONTENT_TYPES: Final[MimeTypes] = MimeTypes()
+
+if sys.version_info < (3, 9):
+ CONTENT_TYPES.encodings_map[".br"] = "br"
+
+# File extension to IANA encodings map that will be checked in the order defined.
+ENCODING_EXTENSIONS = MappingProxyType(
+ {ext: CONTENT_TYPES.encodings_map[ext] for ext in (".br", ".gz")}
+)
+
+FALLBACK_CONTENT_TYPE = "application/octet-stream"
+
+# Provide additional MIME type/extension pairs to be recognized.
+# https://en.wikipedia.org/wiki/List_of_archive_formats#Compression_only
+ADDITIONAL_CONTENT_TYPES = MappingProxyType(
+ {
+ "application/gzip": ".gz",
+ "application/x-brotli": ".br",
+ "application/x-bzip2": ".bz2",
+ "application/x-compress": ".Z",
+ "application/x-xz": ".xz",
+ }
+)
+
+# Add custom pairs and clear the encodings map so guess_type ignores them.
+CONTENT_TYPES.encodings_map.clear()
+for content_type, extension in ADDITIONAL_CONTENT_TYPES.items():
+ CONTENT_TYPES.add_type(content_type, extension) # type: ignore[attr-defined]
+
class FileResponse(StreamResponse):
"""A response object can be used to send files."""
@@ -101,10 +136,12 @@ class FileResponse(StreamResponse):
return writer
@staticmethod
- def _strong_etag_match(etag_value: str, etags: Tuple[ETag, ...]) -> bool:
+ def _etag_match(etag_value: str, etags: Tuple[ETag, ...], *, weak: bool) -> bool:
if len(etags) == 1 and etags[0].value == ETAG_ANY:
return True
- return any(etag.value == etag_value for etag in etags if not etag.is_weak)
+ return any(
+ etag.value == etag_value for etag in etags if weak or not etag.is_weak
+ )
async def _not_modified(
self, request: "BaseRequest", etag_value: str, last_modified: float
@@ -124,42 +161,60 @@ class FileResponse(StreamResponse):
self.content_length = 0
return await super().prepare(request)
- def _get_file_path_stat_and_gzip(
- self, check_for_gzipped_file: bool
- ) -> Tuple[pathlib.Path, os.stat_result, bool]:
- """Return the file path, stat result, and gzip status.
+ def _get_file_path_stat_encoding(
+ self, accept_encoding: str
+ ) -> Tuple[pathlib.Path, os.stat_result, Optional[str]]:
+ """Return the file path, stat result, and encoding.
+
+ If an uncompressed file is returned, the encoding is set to
+ :py:data:`None`.
This method should be called from a thread executor
since it calls os.stat which may block.
"""
- filepath = self._path
- if check_for_gzipped_file:
- gzip_path = filepath.with_name(filepath.name + ".gz")
- try:
- return gzip_path, gzip_path.stat(), True
- except OSError:
- # Fall through and try the non-gzipped file
- pass
+ file_path = self._path
+ for file_extension, file_encoding in ENCODING_EXTENSIONS.items():
+ if file_encoding not in accept_encoding:
+ continue
+
+ compressed_path = file_path.with_suffix(file_path.suffix + file_extension)
+ with suppress(OSError):
+ # Do not follow symlinks and ignore any non-regular files.
+ st = compressed_path.lstat()
+ if S_ISREG(st.st_mode):
+ return compressed_path, st, file_encoding
- return filepath, filepath.stat(), False
+ # Fallback to the uncompressed file
+ return file_path, file_path.stat(), None
async def prepare(self, request: "BaseRequest") -> Optional[AbstractStreamWriter]:
- loop = asyncio.get_event_loop()
+ loop = asyncio.get_running_loop()
# Encoding comparisons should be case-insensitive
# https://www.rfc-editor.org/rfc/rfc9110#section-8.4.1
- check_for_gzipped_file = (
- "gzip" in request.headers.get(hdrs.ACCEPT_ENCODING, "").lower()
- )
- filepath, st, gzip = await loop.run_in_executor(
- None, self._get_file_path_stat_and_gzip, check_for_gzipped_file
- )
+ accept_encoding = request.headers.get(hdrs.ACCEPT_ENCODING, "").lower()
+ try:
+ file_path, st, file_encoding = await loop.run_in_executor(
+ None, self._get_file_path_stat_encoding, accept_encoding
+ )
+ except OSError:
+ # Most likely to be FileNotFoundError or OSError for circular
+ # symlinks in python >= 3.13, so respond with 404.
+ self.set_status(HTTPNotFound.status_code)
+ return await super().prepare(request)
+
+ # Forbid special files like sockets, pipes, devices, etc.
+ if not S_ISREG(st.st_mode):
+ self.set_status(HTTPForbidden.status_code)
+ return await super().prepare(request)
etag_value = f"{st.st_mtime_ns:x}-{st.st_size:x}"
last_modified = st.st_mtime
- # https://tools.ietf.org/html/rfc7232#section-6
+ # https://www.rfc-editor.org/rfc/rfc9110#section-13.1.1-2
ifmatch = request.if_match
- if ifmatch is not None and not self._strong_etag_match(etag_value, ifmatch):
+ if ifmatch is not None and not self._etag_match(
+ etag_value, ifmatch, weak=False
+ ):
return await self._precondition_failed(request)
unmodsince = request.if_unmodified_since
@@ -170,8 +225,11 @@ class FileResponse(StreamResponse):
):
return await self._precondition_failed(request)
+ # https://www.rfc-editor.org/rfc/rfc9110#section-13.1.2-2
ifnonematch = request.if_none_match
- if ifnonematch is not None and self._strong_etag_match(etag_value, ifnonematch):
+ if ifnonematch is not None and self._etag_match(
+ etag_value, ifnonematch, weak=True
+ ):
return await self._not_modified(request, etag_value, last_modified)
modsince = request.if_modified_since
@@ -182,15 +240,6 @@ class FileResponse(StreamResponse):
):
return await self._not_modified(request, etag_value, last_modified)
- if hdrs.CONTENT_TYPE not in self.headers:
- ct, encoding = mimetypes.guess_type(str(filepath))
- if not ct:
- ct = "application/octet-stream"
- should_set_ct = True
- else:
- encoding = "gzip" if gzip else None
- should_set_ct = False
-
status = self._status
file_size = st.st_size
count = file_size
@@ -265,11 +314,16 @@ class FileResponse(StreamResponse):
# return a HTTP 206 for a Range request.
self.set_status(status)
- if should_set_ct:
- self.content_type = ct # type: ignore[assignment]
- if encoding:
- self.headers[hdrs.CONTENT_ENCODING] = encoding
- if gzip:
+ # If the Content-Type header is not already set, guess it based on the
+ # extension of the request path. The encoding returned by guess_type
+ # can be ignored since the map was cleared above.
+ if hdrs.CONTENT_TYPE not in self.headers:
+ self.content_type = (
+ CONTENT_TYPES.guess_type(self._path)[0] or FALLBACK_CONTENT_TYPE
+ )
+
+ if file_encoding:
+ self.headers[hdrs.CONTENT_ENCODING] = file_encoding
self.headers[hdrs.VARY] = hdrs.ACCEPT_ENCODING
# Disable compression if we are already sending
# a compressed file since we don't want to double
@@ -293,7 +347,12 @@ class FileResponse(StreamResponse):
if count == 0 or must_be_empty_body(request.method, self.status):
return await super().prepare(request)
- fobj = await loop.run_in_executor(None, filepath.open, "rb")
+ try:
+ fobj = await loop.run_in_executor(None, file_path.open, "rb")
+ except PermissionError:
+ self.set_status(HTTPForbidden.status_code)
+ return await super().prepare(request)
+
if start: # be aware that start could be None or int=0 here.
offset = start
else:
diff --git a/contrib/python/aiohttp/aiohttp/web_middlewares.py b/contrib/python/aiohttp/aiohttp/web_middlewares.py
index 5da1533c0df..2f1f5f58e6e 100644
--- a/contrib/python/aiohttp/aiohttp/web_middlewares.py
+++ b/contrib/python/aiohttp/aiohttp/web_middlewares.py
@@ -110,7 +110,12 @@ def normalize_path_middleware(
def _fix_request_current_app(app: "Application") -> Middleware:
@middleware
async def impl(request: Request, handler: Handler) -> StreamResponse:
- with request.match_info.set_current_app(app):
+ match_info = request.match_info
+ prev = match_info.current_app
+ match_info.current_app = app
+ try:
return await handler(request)
+ finally:
+ match_info.current_app = prev
return impl
diff --git a/contrib/python/aiohttp/aiohttp/web_protocol.py b/contrib/python/aiohttp/aiohttp/web_protocol.py
index f083b13eb0f..85eb70d5a0b 100644
--- a/contrib/python/aiohttp/aiohttp/web_protocol.py
+++ b/contrib/python/aiohttp/aiohttp/web_protocol.py
@@ -1,5 +1,6 @@
import asyncio
import asyncio.streams
+import sys
import traceback
import warnings
from collections import deque
@@ -26,7 +27,7 @@ import yarl
from .abc import AbstractAccessLogger, AbstractStreamWriter
from .base_protocol import BaseProtocol
-from .helpers import ceil_timeout, set_exception
+from .helpers import ceil_timeout
from .http import (
HttpProcessingError,
HttpRequestParser,
@@ -37,7 +38,7 @@ from .http import (
from .log import access_logger, server_logger
from .streams import EMPTY_PAYLOAD, StreamReader
from .tcp_helpers import tcp_keepalive
-from .web_exceptions import HTTPException
+from .web_exceptions import HTTPException, HTTPInternalServerError
from .web_log import AccessLogger
from .web_request import BaseRequest
from .web_response import Response, StreamResponse
@@ -83,6 +84,9 @@ class PayloadAccessError(Exception):
"""Payload was accessed after response was sent."""
+_PAYLOAD_ACCESS_ERROR = PayloadAccessError()
+
+
@attr.s(auto_attribs=True, frozen=True, slots=True)
class _ErrInfo:
status: int
@@ -133,8 +137,6 @@ class RequestHandler(BaseProtocol):
"""
- KEEPALIVE_RESCHEDULE_DELAY = 1
-
__slots__ = (
"_request_count",
"_keepalive",
@@ -142,12 +144,13 @@ class RequestHandler(BaseProtocol):
"_request_handler",
"_request_factory",
"_tcp_keepalive",
- "_keepalive_time",
+ "_next_keepalive_close_time",
"_keepalive_handle",
"_keepalive_timeout",
"_lingering_time",
"_messages",
"_message_tail",
+ "_handler_waiter",
"_waiter",
"_task_handler",
"_upgrade",
@@ -162,6 +165,7 @@ class RequestHandler(BaseProtocol):
"_force_close",
"_current_request",
"_timeout_ceil_threshold",
+ "_request_in_progress",
)
def __init__(
@@ -195,7 +199,7 @@ class RequestHandler(BaseProtocol):
self._tcp_keepalive = tcp_keepalive
# placeholder to be replaced on keepalive timeout setup
- self._keepalive_time = 0.0
+ self._next_keepalive_close_time = 0.0
self._keepalive_handle: Optional[asyncio.Handle] = None
self._keepalive_timeout = keepalive_timeout
self._lingering_time = float(lingering_time)
@@ -204,6 +208,7 @@ class RequestHandler(BaseProtocol):
self._message_tail = b""
self._waiter: Optional[asyncio.Future[None]] = None
+ self._handler_waiter: Optional[asyncio.Future[None]] = None
self._task_handler: Optional[asyncio.Task[None]] = None
self._upgrade = False
@@ -237,6 +242,7 @@ class RequestHandler(BaseProtocol):
self._close = False
self._force_close = False
+ self._request_in_progress = False
def __repr__(self) -> str:
return "<{} {}>".format(
@@ -259,25 +265,44 @@ class RequestHandler(BaseProtocol):
if self._keepalive_handle is not None:
self._keepalive_handle.cancel()
- if self._waiter:
- self._waiter.cancel()
-
- # wait for handlers
- with suppress(asyncio.CancelledError, asyncio.TimeoutError):
+ # Wait for graceful handler completion
+ if self._request_in_progress:
+ # The future is only created when we are shutting
+ # down while the handler is still processing a request
+ # to avoid creating a future for every request.
+ self._handler_waiter = self._loop.create_future()
+ try:
+ async with ceil_timeout(timeout):
+ await self._handler_waiter
+ except (asyncio.CancelledError, asyncio.TimeoutError):
+ self._handler_waiter = None
+ if (
+ sys.version_info >= (3, 11)
+ and (task := asyncio.current_task())
+ and task.cancelling()
+ ):
+ raise
+ # Then cancel handler and wait
+ try:
async with ceil_timeout(timeout):
if self._current_request is not None:
self._current_request._cancel(asyncio.CancelledError())
if self._task_handler is not None and not self._task_handler.done():
- await self._task_handler
+ await asyncio.shield(self._task_handler)
+ except (asyncio.CancelledError, asyncio.TimeoutError):
+ if (
+ sys.version_info >= (3, 11)
+ and (task := asyncio.current_task())
+ and task.cancelling()
+ ):
+ raise
# force-close non-idle handler
if self._task_handler is not None:
self._task_handler.cancel()
- if self.transport is not None:
- self.transport.close()
- self.transport = None
+ self.force_close()
def connection_made(self, transport: asyncio.BaseTransport) -> None:
super().connection_made(transport)
@@ -286,22 +311,27 @@ class RequestHandler(BaseProtocol):
if self._tcp_keepalive:
tcp_keepalive(real_transport)
- self._task_handler = self._loop.create_task(self.start())
assert self._manager is not None
self._manager.connection_made(self, real_transport)
+ loop = self._loop
+ if sys.version_info >= (3, 12):
+ task = asyncio.Task(self.start(), loop=loop, eager_start=True)
+ else:
+ task = loop.create_task(self.start())
+ self._task_handler = task
+
def connection_lost(self, exc: Optional[BaseException]) -> None:
if self._manager is None:
return
self._manager.connection_lost(self, exc)
- super().connection_lost(exc)
-
# Grab value before setting _manager to None.
handler_cancellation = self._manager.handler_cancellation
+ self.force_close()
+ super().connection_lost(exc)
self._manager = None
- self._force_close = True
self._request_factory = None
self._request_handler = None
self._request_parser = None
@@ -314,9 +344,6 @@ class RequestHandler(BaseProtocol):
exc = ConnectionResetError("Connection lost")
self._current_request._cancel(exc)
- if self._waiter is not None:
- self._waiter.cancel()
-
if handler_cancellation and self._task_handler is not None:
self._task_handler.cancel()
@@ -421,23 +448,21 @@ class RequestHandler(BaseProtocol):
self.logger.exception(*args, **kw)
def _process_keepalive(self) -> None:
+ self._keepalive_handle = None
if self._force_close or not self._keepalive:
return
- next = self._keepalive_time + self._keepalive_timeout
+ loop = self._loop
+ now = loop.time()
+ close_time = self._next_keepalive_close_time
+ if now <= close_time:
+ # Keep alive close check fired too early, reschedule
+ self._keepalive_handle = loop.call_at(close_time, self._process_keepalive)
+ return
# handler in idle state
- if self._waiter:
- if self._loop.time() > next:
- self.force_close()
- return
-
- # not all request handlers are done,
- # reschedule itself to next second
- self._keepalive_handle = self._loop.call_later(
- self.KEEPALIVE_RESCHEDULE_DELAY,
- self._process_keepalive,
- )
+ if self._waiter and not self._waiter.done():
+ self.force_close()
async def _handle_request(
self,
@@ -445,7 +470,7 @@ class RequestHandler(BaseProtocol):
start_time: float,
request_handler: Callable[[BaseRequest], Awaitable[StreamResponse]],
) -> Tuple[StreamResponse, bool]:
- assert self._request_handler is not None
+ self._request_in_progress = True
try:
try:
self._current_request = request
@@ -454,16 +479,16 @@ class RequestHandler(BaseProtocol):
self._current_request = None
except HTTPException as exc:
resp = exc
- reset = await self.finish_response(request, resp, start_time)
+ resp, reset = await self.finish_response(request, resp, start_time)
except asyncio.CancelledError:
raise
except asyncio.TimeoutError as exc:
self.log_debug("Request handler timed out.", exc_info=exc)
resp = self.handle_error(request, 504)
- reset = await self.finish_response(request, resp, start_time)
+ resp, reset = await self.finish_response(request, resp, start_time)
except Exception as exc:
resp = self.handle_error(request, 500, exc)
- reset = await self.finish_response(request, resp, start_time)
+ resp, reset = await self.finish_response(request, resp, start_time)
else:
# Deprecation warning (See #2415)
if getattr(resp, "__http_exception__", False):
@@ -474,7 +499,11 @@ class RequestHandler(BaseProtocol):
DeprecationWarning,
)
- reset = await self.finish_response(request, resp, start_time)
+ resp, reset = await self.finish_response(request, resp, start_time)
+ finally:
+ self._request_in_progress = False
+ if self._handler_waiter is not None:
+ self._handler_waiter.set_result(None)
return resp, reset
@@ -488,7 +517,7 @@ class RequestHandler(BaseProtocol):
keep_alive(True) specified.
"""
loop = self._loop
- handler = self._task_handler
+ handler = asyncio.current_task(loop)
assert handler is not None
manager = self._manager
assert manager is not None
@@ -503,8 +532,6 @@ class RequestHandler(BaseProtocol):
# wait for next request
self._waiter = loop.create_future()
await self._waiter
- except asyncio.CancelledError:
- break
finally:
self._waiter = None
@@ -524,12 +551,14 @@ class RequestHandler(BaseProtocol):
request = self._request_factory(message, payload, self, writer, handler)
try:
# a new task is used for copy context vars (#3406)
- task = self._loop.create_task(
- self._handle_request(request, start, request_handler)
- )
+ coro = self._handle_request(request, start, request_handler)
+ if sys.version_info >= (3, 12):
+ task = asyncio.Task(coro, loop=loop, eager_start=True)
+ else:
+ task = loop.create_task(coro)
try:
resp, reset = await task
- except (asyncio.CancelledError, ConnectionError):
+ except ConnectionError:
self.log_debug("Ignored premature client disconnection")
break
@@ -553,27 +582,30 @@ class RequestHandler(BaseProtocol):
now = loop.time()
end_t = now + lingering_time
- with suppress(asyncio.TimeoutError, asyncio.CancelledError):
+ try:
while not payload.is_eof() and now < end_t:
async with ceil_timeout(end_t - now):
# read and ignore
await payload.readany()
now = loop.time()
+ except (asyncio.CancelledError, asyncio.TimeoutError):
+ if (
+ sys.version_info >= (3, 11)
+ and (t := asyncio.current_task())
+ and t.cancelling()
+ ):
+ raise
# if payload still uncompleted
if not payload.is_eof() and not self._force_close:
self.log_debug("Uncompleted request.")
self.close()
- set_exception(payload, PayloadAccessError())
+ payload.set_exception(_PAYLOAD_ACCESS_ERROR)
except asyncio.CancelledError:
- self.log_debug("Ignored premature client disconnection ")
- break
- except RuntimeError as exc:
- if self.debug:
- self.log_exception("Unhandled runtime exception", exc_info=exc)
- self.force_close()
+ self.log_debug("Ignored premature client disconnection")
+ raise
except Exception as exc:
self.log_exception("Unhandled exception", exc_info=exc)
self.force_close()
@@ -584,11 +616,12 @@ class RequestHandler(BaseProtocol):
if self._keepalive and not self._close:
# start keep-alive timer
if keepalive_timeout is not None:
- now = self._loop.time()
- self._keepalive_time = now
+ now = loop.time()
+ close_time = now + keepalive_timeout
+ self._next_keepalive_close_time = close_time
if self._keepalive_handle is None:
self._keepalive_handle = loop.call_at(
- now + keepalive_timeout, self._process_keepalive
+ close_time, self._process_keepalive
)
else:
break
@@ -601,7 +634,7 @@ class RequestHandler(BaseProtocol):
async def finish_response(
self, request: BaseRequest, resp: StreamResponse, start_time: float
- ) -> bool:
+ ) -> Tuple[StreamResponse, bool]:
"""Prepare the response and write_eof, then log access.
This has to
@@ -609,6 +642,7 @@ class RequestHandler(BaseProtocol):
can get exception information. Returns True if the client disconnects
prematurely.
"""
+ request._finish()
if self._request_parser is not None:
self._request_parser.set_upgraded(False)
self._upgrade = False
@@ -619,22 +653,26 @@ class RequestHandler(BaseProtocol):
prepare_meth = resp.prepare
except AttributeError:
if resp is None:
- raise RuntimeError("Missing return " "statement on request handler")
+ self.log_exception("Missing return statement on request handler")
else:
- raise RuntimeError(
- "Web-handler should return "
- "a response instance, "
+ self.log_exception(
+ "Web-handler should return a response instance, "
"got {!r}".format(resp)
)
+ exc = HTTPInternalServerError()
+ resp = Response(
+ status=exc.status, reason=exc.reason, text=exc.text, headers=exc.headers
+ )
+ prepare_meth = resp.prepare
try:
await prepare_meth(request)
await resp.write_eof()
except ConnectionError:
self.log_access(request, resp, start_time)
- return True
- else:
- self.log_access(request, resp, start_time)
- return False
+ return resp, True
+
+ self.log_access(request, resp, start_time)
+ return resp, False
def handle_error(
self,
diff --git a/contrib/python/aiohttp/aiohttp/web_request.py b/contrib/python/aiohttp/aiohttp/web_request.py
index 4bc670a798c..eca71e4413a 100644
--- a/contrib/python/aiohttp/aiohttp/web_request.py
+++ b/contrib/python/aiohttp/aiohttp/web_request.py
@@ -79,7 +79,7 @@ class FileField:
filename: str
file: io.BufferedReader
content_type: str
- headers: "CIMultiDictProxy[str]"
+ headers: CIMultiDictProxy[str]
_TCHAR: Final[str] = string.digits + string.ascii_letters + r"!#$%&'*+.^_`|~-"
@@ -99,10 +99,10 @@ _QUOTED_STRING: Final[str] = r'"(?:{quoted_pair}|{qdtext})*"'.format(
qdtext=_QDTEXT, quoted_pair=_QUOTED_PAIR
)
-_FORWARDED_PAIR: Final[
- str
-] = r"({token})=({token}|{quoted_string})(:\d{{1,4}})?".format(
- token=_TOKEN, quoted_string=_QUOTED_STRING
+_FORWARDED_PAIR: Final[str] = (
+ r"({token})=({token}|{quoted_string})(:\d{{1,4}})?".format(
+ token=_TOKEN, quoted_string=_QUOTED_STRING
+ )
)
_QUOTED_PAIR_REPLACE_RE: Final[Pattern[str]] = re.compile(r"\\([\t !-~])")
@@ -169,12 +169,16 @@ class BaseRequest(MutableMapping[str, Any], HeadersMixin):
self._payload_writer = payload_writer
self._payload = payload
- self._headers = message.headers
+ self._headers: CIMultiDictProxy[str] = message.headers
self._method = message.method
self._version = message.version
self._cache: Dict[str, Any] = {}
url = message.url
if url.is_absolute():
+ if scheme is not None:
+ url = url.with_scheme(scheme)
+ if host is not None:
+ url = url.with_host(host)
# absolute URL is given,
# override auto-calculating url, host, and scheme
# all other properties should be good
@@ -184,6 +188,10 @@ class BaseRequest(MutableMapping[str, Any], HeadersMixin):
self._rel_url = url.relative()
else:
self._rel_url = message.url
+ if scheme is not None:
+ self._cache["scheme"] = scheme
+ if host is not None:
+ self._cache["host"] = host
self._post: Optional[MultiDictProxy[Union[str, bytes, FileField]]] = None
self._read_bytes: Optional[bytes] = None
@@ -197,10 +205,6 @@ class BaseRequest(MutableMapping[str, Any], HeadersMixin):
self._transport_sslcontext = transport.get_extra_info("sslcontext")
self._transport_peername = transport.get_extra_info("peername")
- if scheme is not None:
- self._cache["scheme"] = scheme
- if host is not None:
- self._cache["host"] = host
if remote is not None:
self._cache["remote"] = remote
@@ -235,7 +239,8 @@ class BaseRequest(MutableMapping[str, Any], HeadersMixin):
# a copy semantic
dct["headers"] = CIMultiDictProxy(CIMultiDict(headers))
dct["raw_headers"] = tuple(
- (k.encode("utf-8"), v.encode("utf-8")) for k, v in headers.items()
+ (k.encode("utf-8"), v.encode("utf-8"))
+ for k, v in dct["headers"].items()
)
message = self._message._replace(**dct)
@@ -481,7 +486,7 @@ class BaseRequest(MutableMapping[str, Any], HeadersMixin):
@reify
def query(self) -> "MultiMapping[str]":
"""A multidict with all the variables in the query string."""
- return MultiDictProxy(self._rel_url.query)
+ return self._rel_url.query
@reify
def query_string(self) -> str:
@@ -492,7 +497,7 @@ class BaseRequest(MutableMapping[str, Any], HeadersMixin):
return self._rel_url.query_string
@reify
- def headers(self) -> "MultiMapping[str]":
+ def headers(self) -> CIMultiDictProxy[str]:
"""A case-insensitive multidict proxy with all headers."""
return self._headers
@@ -819,6 +824,18 @@ class BaseRequest(MutableMapping[str, Any], HeadersMixin):
def _cancel(self, exc: BaseException) -> None:
set_exception(self._payload, exc)
+ def _finish(self) -> None:
+ if self._post is None or self.content_type != "multipart/form-data":
+ return
+
+ # NOTE: Release file descriptors for the
+ # NOTE: `tempfile.Temporaryfile`-created `_io.BufferedRandom`
+ # NOTE: instances of files sent within multipart request body
+ # NOTE: via HTTP POST request.
+ for file_name, file_field_object in self._post.items():
+ if isinstance(file_field_object, FileField):
+ file_field_object.file.close()
+
class Request(BaseRequest):
@@ -898,4 +915,5 @@ class Request(BaseRequest):
if match_info is None:
return
for app in match_info._apps:
- await app.on_response_prepare.send(self, response)
+ if on_response_prepare := app.on_response_prepare:
+ await on_response_prepare.send(self, response)
diff --git a/contrib/python/aiohttp/aiohttp/web_response.py b/contrib/python/aiohttp/aiohttp/web_response.py
index 40d6f01ecaa..4307b2a98c8 100644
--- a/contrib/python/aiohttp/aiohttp/web_response.py
+++ b/contrib/python/aiohttp/aiohttp/web_response.py
@@ -41,6 +41,8 @@ from .http import SERVER_SOFTWARE, HttpVersion10, HttpVersion11
from .payload import Payload
from .typedefs import JSONEncoder, LooseHeaders
+REASON_PHRASES = {http_status.value: http_status.phrase for http_status in HTTPStatus}
+
__all__ = ("ContentCoding", "StreamResponse", "Response", "json_response")
@@ -52,6 +54,7 @@ else:
BaseClass = collections.abc.MutableMapping
+# TODO(py311): Convert to StrEnum for wider use
class ContentCoding(enum.Enum):
# The content codings that we have support for.
#
@@ -62,6 +65,8 @@ class ContentCoding(enum.Enum):
identity = "identity"
+CONTENT_CODINGS = {coding.value: coding for coding in ContentCoding}
+
############################################################
# HTTP Response classes
############################################################
@@ -71,6 +76,8 @@ class StreamResponse(BaseClass, HeadersMixin):
_length_check = True
+ _body: Union[None, bytes, bytearray, Payload]
+
def __init__(
self,
*,
@@ -97,11 +104,11 @@ class StreamResponse(BaseClass, HeadersMixin):
else:
self._headers = CIMultiDict()
- self.set_status(status, reason)
+ self._set_status(status, reason)
@property
def prepared(self) -> bool:
- return self._payload_writer is not None
+ return self._eof_sent or self._payload_writer is not None
@property
def task(self) -> "Optional[asyncio.Task[None]]":
@@ -131,15 +138,15 @@ class StreamResponse(BaseClass, HeadersMixin):
status: int,
reason: Optional[str] = None,
) -> None:
- assert not self.prepared, (
- "Cannot change the response status code after " "the headers have been sent"
- )
+ assert (
+ not self.prepared
+ ), "Cannot change the response status code after the headers have been sent"
+ self._set_status(status, reason)
+
+ def _set_status(self, status: int, reason: Optional[str]) -> None:
self._status = int(status)
if reason is None:
- try:
- reason = HTTPStatus(self._status).phrase
- except ValueError:
- reason = ""
+ reason = REASON_PHRASES.get(self._status, "")
self._reason = reason
@property
@@ -175,7 +182,7 @@ class StreamResponse(BaseClass, HeadersMixin):
) -> None:
"""Enables response compression encoding."""
# Backwards compatibility for when force was a bool <0.17.
- if type(force) == bool:
+ if isinstance(force, bool):
force = ContentCoding.deflate if force else ContentCoding.identity
warnings.warn(
"Using boolean for force is deprecated #3318", DeprecationWarning
@@ -403,8 +410,8 @@ class StreamResponse(BaseClass, HeadersMixin):
# Encoding comparisons should be case-insensitive
# https://www.rfc-editor.org/rfc/rfc9110#section-8.4.1
accept_encoding = request.headers.get(hdrs.ACCEPT_ENCODING, "").lower()
- for coding in ContentCoding:
- if coding.value in accept_encoding:
+ for value, coding in CONTENT_CODINGS.items():
+ if value in accept_encoding:
await self._do_start_compression(coding)
return
@@ -499,9 +506,7 @@ class StreamResponse(BaseClass, HeadersMixin):
assert writer is not None
# status line
version = request.version
- status_line = "HTTP/{}.{} {} {}".format(
- version[0], version[1], self._status, self._reason
- )
+ status_line = f"HTTP/{version[0]}.{version[1]} {self._status} {self._reason}"
await writer.write_headers(status_line, self._headers)
async def write(self, data: bytes) -> None:
@@ -650,21 +655,17 @@ class Response(StreamResponse):
return self._body
@body.setter
- def body(self, body: bytes) -> None:
+ def body(self, body: Any) -> None:
if body is None:
- self._body: Optional[bytes] = None
- self._body_payload: bool = False
+ self._body = None
elif isinstance(body, (bytes, bytearray)):
self._body = body
- self._body_payload = False
else:
try:
self._body = body = payload.PAYLOAD_REGISTRY.get(body)
except payload.LookupError:
raise ValueError("Unsupported body type %r" % type(body))
- self._body_payload = True
-
headers = self._headers
# set content-type
@@ -673,7 +674,7 @@ class Response(StreamResponse):
# copy payload headers
if body.headers:
- for (key, value) in body.headers.items():
+ for key, value in body.headers.items():
if key not in headers:
headers[key] = value
@@ -697,7 +698,6 @@ class Response(StreamResponse):
self.charset = "utf-8"
self._body = text.encode(self.charset)
- self._body_payload = False
self._compressed_body = None
@property
@@ -711,7 +711,7 @@ class Response(StreamResponse):
if self._compressed_body is not None:
# Return length of the compressed body
return len(self._compressed_body)
- elif self._body_payload:
+ elif isinstance(self._body, Payload):
# A payload without content length, or a compressed payload
return None
elif self._body is not None:
@@ -736,9 +736,8 @@ class Response(StreamResponse):
if body is not None:
if self._must_be_empty_body:
await super().write_eof()
- elif self._body_payload:
- payload = cast(Payload, body)
- await payload.write(self._payload_writer)
+ elif isinstance(self._body, Payload):
+ await self._body.write(self._payload_writer)
await super().write_eof()
else:
await super().write_eof(cast(bytes, body))
@@ -746,14 +745,13 @@ class Response(StreamResponse):
await super().write_eof()
async def _start(self, request: "BaseRequest") -> AbstractStreamWriter:
- if should_remove_content_length(request.method, self.status):
- if hdrs.CONTENT_LENGTH in self._headers:
+ if hdrs.CONTENT_LENGTH in self._headers:
+ if should_remove_content_length(request.method, self.status):
del self._headers[hdrs.CONTENT_LENGTH]
- elif not self._chunked and hdrs.CONTENT_LENGTH not in self._headers:
- if self._body_payload:
- size = cast(Payload, self._body).size
- if size is not None:
- self._headers[hdrs.CONTENT_LENGTH] = str(size)
+ elif not self._chunked:
+ if isinstance(self._body, Payload):
+ if self._body.size is not None:
+ self._headers[hdrs.CONTENT_LENGTH] = str(self._body.size)
else:
body_len = len(self._body) if self._body else "0"
# https://www.rfc-editor.org/rfc/rfc9110.html#section-8.6-7
@@ -765,7 +763,7 @@ class Response(StreamResponse):
return await super()._start(request)
async def _do_start_compression(self, coding: ContentCoding) -> None:
- if self._body_payload or self._chunked:
+ if self._chunked or isinstance(self._body, Payload):
return await super()._do_start_compression(coding)
if coding != ContentCoding.identity:
diff --git a/contrib/python/aiohttp/aiohttp/web_routedef.py b/contrib/python/aiohttp/aiohttp/web_routedef.py
index d79cd32a14a..93802141c56 100644
--- a/contrib/python/aiohttp/aiohttp/web_routedef.py
+++ b/contrib/python/aiohttp/aiohttp/web_routedef.py
@@ -162,12 +162,10 @@ class RouteTableDef(Sequence[AbstractRouteDef]):
return f"<RouteTableDef count={len(self._items)}>"
@overload
- def __getitem__(self, index: int) -> AbstractRouteDef:
- ...
+ def __getitem__(self, index: int) -> AbstractRouteDef: ...
@overload
- def __getitem__(self, index: slice) -> List[AbstractRouteDef]:
- ...
+ def __getitem__(self, index: slice) -> List[AbstractRouteDef]: ...
def __getitem__(self, index): # type: ignore[no-untyped-def]
return self._items[index]
diff --git a/contrib/python/aiohttp/aiohttp/web_runner.py b/contrib/python/aiohttp/aiohttp/web_runner.py
index 19a4441658f..0a237ede2c5 100644
--- a/contrib/python/aiohttp/aiohttp/web_runner.py
+++ b/contrib/python/aiohttp/aiohttp/web_runner.py
@@ -3,7 +3,7 @@ import signal
import socket
import warnings
from abc import ABC, abstractmethod
-from typing import Any, Awaitable, Callable, List, Optional, Set
+from typing import Any, List, Optional, Set
from yarl import URL
@@ -108,7 +108,7 @@ class TCPSite(BaseSite):
@property
def name(self) -> str:
scheme = "https" if self._ssl_context else "http"
- host = "0.0.0.0" if self._host is None else self._host
+ host = "0.0.0.0" if not self._host else self._host
return str(URL.build(scheme=scheme, host=host, port=self._port))
async def start(self) -> None:
@@ -238,14 +238,7 @@ class SockSite(BaseSite):
class BaseRunner(ABC):
- __slots__ = (
- "shutdown_callback",
- "_handle_signals",
- "_kwargs",
- "_server",
- "_sites",
- "_shutdown_timeout",
- )
+ __slots__ = ("_handle_signals", "_kwargs", "_server", "_sites", "_shutdown_timeout")
def __init__(
self,
@@ -254,7 +247,6 @@ class BaseRunner(ABC):
shutdown_timeout: float = 60.0,
**kwargs: Any,
) -> None:
- self.shutdown_callback: Optional[Callable[[], Awaitable[None]]] = None
self._handle_signals = handle_signals
self._kwargs = kwargs
self._server: Optional[Server] = None
@@ -312,10 +304,6 @@ class BaseRunner(ABC):
await asyncio.sleep(0)
self._server.pre_shutdown()
await self.shutdown()
-
- if self.shutdown_callback:
- await self.shutdown_callback()
-
await self._server.shutdown(self._shutdown_timeout)
await self._cleanup_server()
diff --git a/contrib/python/aiohttp/aiohttp/web_server.py b/contrib/python/aiohttp/aiohttp/web_server.py
index 52faacb164a..973e7c15440 100644
--- a/contrib/python/aiohttp/aiohttp/web_server.py
+++ b/contrib/python/aiohttp/aiohttp/web_server.py
@@ -1,9 +1,9 @@
"""Low level HTTP server."""
+
import asyncio
from typing import Any, Awaitable, Callable, Dict, List, Optional # noqa
from .abc import AbstractStreamWriter
-from .helpers import get_running_loop
from .http_parser import RawRequestMessage
from .streams import StreamReader
from .web_protocol import RequestHandler, _RequestFactory, _RequestHandler
@@ -22,7 +22,7 @@ class Server:
loop: Optional[asyncio.AbstractEventLoop] = None,
**kwargs: Any
) -> None:
- self._loop = get_running_loop(loop)
+ self._loop = loop or asyncio.get_event_loop()
self._connections: Dict[RequestHandler, asyncio.Transport] = {}
self._kwargs = kwargs
self.requests_count = 0
@@ -43,7 +43,12 @@ class Server:
self, handler: RequestHandler, exc: Optional[BaseException] = None
) -> None:
if handler in self._connections:
- del self._connections[handler]
+ if handler._task_handler:
+ handler._task_handler.add_done_callback(
+ lambda f: self._connections.pop(handler, None)
+ )
+ else:
+ del self._connections[handler]
def _make_request(
self,
diff --git a/contrib/python/aiohttp/aiohttp/web_urldispatcher.py b/contrib/python/aiohttp/aiohttp/web_urldispatcher.py
index 954291f6449..89abdc43fa6 100644
--- a/contrib/python/aiohttp/aiohttp/web_urldispatcher.py
+++ b/contrib/python/aiohttp/aiohttp/web_urldispatcher.py
@@ -8,8 +8,8 @@ import inspect
import keyword
import os
import re
+import sys
import warnings
-from contextlib import contextmanager
from functools import wraps
from pathlib import Path
from types import MappingProxyType
@@ -38,7 +38,7 @@ from typing import (
cast,
)
-from yarl import URL, __version__ as yarl_version # type: ignore[attr-defined]
+from yarl import URL, __version__ as yarl_version
from . import hdrs
from .abc import AbstractMatchInfo, AbstractRouter, AbstractView
@@ -78,6 +78,12 @@ if TYPE_CHECKING:
else:
BaseDict = dict
+CIRCULAR_SYMLINK_ERROR = (
+ (OSError,)
+ if sys.version_info < (3, 10) and sys.platform.startswith("win32")
+ else (RuntimeError,) if sys.version_info < (3, 13) else ()
+)
+
YARL_VERSION: Final[Tuple[int, ...]] = tuple(map(int, yarl_version.split(".")[:2]))
HTTP_METHOD_RE: Final[Pattern[str]] = re.compile(
@@ -199,7 +205,7 @@ class AbstractRoute(abc.ABC):
@wraps(handler)
async def handler_wrapper(request: Request) -> StreamResponse:
- result = old_handler(request)
+ result = old_handler(request) # type: ignore[call-arg]
if asyncio.iscoroutine(result):
result = await result
assert isinstance(result, StreamResponse)
@@ -286,8 +292,8 @@ class UrlMappingMatchInfo(BaseDict, AbstractMatchInfo):
assert app is not None
return app
- @contextmanager
- def set_current_app(self, app: "Application") -> Generator[None, None, None]:
+ @current_app.setter
+ def current_app(self, app: "Application") -> None:
if DEBUG: # pragma: no cover
if app not in self._apps:
raise RuntimeError(
@@ -295,12 +301,7 @@ class UrlMappingMatchInfo(BaseDict, AbstractMatchInfo):
self._apps, app
)
)
- prev = self._current_app
self._current_app = app
- try:
- yield
- finally:
- self._current_app = prev
def freeze(self) -> None:
self._frozen = True
@@ -334,6 +335,8 @@ async def _default_expect_handler(request: Request) -> None:
if request.version == HttpVersion11:
if expect.lower() == "100-continue":
await request.writer.write(b"HTTP/1.1 100 Continue\r\n\r\n")
+ # Reset output_size as we haven't started the main body yet.
+ request.writer.output_size = 0
else:
raise HTTPExpectationFailed(text="Unknown Expect: %s" % expect)
@@ -372,7 +375,7 @@ class Resource(AbstractResource):
async def resolve(self, request: Request) -> _Resolve:
allowed_methods: Set[str] = set()
- match_dict = self._match(request.rel_url.raw_path)
+ match_dict = self._match(request.rel_url.path_safe)
if match_dict is None:
return None, allowed_methods
@@ -422,8 +425,7 @@ class PlainResource(Resource):
# string comparison is about 10 times faster than regexp matching
if self._path == path:
return {}
- else:
- return None
+ return None
def raw_match(self, path: str) -> bool:
return self._path == path
@@ -447,6 +449,7 @@ class DynamicResource(Resource):
def __init__(self, path: str, *, name: Optional[str] = None) -> None:
super().__init__(name=name)
+ self._orig_path = path
pattern = ""
formatter = ""
for part in ROUTE_RE.split(path):
@@ -493,13 +496,12 @@ class DynamicResource(Resource):
match = self._pattern.fullmatch(path)
if match is None:
return None
- else:
- return {
- key: _unquote_path(value) for key, value in match.groupdict().items()
- }
+ return {
+ key: _unquote_path_safe(value) for key, value in match.groupdict().items()
+ }
def raw_match(self, path: str) -> bool:
- return self._formatter == path
+ return self._orig_path == path
def get_info(self) -> _InfoDict:
return {"formatter": self._formatter, "pattern": self._pattern}
@@ -557,14 +559,11 @@ class StaticResource(PrefixResource):
) -> None:
super().__init__(prefix, name=name)
try:
- directory = Path(directory)
- if str(directory).startswith("~"):
- directory = Path(os.path.expanduser(str(directory)))
- directory = directory.resolve()
- if not directory.is_dir():
- raise ValueError("Not a directory")
- except (FileNotFoundError, ValueError) as error:
- raise ValueError(f"No directory exists at '{directory}'") from error
+ directory = Path(directory).expanduser().resolve(strict=True)
+ except FileNotFoundError as error:
+ raise ValueError(f"'{directory}' does not exist") from error
+ if not directory.is_dir():
+ raise ValueError(f"'{directory}' is not a directory")
self._directory = directory
self._show_index = show_index
self._chunk_size = chunk_size
@@ -644,7 +643,7 @@ class StaticResource(PrefixResource):
)
async def resolve(self, request: Request) -> _Resolve:
- path = request.rel_url.raw_path
+ path = request.rel_url.path_safe
method = request.method
allowed_methods = set(self._routes)
if not path.startswith(self._prefix2) and path != self._prefix:
@@ -653,7 +652,7 @@ class StaticResource(PrefixResource):
if method not in allowed_methods:
return None, allowed_methods
- match_dict = {"filename": _unquote_path(path[len(self._prefix) + 1 :])}
+ match_dict = {"filename": _unquote_path_safe(path[len(self._prefix) + 1 :])}
return (UrlMappingMatchInfo(match_dict, self._routes[method]), allowed_methods)
def __len__(self) -> int:
@@ -664,59 +663,64 @@ class StaticResource(PrefixResource):
async def _handle(self, request: Request) -> StreamResponse:
rel_url = request.match_info["filename"]
+ filename = Path(rel_url)
+ if filename.anchor:
+ # rel_url is an absolute name like
+ # /static/\\machine_name\c$ or /static/D:\path
+ # where the static dir is totally different
+ raise HTTPForbidden()
+
+ unresolved_path = self._directory.joinpath(filename)
+ loop = asyncio.get_running_loop()
+ return await loop.run_in_executor(
+ None, self._resolve_path_to_response, unresolved_path
+ )
+
+ def _resolve_path_to_response(self, unresolved_path: Path) -> StreamResponse:
+ """Take the unresolved path and query the file system to form a response."""
+ # Check for access outside the root directory. For follow symlinks, URI
+ # cannot traverse out, but symlinks can. Otherwise, no access outside
+ # root is permitted.
try:
- filename = Path(rel_url)
- if filename.anchor:
- # rel_url is an absolute name like
- # /static/\\machine_name\c$ or /static/D:\path
- # where the static dir is totally different
- raise HTTPForbidden()
- unresolved_path = self._directory.joinpath(filename)
if self._follow_symlinks:
normalized_path = Path(os.path.normpath(unresolved_path))
normalized_path.relative_to(self._directory)
- filepath = normalized_path.resolve()
+ file_path = normalized_path.resolve()
else:
- filepath = unresolved_path.resolve()
- filepath.relative_to(self._directory)
- except (ValueError, FileNotFoundError) as error:
- # relatively safe
- raise HTTPNotFound() from error
- except HTTPForbidden:
- raise
- except Exception as error:
- # perm error or other kind!
- request.app.logger.exception(error)
+ file_path = unresolved_path.resolve()
+ file_path.relative_to(self._directory)
+ except (ValueError, *CIRCULAR_SYMLINK_ERROR) as error:
+ # ValueError is raised for the relative check. Circular symlinks
+ # raise here on resolving for python < 3.13.
raise HTTPNotFound() from error
- # on opening a dir, load its contents if allowed
- if filepath.is_dir():
- if self._show_index:
- try:
+ # if path is a directory, return the contents if permitted. Note the
+ # directory check will raise if a segment is not readable.
+ try:
+ if file_path.is_dir():
+ if self._show_index:
return Response(
- text=self._directory_as_html(filepath), content_type="text/html"
+ text=self._directory_as_html(file_path),
+ content_type="text/html",
)
- except PermissionError:
+ else:
raise HTTPForbidden()
- else:
- raise HTTPForbidden()
- elif filepath.is_file():
- return FileResponse(filepath, chunk_size=self._chunk_size)
- else:
- raise HTTPNotFound
+ except PermissionError as error:
+ raise HTTPForbidden() from error
- def _directory_as_html(self, filepath: Path) -> str:
- # returns directory's index as html
+ # Return the file response, which handles all other checks.
+ return FileResponse(file_path, chunk_size=self._chunk_size)
- # sanity check
- assert filepath.is_dir()
+ def _directory_as_html(self, dir_path: Path) -> str:
+ """returns directory's index as html."""
+ assert dir_path.is_dir()
- relative_path_to_dir = filepath.relative_to(self._directory).as_posix()
+ relative_path_to_dir = dir_path.relative_to(self._directory).as_posix()
index_of = f"Index of /{html_escape(relative_path_to_dir)}"
h1 = f"<h1>{index_of}</h1>"
index_list = []
- dir_index = filepath.iterdir()
+ dir_index = dir_path.iterdir()
for _file in sorted(dir_index):
# show file url as relative to static path
rel_path = _file.relative_to(self._directory).as_posix()
@@ -750,13 +754,20 @@ class PrefixedSubAppResource(PrefixResource):
def __init__(self, prefix: str, app: "Application") -> None:
super().__init__(prefix)
self._app = app
- for resource in app.router.resources():
- resource.add_prefix(prefix)
+ self._add_prefix_to_resources(prefix)
def add_prefix(self, prefix: str) -> None:
super().add_prefix(prefix)
- for resource in self._app.router.resources():
+ self._add_prefix_to_resources(prefix)
+
+ def _add_prefix_to_resources(self, prefix: str) -> None:
+ router = self._app.router
+ for resource in router.resources():
+ # Since the canonical path of a resource is about
+ # to change, we need to unindex it and then reindex
+ router.unindex_resource(resource)
resource.add_prefix(prefix)
+ router.index_resource(resource)
def url_for(self, *args: str, **kwargs: str) -> URL:
raise RuntimeError(".url_for() is not supported " "by sub-application root")
@@ -765,11 +776,6 @@ class PrefixedSubAppResource(PrefixResource):
return {"app": self._app, "prefix": self._prefix}
async def resolve(self, request: Request) -> _Resolve:
- if (
- not request.url.raw_path.startswith(self._prefix2)
- and request.url.raw_path != self._prefix
- ):
- return None, set()
match_info = await self._app.router.resolve(request)
match_info.add_app(self._app)
if isinstance(match_info.http_exception, HTTPMethodNotAllowed):
@@ -1015,12 +1021,39 @@ class UrlDispatcher(AbstractRouter, Mapping[str, AbstractResource]):
super().__init__()
self._resources: List[AbstractResource] = []
self._named_resources: Dict[str, AbstractResource] = {}
+ self._resource_index: dict[str, list[AbstractResource]] = {}
+ self._matched_sub_app_resources: List[MatchedSubAppResource] = []
async def resolve(self, request: Request) -> UrlMappingMatchInfo:
- method = request.method
+ resource_index = self._resource_index
allowed_methods: Set[str] = set()
- for resource in self._resources:
+ # Walk the url parts looking for candidates. We walk the url backwards
+ # to ensure the most explicit match is found first. If there are multiple
+ # candidates for a given url part because there are multiple resources
+ # registered for the same canonical path, we resolve them in a linear
+ # fashion to ensure registration order is respected.
+ url_part = request.rel_url.path_safe
+ while url_part:
+ for candidate in resource_index.get(url_part, ()):
+ match_dict, allowed = await candidate.resolve(request)
+ if match_dict is not None:
+ return match_dict
+ else:
+ allowed_methods |= allowed
+ if url_part == "/":
+ break
+ url_part = url_part.rpartition("/")[0] or "/"
+
+ #
+ # We didn't find any candidates, so we'll try the matched sub-app
+ # resources which we have to walk in a linear fashion because they
+ # have regex/wildcard match rules and we cannot index them.
+ #
+ # For most cases we do not expect there to be many of these since
+ # currently they are only added by `add_domain`
+ #
+ for resource in self._matched_sub_app_resources:
match_dict, allowed = await resource.resolve(request)
if match_dict is not None:
return match_dict
@@ -1028,9 +1061,9 @@ class UrlDispatcher(AbstractRouter, Mapping[str, AbstractResource]):
allowed_methods |= allowed
if allowed_methods:
- return MatchInfoError(HTTPMethodNotAllowed(method, allowed_methods))
- else:
- return MatchInfoError(HTTPNotFound())
+ return MatchInfoError(HTTPMethodNotAllowed(request.method, allowed_methods))
+
+ return MatchInfoError(HTTPNotFound())
def __iter__(self) -> Iterator[str]:
return iter(self._named_resources)
@@ -1086,6 +1119,36 @@ class UrlDispatcher(AbstractRouter, Mapping[str, AbstractResource]):
self._named_resources[name] = resource
self._resources.append(resource)
+ if isinstance(resource, MatchedSubAppResource):
+ # We cannot index match sub-app resources because they have match rules
+ self._matched_sub_app_resources.append(resource)
+ else:
+ self.index_resource(resource)
+
+ def _get_resource_index_key(self, resource: AbstractResource) -> str:
+ """Return a key to index the resource in the resource index."""
+ if "{" in (index_key := resource.canonical):
+ # strip at the first { to allow for variables, and than
+ # rpartition at / to allow for variable parts in the path
+ # For example if the canonical path is `/core/locations{tail:.*}`
+ # the index key will be `/core` since index is based on the
+ # url parts split by `/`
+ index_key = index_key.partition("{")[0].rpartition("/")[0]
+ return index_key.rstrip("/") or "/"
+
+ def index_resource(self, resource: AbstractResource) -> None:
+ """Add a resource to the resource index."""
+ resource_key = self._get_resource_index_key(resource)
+ # There may be multiple resources for a canonical path
+ # so we keep them in a list to ensure that registration
+ # order is respected.
+ self._resource_index.setdefault(resource_key, []).append(resource)
+
+ def unindex_resource(self, resource: AbstractResource) -> None:
+ """Remove a resource from the resource index."""
+ resource_key = self._get_resource_index_key(resource)
+ self._resource_index[resource_key].remove(resource)
+
def add_resource(self, path: str, *, name: Optional[str] = None) -> Resource:
if path and not path.startswith("/"):
raise ValueError("path should be started with / or be empty")
@@ -1095,7 +1158,7 @@ class UrlDispatcher(AbstractRouter, Mapping[str, AbstractResource]):
if resource.name == name and resource.raw_match(path):
return cast(Resource, resource)
if not ("{" in path or "}" in path or ROUTE_RE.search(path)):
- resource = PlainResource(_requote_path(path), name=name)
+ resource = PlainResource(path, name=name)
self.register_resource(resource)
return resource
resource = DynamicResource(path, name=name)
@@ -1221,8 +1284,10 @@ def _quote_path(value: str) -> str:
return URL.build(path=value, encoded=False).raw_path
-def _unquote_path(value: str) -> str:
- return URL.build(path=value, encoded=True).path
+def _unquote_path_safe(value: str) -> str:
+ if "%" not in value:
+ return value
+ return value.replace("%2F", "/").replace("%25", "%")
def _requote_path(value: str) -> str:
diff --git a/contrib/python/aiohttp/aiohttp/web_ws.py b/contrib/python/aiohttp/aiohttp/web_ws.py
index 9fe66527539..382223097ea 100644
--- a/contrib/python/aiohttp/aiohttp/web_ws.py
+++ b/contrib/python/aiohttp/aiohttp/web_ws.py
@@ -11,7 +11,7 @@ from multidict import CIMultiDict
from . import hdrs
from .abc import AbstractStreamWriter
-from .helpers import call_later, set_exception, set_result
+from .helpers import calculate_timeout_when, set_exception, set_result
from .http import (
WS_CLOSED_MESSAGE,
WS_CLOSING_MESSAGE,
@@ -81,67 +81,119 @@ class WebSocketResponse(StreamResponse):
self._conn_lost = 0
self._close_code: Optional[int] = None
self._loop: Optional[asyncio.AbstractEventLoop] = None
- self._waiting: Optional[asyncio.Future[bool]] = None
+ self._waiting: bool = False
+ self._close_wait: Optional[asyncio.Future[None]] = None
self._exception: Optional[BaseException] = None
self._timeout = timeout
self._receive_timeout = receive_timeout
self._autoclose = autoclose
self._autoping = autoping
self._heartbeat = heartbeat
+ self._heartbeat_when = 0.0
self._heartbeat_cb: Optional[asyncio.TimerHandle] = None
if heartbeat is not None:
self._pong_heartbeat = heartbeat / 2.0
self._pong_response_cb: Optional[asyncio.TimerHandle] = None
self._compress = compress
self._max_msg_size = max_msg_size
+ self._ping_task: Optional[asyncio.Task[None]] = None
def _cancel_heartbeat(self) -> None:
- if self._pong_response_cb is not None:
- self._pong_response_cb.cancel()
- self._pong_response_cb = None
-
+ self._cancel_pong_response_cb()
if self._heartbeat_cb is not None:
self._heartbeat_cb.cancel()
self._heartbeat_cb = None
+ if self._ping_task is not None:
+ self._ping_task.cancel()
+ self._ping_task = None
+
+ def _cancel_pong_response_cb(self) -> None:
+ if self._pong_response_cb is not None:
+ self._pong_response_cb.cancel()
+ self._pong_response_cb = None
def _reset_heartbeat(self) -> None:
- self._cancel_heartbeat()
+ if self._heartbeat is None:
+ return
+ self._cancel_pong_response_cb()
+ req = self._req
+ timeout_ceil_threshold = (
+ req._protocol._timeout_ceil_threshold if req is not None else 5
+ )
+ loop = self._loop
+ assert loop is not None
+ now = loop.time()
+ when = calculate_timeout_when(now, self._heartbeat, timeout_ceil_threshold)
+ self._heartbeat_when = when
+ if self._heartbeat_cb is None:
+ # We do not cancel the previous heartbeat_cb here because
+ # it generates a significant amount of TimerHandle churn
+ # which causes asyncio to rebuild the heap frequently.
+ # Instead _send_heartbeat() will reschedule the next
+ # heartbeat if it fires too early.
+ self._heartbeat_cb = loop.call_at(when, self._send_heartbeat)
- if self._heartbeat is not None:
- assert self._loop is not None
- self._heartbeat_cb = call_later(
- self._send_heartbeat,
- self._heartbeat,
- self._loop,
- timeout_ceil_threshold=self._req._protocol._timeout_ceil_threshold
- if self._req is not None
- else 5,
+ def _send_heartbeat(self) -> None:
+ self._heartbeat_cb = None
+ loop = self._loop
+ assert loop is not None and self._writer is not None
+ now = loop.time()
+ if now < self._heartbeat_when:
+ # Heartbeat fired too early, reschedule
+ self._heartbeat_cb = loop.call_at(
+ self._heartbeat_when, self._send_heartbeat
)
+ return
- def _send_heartbeat(self) -> None:
- if self._heartbeat is not None and not self._closed:
- assert self._loop is not None
- # fire-and-forget a task is not perfect but maybe ok for
- # sending ping. Otherwise we need a long-living heartbeat
- # task in the class.
- self._loop.create_task(self._writer.ping()) # type: ignore[union-attr]
+ req = self._req
+ timeout_ceil_threshold = (
+ req._protocol._timeout_ceil_threshold if req is not None else 5
+ )
+ when = calculate_timeout_when(now, self._pong_heartbeat, timeout_ceil_threshold)
+ self._cancel_pong_response_cb()
+ self._pong_response_cb = loop.call_at(when, self._pong_not_received)
- if self._pong_response_cb is not None:
- self._pong_response_cb.cancel()
- self._pong_response_cb = call_later(
- self._pong_not_received,
- self._pong_heartbeat,
- self._loop,
- timeout_ceil_threshold=self._req._protocol._timeout_ceil_threshold
- if self._req is not None
- else 5,
- )
+ if sys.version_info >= (3, 12):
+ # Optimization for Python 3.12, try to send the ping
+ # immediately to avoid having to schedule
+ # the task on the event loop.
+ ping_task = asyncio.Task(self._writer.ping(), loop=loop, eager_start=True)
+ else:
+ ping_task = loop.create_task(self._writer.ping())
+
+ if not ping_task.done():
+ self._ping_task = ping_task
+ ping_task.add_done_callback(self._ping_task_done)
+ else:
+ self._ping_task_done(ping_task)
+
+ def _ping_task_done(self, task: "asyncio.Task[None]") -> None:
+ """Callback for when the ping task completes."""
+ if not task.cancelled() and (exc := task.exception()):
+ self._handle_ping_pong_exception(exc)
+ self._ping_task = None
def _pong_not_received(self) -> None:
if self._req is not None and self._req.transport is not None:
- self._closed = True
- self._set_code_close_transport(WSCloseCode.ABNORMAL_CLOSURE)
- self._exception = asyncio.TimeoutError()
+ self._handle_ping_pong_exception(asyncio.TimeoutError())
+
+ def _handle_ping_pong_exception(self, exc: BaseException) -> None:
+ """Handle exceptions raised during ping/pong processing."""
+ if self._closed:
+ return
+ self._set_closed()
+ self._set_code_close_transport(WSCloseCode.ABNORMAL_CLOSURE)
+ self._exception = exc
+ if self._waiting and not self._closing and self._reader is not None:
+ self._reader.feed_data(WSMessage(WSMsgType.ERROR, exc, None))
+
+ def _set_closed(self) -> None:
+ """Set the connection to closed.
+
+ Cancel any heartbeat timers and set the closed flag.
+ """
+ self._closed = True
+ self._cancel_heartbeat()
async def prepare(self, request: BaseRequest) -> AbstractStreamWriter:
# make pre-check to don't hide it by do_handshake() exceptions
@@ -366,20 +418,10 @@ class WebSocketResponse(StreamResponse):
if self._writer is None:
raise RuntimeError("Call .prepare() first")
- self._cancel_heartbeat()
- reader = self._reader
- assert reader is not None
-
- # we need to break `receive()` cycle first,
- # `close()` may be called from different task
- if self._waiting is not None and not self._closed:
- reader.feed_data(WS_CLOSING_MESSAGE, 0)
- await self._waiting
-
if self._closed:
return False
+ self._set_closed()
- self._closed = True
try:
await self._writer.close(code, message)
writer = self._payload_writer
@@ -394,12 +436,21 @@ class WebSocketResponse(StreamResponse):
self._set_code_close_transport(WSCloseCode.ABNORMAL_CLOSURE)
return True
+ reader = self._reader
+ assert reader is not None
+ # we need to break `receive()` cycle before we can call
+ # `reader.read()` as `close()` may be called from different task
+ if self._waiting:
+ assert self._loop is not None
+ assert self._close_wait is None
+ self._close_wait = self._loop.create_future()
+ reader.feed_data(WS_CLOSING_MESSAGE)
+ await self._close_wait
+
if self._closing:
self._close_transport()
return True
- reader = self._reader
- assert reader is not None
try:
async with async_timeout.timeout(self._timeout):
msg = await reader.read()
@@ -411,7 +462,7 @@ class WebSocketResponse(StreamResponse):
self._set_code_close_transport(WSCloseCode.ABNORMAL_CLOSURE)
return True
- if msg.type == WSMsgType.CLOSE:
+ if msg.type is WSMsgType.CLOSE:
self._set_code_close_transport(msg.data)
return True
@@ -423,6 +474,7 @@ class WebSocketResponse(StreamResponse):
"""Set the close code and mark the connection as closing."""
self._closing = True
self._close_code = code
+ self._cancel_heartbeat()
def _set_code_close_transport(self, code: WSCloseCode) -> None:
"""Set the close code and close the transport."""
@@ -440,8 +492,9 @@ class WebSocketResponse(StreamResponse):
loop = self._loop
assert loop is not None
+ receive_timeout = timeout or self._receive_timeout
while True:
- if self._waiting is not None:
+ if self._waiting:
raise RuntimeError("Concurrent call to receive() is not allowed")
if self._closed:
@@ -453,15 +506,22 @@ class WebSocketResponse(StreamResponse):
return WS_CLOSING_MESSAGE
try:
- self._waiting = loop.create_future()
+ self._waiting = True
try:
- async with async_timeout.timeout(timeout or self._receive_timeout):
+ if receive_timeout:
+ # Entering the context manager and creating
+ # Timeout() object can take almost 50% of the
+ # run time in this loop so we avoid it if
+ # there is no read timeout.
+ async with async_timeout.timeout(receive_timeout):
+ msg = await self._reader.read()
+ else:
msg = await self._reader.read()
self._reset_heartbeat()
finally:
- waiter = self._waiting
- set_result(waiter, True)
- self._waiting = None
+ self._waiting = False
+ if self._close_wait:
+ set_result(self._close_wait, None)
except asyncio.TimeoutError:
raise
except EofStream:
@@ -478,7 +538,7 @@ class WebSocketResponse(StreamResponse):
await self.close()
return WSMessage(WSMsgType.ERROR, exc, None)
- if msg.type == WSMsgType.CLOSE:
+ if msg.type is WSMsgType.CLOSE:
self._set_closing(msg.data)
# Could be closed while awaiting reader.
if not self._closed and self._autoclose:
@@ -487,19 +547,19 @@ class WebSocketResponse(StreamResponse):
# want to drain any pending writes as it will
# likely result writing to a broken pipe.
await self.close(drain=False)
- elif msg.type == WSMsgType.CLOSING:
+ elif msg.type is WSMsgType.CLOSING:
self._set_closing(WSCloseCode.OK)
- elif msg.type == WSMsgType.PING and self._autoping:
+ elif msg.type is WSMsgType.PING and self._autoping:
await self.pong(msg.data)
continue
- elif msg.type == WSMsgType.PONG and self._autoping:
+ elif msg.type is WSMsgType.PONG and self._autoping:
continue
return msg
async def receive_str(self, *, timeout: Optional[float] = None) -> str:
msg = await self.receive(timeout)
- if msg.type != WSMsgType.TEXT:
+ if msg.type is not WSMsgType.TEXT:
raise TypeError(
"Received message {}:{!r} is not WSMsgType.TEXT".format(
msg.type, msg.data
@@ -509,7 +569,7 @@ class WebSocketResponse(StreamResponse):
async def receive_bytes(self, *, timeout: Optional[float] = None) -> bytes:
msg = await self.receive(timeout)
- if msg.type != WSMsgType.BINARY:
+ if msg.type is not WSMsgType.BINARY:
raise TypeError(f"Received message {msg.type}:{msg.data!r} is not bytes")
return cast(bytes, msg.data)
@@ -535,5 +595,6 @@ class WebSocketResponse(StreamResponse):
# web_protocol calls this from connection_lost
# or when the server is shutting down.
self._closing = True
+ self._cancel_heartbeat()
if self._reader is not None:
set_exception(self._reader, exc)
diff --git a/contrib/python/aiohttp/patches/04-force-content-type.patch b/contrib/python/aiohttp/patches/04-force-content-type.patch
new file mode 100644
index 00000000000..44569413307
--- /dev/null
+++ b/contrib/python/aiohttp/patches/04-force-content-type.patch
@@ -0,0 +1,12 @@
+--- contrib/python/aiohttp/aiohttp/web_response.py (ddcb92de87597ba3c0a8961e7fdf04a184c227ce)
++++ contrib/python/aiohttp/aiohttp/web_response.py (0978c4fe84e8994e041f045b1447dd8058efa52c)
+@@ -487,8 +487,7 @@ class StreamResponse(BaseClass, HeadersMixin):
+ # https://datatracker.ietf.org/doc/html/rfc9112#section-6.1-13
+ if hdrs.TRANSFER_ENCODING in headers:
+ del headers[hdrs.TRANSFER_ENCODING]
+- elif self.content_length != 0:
+- # https://www.rfc-editor.org/rfc/rfc9110#section-8.3-5
++ else:
+ headers.setdefault(hdrs.CONTENT_TYPE, "application/octet-stream")
+ headers.setdefault(hdrs.DATE, rfc822_formatted_time())
+ headers.setdefault(hdrs.SERVER, SERVER_SOFTWARE)
diff --git a/contrib/python/aiohttp/patches/04-pr11265-support-aiosignal-1.4.patch b/contrib/python/aiohttp/patches/04-pr11265-support-aiosignal-1.4.patch
index 0bfc1cc3a87..3b478e3aca5 100644
--- a/contrib/python/aiohttp/patches/04-pr11265-support-aiosignal-1.4.patch
+++ b/contrib/python/aiohttp/patches/04-pr11265-support-aiosignal-1.4.patch
@@ -1,6 +1,6 @@
--- contrib/python/aiohttp/aiohttp/tracing.py (index)
+++ contrib/python/aiohttp/aiohttp/tracing.py (working tree)
-@@ -12,15 +12,7 @@ if TYPE_CHECKING:
+@@ -12,14 +12,7 @@ if TYPE_CHECKING:
from .client import ClientSession
_ParamT_contra = TypeVar("_ParamT_contra", contravariant=True)
@@ -11,98 +11,83 @@
- __client_session: ClientSession,
- __trace_config_ctx: SimpleNamespace,
- __params: _ParamT_contra,
-- ) -> Awaitable[None]:
-- ...
+- ) -> Awaitable[None]: ...
+ _TracingSignal = Signal[ClientSession, SimpleNamespace, _ParamT_contra]
__all__ = (
-@@ -50,53 +42,53 @@ class TraceConfig:
+@@ -49,54 +42,24 @@ class TraceConfig:
def __init__(
self, trace_config_ctx_factory: Type[SimpleNamespace] = SimpleNamespace
) -> None:
-- self._on_request_start: Signal[
-- _SignalCallback[TraceRequestStartParams]
-+ self._on_request_start: _TracingSignal[
-+ TraceRequestStartParams
- ] = Signal(self)
+- self._on_request_start: Signal[_SignalCallback[TraceRequestStartParams]] = (
++ self._on_request_start: _TracingSignal[TraceRequestStartParams] = (
+ Signal(self)
+ )
- self._on_request_chunk_sent: Signal[
- _SignalCallback[TraceRequestChunkSentParams]
-+ self._on_request_chunk_sent: _TracingSignal[
-+ TraceRequestChunkSentParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_response_chunk_received: Signal[
- _SignalCallback[TraceResponseChunkReceivedParams]
-+ self._on_response_chunk_received: _TracingSignal[
-+ TraceResponseChunkReceivedParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_request_end: Signal[_SignalCallback[TraceRequestEndParams]] = Signal(
-+ self._on_request_end: _TracingSignal[TraceRequestEndParams] = Signal(
- self
- )
+- self
+- )
- self._on_request_exception: Signal[
- _SignalCallback[TraceRequestExceptionParams]
-+ self._on_request_exception: _TracingSignal[
-+ TraceRequestExceptionParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_request_redirect: Signal[
- _SignalCallback[TraceRequestRedirectParams]
-+ self._on_request_redirect: _TracingSignal[
-+ TraceRequestRedirectParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_connection_queued_start: Signal[
- _SignalCallback[TraceConnectionQueuedStartParams]
-+ self._on_connection_queued_start: _TracingSignal[
-+ TraceConnectionQueuedStartParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_connection_queued_end: Signal[
- _SignalCallback[TraceConnectionQueuedEndParams]
-+ self._on_connection_queued_end: _TracingSignal[
-+ TraceConnectionQueuedEndParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_connection_create_start: Signal[
- _SignalCallback[TraceConnectionCreateStartParams]
-+ self._on_connection_create_start: _TracingSignal[
-+ TraceConnectionCreateStartParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_connection_create_end: Signal[
- _SignalCallback[TraceConnectionCreateEndParams]
-+ self._on_connection_create_end: _TracingSignal[
-+ TraceConnectionCreateEndParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_connection_reuseconn: Signal[
- _SignalCallback[TraceConnectionReuseconnParams]
-+ self._on_connection_reuseconn: _TracingSignal[
-+ TraceConnectionReuseconnParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_dns_resolvehost_start: Signal[
- _SignalCallback[TraceDnsResolveHostStartParams]
-+ self._on_dns_resolvehost_start: _TracingSignal[
-+ TraceDnsResolveHostStartParams
- ] = Signal(self)
+- ] = Signal(self)
- self._on_dns_resolvehost_end: Signal[
- _SignalCallback[TraceDnsResolveHostEndParams]
-+ self._on_dns_resolvehost_end: _TracingSignal[
-+ TraceDnsResolveHostEndParams
- ] = Signal(self)
-- self._on_dns_cache_hit: Signal[
-- _SignalCallback[TraceDnsCacheHitParams]
-+ self._on_dns_cache_hit: _TracingSignal[
-+ TraceDnsCacheHitParams
- ] = Signal(self)
-- self._on_dns_cache_miss: Signal[
-- _SignalCallback[TraceDnsCacheMissParams]
-+ self._on_dns_cache_miss: _TracingSignal[
-+ TraceDnsCacheMissParams
- ] = Signal(self)
+- ] = Signal(self)
+- self._on_dns_cache_hit: Signal[_SignalCallback[TraceDnsCacheHitParams]] = (
+- Signal(self)
+- )
+- self._on_dns_cache_miss: Signal[_SignalCallback[TraceDnsCacheMissParams]] = (
+- Signal(self)
+- )
- self._on_request_headers_sent: Signal[
- _SignalCallback[TraceRequestHeadersSentParams]
-+ self._on_request_headers_sent: _TracingSignal[
-+ TraceRequestHeadersSentParams
- ] = Signal(self)
+- ] = Signal(self)
++ self._on_request_chunk_sent: _TracingSignal[TraceRequestChunkSentParams] = Signal(self)
++ self._on_response_chunk_received: _TracingSignal[TraceResponseChunkReceivedParams] = Signal(self)
++ self._on_request_end: _TracingSignal[TraceRequestEndParams] = Signal(self)
++ self._on_request_exception: _TracingSignal[TraceRequestExceptionParams] = Signal(self)
++ self._on_request_redirect: _TracingSignal[TraceRequestRedirectParams] = Signal(self)
++ self._on_connection_queued_start: _TracingSignal[TraceConnectionQueuedStartParams] = Signal(self)
++ self._on_connection_queued_end: _TracingSignal[TraceConnectionQueuedEndParams] = Signal(self)
++ self._on_connection_create_start: _TracingSignal[TraceConnectionCreateStartParams] = Signal(self)
++ self._on_connection_create_end: _TracingSignal[TraceConnectionCreateEndParams] = Signal(self)
++ self._on_connection_reuseconn: _TracingSignal[TraceConnectionReuseconnParams] = Signal(self)
++ self._on_dns_resolvehost_start: _TracingSignal[TraceDnsResolveHostStartParams] = Signal(self)
++ self._on_dns_resolvehost_end: _TracingSignal[TraceDnsResolveHostEndParams] = Signal(self)
++ self._on_dns_cache_hit: _TracingSignal[TraceDnsCacheHitParams] = (Signal(self))
++ self._on_dns_cache_miss: _TracingSignal[TraceDnsCacheMissParams] = (Signal(self))
++ self._on_request_headers_sent: _TracingSignal[TraceRequestHeadersSentParams] = Signal(self)
self._trace_config_ctx_factory = trace_config_ctx_factory
-@@ -126,91 +118,89 @@ class TraceConfig:
+
+@@ -125,91 +88,91 @@ class TraceConfig:
self._on_request_headers_sent.freeze()
@property
@@ -111,10 +96,10 @@
return self._on_request_start
@property
-- def on_request_chunk_sent(
-- self,
+ def on_request_chunk_sent(
+ self,
- ) -> "Signal[_SignalCallback[TraceRequestChunkSentParams]]":
-+ def on_request_chunk_sent(self) -> "_TracingSignal[TraceRequestChunkSentParams]":
++ ) -> "_TracingSignal[TraceRequestChunkSentParams]":
return self._on_request_chunk_sent
@property
diff --git a/contrib/python/aiohttp/patches/05-disable-retries-on-oidemponent-methods.patch b/contrib/python/aiohttp/patches/05-disable-retries-on-oidemponent-methods.patch
new file mode 100644
index 00000000000..8bd072eeabe
--- /dev/null
+++ b/contrib/python/aiohttp/patches/05-disable-retries-on-oidemponent-methods.patch
@@ -0,0 +1,11 @@
+--- contrib/python/aiohttp/aiohttp/client.py (index)
++++ contrib/python/aiohttp/aiohttp/client.py (working tree)
+@@ -574,7 +574,7 @@ class ClientSession:
+ try:
+ with timer:
+ # https://www.rfc-editor.org/rfc/rfc9112.html#name-retrying-requests
+- retry_persistent_connection = method in IDEMPOTENT_METHODS
++ retry_persistent_connection = False #method in IDEMPOTENT_METHODS
+ while True:
+ url, auth_from_url = strip_auth_from_url(url)
+ if not url.raw_host:
diff --git a/contrib/python/aiohttp/patches/06-mypy-silence.patch b/contrib/python/aiohttp/patches/06-mypy-silence.patch
new file mode 100644
index 00000000000..d18dca98aa4
--- /dev/null
+++ b/contrib/python/aiohttp/patches/06-mypy-silence.patch
@@ -0,0 +1,61 @@
+--- contrib/python/aiohttp/aiohttp/client.py
++++ contrib/python/aiohttp/aiohttp/client.py
+@@ -174,11 +174,11 @@ class _RequestOptions(TypedDict, total=False):
+ read_until_eof: bool
+ proxy: Union[StrOrURL, None]
+ proxy_auth: Union[BasicAuth, None]
+- timeout: "Union[ClientTimeout, _SENTINEL, None]"
++ timeout: "Union[ClientTimeout, _SENTINEL, int, float, None]"
+ ssl: Union[SSLContext, bool, Fingerprint]
+ server_hostname: Union[str, None]
+ proxy_headers: Union[LooseHeaders, None]
+- trace_request_ctx: Union[Mapping[str, str], None]
++ trace_request_ctx: Any #Union[Mapping[str, str], None]
+ read_bufsize: Union[int, None]
+ auto_decompress: Union[bool, None]
+ max_line_size: Union[int, None]
+--- contrib/python/aiohttp/aiohttp/typedefs.py
++++ contrib/python/aiohttp/aiohttp/typedefs.py
+@@ -69,12 +69,7 @@ LooseCookies = Union[
+ ]
+
+ Handler = Callable[["Request"], Awaitable["StreamResponse"]]
+-
+-
+-class Middleware(Protocol):
+- def __call__(
+- self, request: "Request", handler: Handler
+- ) -> Awaitable["StreamResponse"]: ...
++Middleware = Callable[["Request", Handler], Awaitable["StreamResponse"]]
+
+
+ PathLike = Union[str, "os.PathLike[str]"]
+--- contrib/python/aiohttp/aiohttp/multipart.py
++++ contrib/python/aiohttp/aiohttp/multipart.py
+@@ -287,7 +287,7 @@ class BodyPartReader:
+ self._content_eof = 0
+ self._cache: Dict[str, Any] = {}
+
+- def __aiter__(self: Self) -> Self:
++ def __aiter__(self: Self):
+ return self
+
+ async def __anext__(self) -> bytes:
+@@ -593,7 +593,7 @@ class MultipartReader:
+ response_wrapper_cls = MultipartResponseWrapper
+ #: Multipart reader class, used to handle multipart/* body parts.
+ #: None points to type(self)
+- multipart_reader_cls: Optional[Type["MultipartReader"]] = None
++ multipart_reader_cls = None
+ #: Body part reader class for non multipart/* content types.
+ part_reader_cls = BodyPartReader
+
+@@ -614,7 +614,7 @@ class MultipartReader:
+ self._at_bof = True
+ self._unread: List[bytes] = []
+
+- def __aiter__(self: Self) -> Self:
++ def __aiter__(self: Self):
+ return self
+
+ async def __anext__(
diff --git a/contrib/python/aiohttp/patches/07-dont-throw-at-newline.patch b/contrib/python/aiohttp/patches/07-dont-throw-at-newline.patch
new file mode 100644
index 00000000000..815dd062c17
--- /dev/null
+++ b/contrib/python/aiohttp/patches/07-dont-throw-at-newline.patch
@@ -0,0 +1,12 @@
+# This patch is revert commit dd5bb073107caa1c764158b87fb8482124aad6c1
+--- contrib/python/aiohttp/aiohttp/web_response.py (index)
++++ contrib/python/aiohttp/aiohttp/web_response.py (working tree)
+@@ -147,8 +147,6 @@ class StreamResponse(BaseClass, HeadersMixin):
+ self._status = int(status)
+ if reason is None:
+ reason = REASON_PHRASES.get(self._status, "")
+- elif "\n" in reason:
+- raise ValueError("Reason cannot contain \\n")
+ self._reason = reason
+
+ @property
diff --git a/contrib/python/aiohttp/patches/99-rep-get-running-loop.sh b/contrib/python/aiohttp/patches/99-rep-get-running-loop.sh
new file mode 100644
index 00000000000..b97011e3c67
--- /dev/null
+++ b/contrib/python/aiohttp/patches/99-rep-get-running-loop.sh
@@ -0,0 +1,4 @@
+# This patch may be dropped after python 3.13 upver
+
+find aiohttp -type f -exec sed --in-place 's|loop or asyncio.get_running_loop|loop or asyncio.get_event_loop|g' '{}' ';'
+
diff --git a/contrib/python/aiohttp/ya.make b/contrib/python/aiohttp/ya.make
index 40b3b6faabe..e714d0fd423 100644
--- a/contrib/python/aiohttp/ya.make
+++ b/contrib/python/aiohttp/ya.make
@@ -2,11 +2,12 @@
PY3_LIBRARY()
-VERSION(3.9.5)
+VERSION(3.10.6)
LICENSE(Apache-2.0)
PEERDIR(
+ contrib/python/aiohappyeyeballs
contrib/python/aiosignal
contrib/python/attrs
contrib/python/frozenlist
diff --git a/contrib/python/fonttools/.dist-info/METADATA b/contrib/python/fonttools/.dist-info/METADATA
index 3e389d79601..5a5dff2816e 100644
--- a/contrib/python/fonttools/.dist-info/METADATA
+++ b/contrib/python/fonttools/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: fonttools
-Version: 4.60.0
+Version: 4.60.1
Summary: Tools to manipulate font files
Home-page: http://github.com/fonttools/fonttools
Author: Just van Rossum
@@ -392,6 +392,18 @@ Have fun!
Changelog
~~~~~~~~~
+4.60.1 (released 2025-09-29)
+----------------------------
+
+- [ufoLib] Reverted accidental method name change in ``UFOReader.getKerningGroupConversionRenameMaps``
+ that broke compatibility with downstream projects like defcon (#3948, #3947, robotools/defcon#478).
+- [ufoLib] Added test coverage for ``getKerningGroupConversionRenameMaps`` method (#3950).
+- [subset] Don't try to subset BASE table; pass it through by default instead (#3949).
+- [subset] Remove empty BaseRecord entries in MarkBasePos lookups (#3897, #3892).
+- [subset] Add pruning for MarkLigPos and MarkMarkPos lookups (#3946).
+- [subset] Remove duplicate features when subsetting (#3945).
+- [Docs] Added documentation for the visitor module (#3944).
+
4.60.0 (released 2025-09-17)
----------------------------
diff --git a/contrib/python/fonttools/fontTools/__init__.py b/contrib/python/fonttools/fontTools/__init__.py
index 8e7f496ee21..7d2f5af5ae4 100644
--- a/contrib/python/fonttools/fontTools/__init__.py
+++ b/contrib/python/fonttools/fontTools/__init__.py
@@ -3,6 +3,6 @@ from fontTools.misc.loggingTools import configLogger
log = logging.getLogger(__name__)
-version = __version__ = "4.60.0"
+version = __version__ = "4.60.1"
__all__ = ["version", "log", "configLogger"]
diff --git a/contrib/python/fonttools/fontTools/misc/visitor.py b/contrib/python/fonttools/fontTools/misc/visitor.py
index 65f305632de..20381f91cb6 100644
--- a/contrib/python/fonttools/fontTools/misc/visitor.py
+++ b/contrib/python/fonttools/fontTools/misc/visitor.py
@@ -79,12 +79,15 @@ class Visitor(object):
def visitObject(self, obj, *args, **kwargs):
"""Called to visit an object. This function loops over all non-private
attributes of the objects and calls any user-registered (via
- @register_attr() or @register_attrs()) visit() functions.
+ ``@register_attr()`` or ``@register_attrs()``) ``visit()`` functions.
- If there is no user-registered visit function, of if there is and it
- returns True, or it returns None (or doesn't return anything) and
- visitor.defaultStop is False (default), then the visitor will proceed
- to call self.visitAttr()"""
+ The visitor will proceed to call ``self.visitAttr()``, unless there is a
+ user-registered visit function and:
+
+ * It returns ``False``; or
+ * It returns ``None`` (or doesn't return anything) and
+ ``visitor.defaultStop`` is ``True`` (non-default).
+ """
keys = sorted(vars(obj).keys())
_visitors = self._visitorsFor(obj)
@@ -121,19 +124,24 @@ class Visitor(object):
def visit(self, obj, *args, **kwargs):
"""This is the main entry to the visitor. The visitor will visit object
- obj.
+ ``obj``.
The visitor will first determine if there is a registered (via
- @register()) visit function for the type of object. If there is, it
- will be called, and (visitor, obj, *args, **kwargs) will be passed to
- the user visit function.
+ ``@register()``) visit function for the type of object. If there is, it
+ will be called, and ``(visitor, obj, *args, **kwargs)`` will be passed
+ to the user visit function.
+
+ The visitor will not recurse if there is a user-registered visit
+ function and:
+
+ * It returns ``False``; or
+ * It returns ``None`` (or doesn't return anything) and
+ ``visitor.defaultStop`` is ``True`` (non-default)
- If there is no user-registered visit function, of if there is and it
- returns True, or it returns None (or doesn't return anything) and
- visitor.defaultStop is False (default), then the visitor will proceed
- to dispatch to one of self.visitObject(), self.visitList(),
- self.visitDict(), or self.visitLeaf() (any of which can be overriden in
- a subclass)."""
+ Otherwise, the visitor will proceed to dispatch to one of
+ ``self.visitObject()``, ``self.visitList()``, ``self.visitDict()``, or
+ ``self.visitLeaf()`` (any of which can be overriden in a subclass).
+ """
visitorFunc = self._visitorsFor(obj).get(None, None)
if visitorFunc is not None:
diff --git a/contrib/python/fonttools/fontTools/subset/__init__.py b/contrib/python/fonttools/fontTools/subset/__init__.py
index 692cdab2af3..2b0ebd3c0f9 100644
--- a/contrib/python/fonttools/fontTools/subset/__init__.py
+++ b/contrib/python/fonttools/fontTools/subset/__init__.py
@@ -272,7 +272,7 @@ Font table options
Specify (=), add to (+=) or exclude from (-=) the comma-separated
set of tables that will be be dropped.
By default, the following tables are dropped:
- 'BASE', 'JSTF', 'DSIG', 'EBDT', 'EBLC', 'EBSC', 'PCLT', 'LTSH'
+ 'JSTF', 'DSIG', 'EBDT', 'EBLC', 'EBSC', 'PCLT', 'LTSH'
and Graphite tables: 'Feat', 'Glat', 'Gloc', 'Silf', 'Sill'.
The tool will attempt to subset the remaining tables.
@@ -827,13 +827,26 @@ def subset_glyphs(self, s):
self.MarkArray.MarkRecord, mark_indices
)
self.MarkArray.MarkCount = len(self.MarkArray.MarkRecord)
- base_indices = self.BaseCoverage.subset(s.glyphs)
+ class_indices = _uniq_sort(v.Class for v in self.MarkArray.MarkRecord)
+
+ intersect_base_indices = self.BaseCoverage.intersect(s.glyphs)
+ base_records = self.BaseArray.BaseRecord
+ num_base_records = len(base_records)
+ base_indices = [
+ i
+ for i in intersect_base_indices
+ if i < num_base_records
+ and any(base_records[i].BaseAnchor[j] is not None for j in class_indices)
+ ]
+ if not base_indices:
+ return False
+
+ self.BaseCoverage.remap(base_indices)
self.BaseArray.BaseRecord = _list_subset(
self.BaseArray.BaseRecord, base_indices
)
self.BaseArray.BaseCount = len(self.BaseArray.BaseRecord)
# Prune empty classes
- class_indices = _uniq_sort(v.Class for v in self.MarkArray.MarkRecord)
self.ClassCount = len(class_indices)
for m in self.MarkArray.MarkRecord:
m.Class = class_indices.index(m.Class)
@@ -867,13 +880,31 @@ def subset_glyphs(self, s):
self.MarkArray.MarkRecord, mark_indices
)
self.MarkArray.MarkCount = len(self.MarkArray.MarkRecord)
- ligature_indices = self.LigatureCoverage.subset(s.glyphs)
+ class_indices = _uniq_sort(v.Class for v in self.MarkArray.MarkRecord)
+
+ intersect_ligature_indices = self.LigatureCoverage.intersect(s.glyphs)
+ ligature_array = self.LigatureArray.LigatureAttach
+ num_ligatures = self.LigatureArray.LigatureCount
+
+ ligature_indices = [
+ i
+ for i in intersect_ligature_indices
+ if i < num_ligatures
+ and any(
+ any(component.LigatureAnchor[j] is not None for j in class_indices)
+ for component in ligature_array[i].ComponentRecord
+ )
+ ]
+
+ if not ligature_indices:
+ return False
+
+ self.LigatureCoverage.remap(ligature_indices)
self.LigatureArray.LigatureAttach = _list_subset(
self.LigatureArray.LigatureAttach, ligature_indices
)
self.LigatureArray.LigatureCount = len(self.LigatureArray.LigatureAttach)
# Prune empty classes
- class_indices = _uniq_sort(v.Class for v in self.MarkArray.MarkRecord)
self.ClassCount = len(class_indices)
for m in self.MarkArray.MarkRecord:
m.Class = class_indices.index(m.Class)
@@ -915,13 +946,26 @@ def subset_glyphs(self, s):
self.Mark1Array.MarkRecord, mark1_indices
)
self.Mark1Array.MarkCount = len(self.Mark1Array.MarkRecord)
- mark2_indices = self.Mark2Coverage.subset(s.glyphs)
+ class_indices = _uniq_sort(v.Class for v in self.Mark1Array.MarkRecord)
+
+ intersect_mark2_indices = self.Mark2Coverage.intersect(s.glyphs)
+ mark2_records = self.Mark2Array.Mark2Record
+ num_mark2_records = len(mark2_records)
+ mark2_indices = [
+ i
+ for i in intersect_mark2_indices
+ if i < num_mark2_records
+ and any(mark2_records[i].Mark2Anchor[j] is not None for j in class_indices)
+ ]
+ if not mark2_indices:
+ return False
+
+ self.Mark2Coverage.remap(mark2_indices)
self.Mark2Array.Mark2Record = _list_subset(
self.Mark2Array.Mark2Record, mark2_indices
)
self.Mark2Array.MarkCount = len(self.Mark2Array.Mark2Record)
# Prune empty classes
- class_indices = _uniq_sort(v.Class for v in self.Mark1Array.MarkRecord)
self.ClassCount = len(class_indices)
for m in self.Mark1Array.MarkRecord:
m.Class = class_indices.index(m.Class)
@@ -1717,6 +1761,19 @@ def subset_features(self, feature_indices):
return bool(self.SubstitutionCount)
+@_add_method(otTables.FeatureTableSubstitution)
+def prune_features(self, feature_index_map):
+ self.ensureDecompiled()
+ self.SubstitutionRecord = [
+ r for r in self.SubstitutionRecord if r.FeatureIndex in feature_index_map.keys()
+ ]
+ # remap feature indices
+ for r in self.SubstitutionRecord:
+ r.FeatureIndex = feature_index_map[r.FeatureIndex]
+ self.SubstitutionCount = len(self.SubstitutionRecord)
+ return bool(self.SubstitutionCount)
+
+
@_add_method(otTables.FeatureVariations)
def subset_features(self, feature_indices):
self.ensureDecompiled()
@@ -1735,6 +1792,24 @@ def subset_features(self, feature_indices):
return bool(self.FeatureVariationCount)
+@_add_method(otTables.FeatureVariations)
+def prune_features(self, feature_index_map):
+ self.ensureDecompiled()
+ for r in self.FeatureVariationRecord:
+ r.FeatureTableSubstitution.prune_features(feature_index_map)
+ # Prune empty records at the end only
+ # https://github.com/fonttools/fonttools/issues/1881
+ while (
+ self.FeatureVariationRecord
+ and not self.FeatureVariationRecord[
+ -1
+ ].FeatureTableSubstitution.SubstitutionCount
+ ):
+ self.FeatureVariationRecord.pop()
+ self.FeatureVariationCount = len(self.FeatureVariationRecord)
+ return bool(self.FeatureVariationCount)
+
+
@_add_method(otTables.DefaultLangSys, otTables.LangSys)
def subset_features(self, feature_indices):
if self.ReqFeatureIndex in feature_indices:
@@ -1751,6 +1826,16 @@ def subset_features(self, feature_indices):
@_add_method(otTables.DefaultLangSys, otTables.LangSys)
+def prune_features(self, feature_index_map):
+ self.ReqFeatureIndex = feature_index_map.get(self.ReqFeatureIndex, 65535)
+ self.FeatureIndex = [
+ feature_index_map[f] for f in self.FeatureIndex if f in feature_index_map.keys()
+ ]
+ self.FeatureCount = len(self.FeatureIndex)
+ return bool(self.FeatureCount or self.ReqFeatureIndex != 65535)
+
+
+@_add_method(otTables.DefaultLangSys, otTables.LangSys)
def collect_features(self):
feature_indices = self.FeatureIndex[:]
if self.ReqFeatureIndex != 65535:
@@ -1774,6 +1859,21 @@ def subset_features(self, feature_indices, keepEmptyDefaultLangSys=False):
@_add_method(otTables.Script)
+def prune_features(self, feature_index_map, keepEmptyDefaultLangSys=False):
+ if (
+ self.DefaultLangSys
+ and not self.DefaultLangSys.prune_features(feature_index_map)
+ and not keepEmptyDefaultLangSys
+ ):
+ self.DefaultLangSys = None
+ self.LangSysRecord = [
+ l for l in self.LangSysRecord if l.LangSys.prune_features(feature_index_map)
+ ]
+ self.LangSysCount = len(self.LangSysRecord)
+ return bool(self.LangSysCount or self.DefaultLangSys)
+
+
+@_add_method(otTables.Script)
def collect_features(self):
feature_indices = [l.LangSys.collect_features() for l in self.LangSysRecord]
if self.DefaultLangSys:
@@ -1795,6 +1895,19 @@ def subset_features(self, feature_indices, retain_empty):
@_add_method(otTables.ScriptList)
+def prune_features(self, feature_index_map, retain_empty):
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1331737#c32
+ self.ScriptRecord = [
+ s
+ for s in self.ScriptRecord
+ if s.Script.prune_features(feature_index_map, s.ScriptTag == "DFLT")
+ or retain_empty
+ ]
+ self.ScriptCount = len(self.ScriptRecord)
+ return bool(self.ScriptCount)
+
+
+@_add_method(otTables.ScriptList)
def collect_features(self):
return _uniq_sort(sum((s.Script.collect_features() for s in self.ScriptRecord), []))
@@ -1981,22 +2094,75 @@ def subset_script_tags(self, tags):
@_add_method(ttLib.getTableClass("GSUB"), ttLib.getTableClass("GPOS"))
def prune_features(self):
- """Remove unreferenced features"""
+ """Remove unreferenced and duplicate features in FeatureList
+ Remove unreferenced features and remap duplicate feature indices in ScriptList and FeatureVariations
+ """
if self.table.ScriptList:
feature_indices = self.table.ScriptList.collect_features()
else:
feature_indices = []
+ (feature_indices, feature_index_map) = self.remap_duplicate_features(
+ feature_indices
+ )
+
if self.table.FeatureList:
self.table.FeatureList.subset_features(feature_indices)
if getattr(self.table, "FeatureVariations", None):
- self.table.FeatureVariations.subset_features(feature_indices)
+ self.table.FeatureVariations.prune_features(feature_index_map)
if self.table.ScriptList:
- self.table.ScriptList.subset_features(
- feature_indices, self.retain_empty_scripts()
+ self.table.ScriptList.prune_features(
+ feature_index_map, self.retain_empty_scripts()
)
@_add_method(ttLib.getTableClass("GSUB"), ttLib.getTableClass("GPOS"))
+def remap_duplicate_features(self, feature_indices):
+ """Return retained feature indices(without duplicates) and remapped feature indices"""
+ features = self.table.FeatureList.FeatureRecord
+
+ unique_features = {}
+ duplicate_features = {}
+ for i in feature_indices:
+ f = features[i]
+ tag = f.FeatureTag
+
+ same_tag_features = unique_features.get(tag)
+ if same_tag_features is None:
+ unique_features[tag] = set([i])
+ duplicate_features[i] = i
+ continue
+
+ found = False
+ for other_i in same_tag_features:
+ if features[other_i] == f:
+ found = True
+ duplicate_features[i] = other_i
+ break
+
+ if not found:
+ same_tag_features.add(i)
+ duplicate_features[i] = i
+
+ ## remap retained feature indices
+ feature_map = {}
+ new_idx = 0
+
+ for i in feature_indices:
+ unique_i = duplicate_features.get(i, i)
+ v = feature_map.get(unique_i)
+ if v is None:
+ feature_map[i] = new_idx
+ new_idx += 1
+ else:
+ feature_map[i] = v
+
+ retained_feature_indices = _uniq_sort(
+ sum((list(s) for s in unique_features.values()), [])
+ )
+ return (retained_feature_indices, feature_map)
+
+
+@_add_method(ttLib.getTableClass("GSUB"), ttLib.getTableClass("GPOS"))
def prune_pre_subset(self, font, options):
# Drop undesired features
if "*" not in options.layout_scripts:
@@ -3145,7 +3311,6 @@ class Options(object):
# spaces in tag names (e.g. "SVG ", "cvt ") are stripped by the argument parser
_drop_tables_default = [
- "BASE",
"JSTF",
"DSIG",
"EBDT",
@@ -3157,6 +3322,7 @@ class Options(object):
_drop_tables_default += ["Feat", "Glat", "Gloc", "Silf", "Sill"] # Graphite
_no_subset_tables_default = [
"avar",
+ "BASE",
"fvar",
"gasp",
"head",
diff --git a/contrib/python/fonttools/fontTools/ufoLib/__init__.py b/contrib/python/fonttools/fontTools/ufoLib/__init__.py
index bfaff5849e4..ca409bdd567 100644
--- a/contrib/python/fonttools/fontTools/ufoLib/__init__.py
+++ b/contrib/python/fonttools/fontTools/ufoLib/__init__.py
@@ -534,7 +534,7 @@ class UFOReader(_UFOBaseIO):
raise UFOLibError(message)
return groups
- def getKerningGroupRenameMaps(
+ def getKerningGroupConversionRenameMaps(
self, validate: Optional[bool] = None
) -> KerningGroupRenameMaps:
"""
@@ -1263,7 +1263,7 @@ class UFOWriter(UFOReader):
}
This is the same form returned by UFOReader's
- getKerningGroupRenameMaps method.
+ getKerningGroupConversionRenameMaps method.
"""
if self._formatVersion >= UFOFormatVersion.FORMAT_3_0:
return # XXX raise an error here
diff --git a/contrib/python/fonttools/ya.make b/contrib/python/fonttools/ya.make
index de9c4ac87cf..d9d73eb7aff 100644
--- a/contrib/python/fonttools/ya.make
+++ b/contrib/python/fonttools/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(4.60.0)
+VERSION(4.60.1)
LICENSE(MIT)
diff --git a/contrib/python/google-auth/py3/.dist-info/METADATA b/contrib/python/google-auth/py3/.dist-info/METADATA
index 45a2da42784..da8612e97b4 100644
--- a/contrib/python/google-auth/py3/.dist-info/METADATA
+++ b/contrib/python/google-auth/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: google-auth
-Version: 2.40.3
+Version: 2.41.0
Summary: Google Authentication Library
Home-page: https://github.com/googleapis/google-auth-library-python
Author: Google Cloud Platform
@@ -25,23 +25,23 @@ Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.7
License-File: LICENSE
-Requires-Dist: cachetools<6.0,>=2.0.0
+Requires-Dist: cachetools<7.0,>=2.0.0
Requires-Dist: pyasn1-modules>=0.2.1
Requires-Dist: rsa<5,>=3.1.4
Provides-Extra: aiohttp
Requires-Dist: aiohttp<4.0.0,>=3.6.2; extra == "aiohttp"
Requires-Dist: requests<3.0.0,>=2.20.0; extra == "aiohttp"
-Provides-Extra: enterprise_cert
+Provides-Extra: enterprise-cert
Requires-Dist: cryptography; extra == "enterprise-cert"
Requires-Dist: pyopenssl; extra == "enterprise-cert"
-Provides-Extra: pyjwt
-Requires-Dist: pyjwt>=2.0; extra == "pyjwt"
-Requires-Dist: cryptography>=38.0.3; extra == "pyjwt"
-Requires-Dist: cryptography<39.0.0; python_version < "3.8" and extra == "pyjwt"
Provides-Extra: pyopenssl
Requires-Dist: pyopenssl>=20.0.0; extra == "pyopenssl"
Requires-Dist: cryptography>=38.0.3; extra == "pyopenssl"
Requires-Dist: cryptography<39.0.0; python_version < "3.8" and extra == "pyopenssl"
+Provides-Extra: pyjwt
+Requires-Dist: pyjwt>=2.0; extra == "pyjwt"
+Requires-Dist: cryptography>=38.0.3; extra == "pyjwt"
+Requires-Dist: cryptography<39.0.0; python_version < "3.8" and extra == "pyjwt"
Provides-Extra: reauth
Requires-Dist: pyu2f>=0.1.5; extra == "reauth"
Provides-Extra: requests
@@ -54,10 +54,13 @@ Requires-Dist: mock; extra == "testing"
Requires-Dist: oauth2client; extra == "testing"
Requires-Dist: pyjwt>=2.0; extra == "testing"
Requires-Dist: cryptography>=38.0.3; extra == "testing"
+Requires-Dist: cryptography<39.0.0; python_version < "3.8" and extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Requires-Dist: pytest-localserver; extra == "testing"
Requires-Dist: pyopenssl>=20.0.0; extra == "testing"
+Requires-Dist: cryptography>=38.0.3; extra == "testing"
+Requires-Dist: cryptography<39.0.0; python_version < "3.8" and extra == "testing"
Requires-Dist: pyu2f>=0.1.5; extra == "testing"
Requires-Dist: responses; extra == "testing"
Requires-Dist: urllib3; extra == "testing"
@@ -68,10 +71,21 @@ Requires-Dist: aioresponses; extra == "testing"
Requires-Dist: pytest-asyncio; extra == "testing"
Requires-Dist: pyopenssl<24.3.0; extra == "testing"
Requires-Dist: aiohttp<3.10.0; extra == "testing"
-Requires-Dist: cryptography<39.0.0; python_version < "3.8" and extra == "testing"
Provides-Extra: urllib3
Requires-Dist: urllib3; extra == "urllib3"
Requires-Dist: packaging; extra == "urllib3"
+Dynamic: author
+Dynamic: author-email
+Dynamic: classifier
+Dynamic: description
+Dynamic: home-page
+Dynamic: keywords
+Dynamic: license
+Dynamic: license-file
+Dynamic: provides-extra
+Dynamic: requires-dist
+Dynamic: requires-python
+Dynamic: summary
Google Auth Python Library
==========================
diff --git a/contrib/python/google-auth/py3/.dist-info/top_level.txt b/contrib/python/google-auth/py3/.dist-info/top_level.txt
index 64f26a32e62..cb429113e0f 100644
--- a/contrib/python/google-auth/py3/.dist-info/top_level.txt
+++ b/contrib/python/google-auth/py3/.dist-info/top_level.txt
@@ -1,3 +1 @@
google
-scripts
-testing
diff --git a/contrib/python/google-auth/py3/google/auth/_default.py b/contrib/python/google-auth/py3/google/auth/_default.py
index cf0cdd77298..2df2b4e02b6 100644
--- a/contrib/python/google-auth/py3/google/auth/_default.py
+++ b/contrib/python/google-auth/py3/google/auth/_default.py
@@ -59,6 +59,38 @@ or "API not enabled" error. See the following page for troubleshooting: \
https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds. \
"""
+_GENERIC_LOAD_METHOD_WARNING = """\
+The {} method is deprecated because of a potential security risk.
+
+This method does not validate the credential configuration. The security
+risk occurs when a credential configuration is accepted from a source that
+is not under your control and used without validation on your side.
+
+If you know that you will be loading credential configurations of a
+specific type, it is recommended to use a credential-type-specific
+load method.
+This will ensure that an unexpected credential type with potential for
+malicious intent is not loaded unintentionally. You might still have to do
+validation for certain credential types. Please follow the recommendations
+for that method. For example, if you want to load only service accounts,
+you can create the service account credentials explicitly:
+
+```
+from google.oauth2 import service_account
+creds = service_account.Credentials.from_service_account_file(filename)
+```
+
+If you are loading your credential configuration from an untrusted source and have
+not mitigated the risks (e.g. by validating the configuration yourself), make
+these changes as soon as possible to prevent security risks to your environment.
+
+Regardless of the method used, it is always your responsibility to validate
+configurations received from external sources.
+
+Refer to https://cloud.google.com/docs/authentication/external/externally-sourced-credentials
+for more details.
+"""
+
# The subject token type used for AWS external_account credentials.
_AWS_SUBJECT_TOKEN_TYPE = "urn:ietf:params:aws:token-type:aws4_request"
@@ -76,6 +108,20 @@ def _warn_about_problematic_credentials(credentials):
warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
+def _warn_about_generic_load_method(method_name): # pragma: NO COVER
+ """Warns that a generic load method is being used.
+
+ This is to discourage use of the generic load methods in favor of
+ more specific methods. The generic methods are more likely to lead to
+ security issues if the input is not validated.
+
+ Args:
+ method_name (str): The name of the method being used.
+ """
+
+ warnings.warn(_GENERIC_LOAD_METHOD_WARNING.format(method_name), DeprecationWarning)
+
+
def load_credentials_from_file(
filename, scopes=None, default_scopes=None, quota_project_id=None, request=None
):
@@ -121,6 +167,8 @@ def load_credentials_from_file(
google.auth.exceptions.DefaultCredentialsError: if the file is in the
wrong format or is missing.
"""
+ _warn_about_generic_load_method("load_credentials_from_file")
+
if not os.path.exists(filename):
raise exceptions.DefaultCredentialsError(
"File {} was not found.".format(filename)
@@ -184,6 +232,7 @@ def load_credentials_from_dict(
google.auth.exceptions.DefaultCredentialsError: if the file is in the
wrong format or is missing.
"""
+ _warn_about_generic_load_method("load_credentials_from_dict")
if not isinstance(info, dict):
raise exceptions.DefaultCredentialsError(
"info object was of type {} but dict type was expected.".format(type(info))
diff --git a/contrib/python/google-auth/py3/google/auth/_helpers.py b/contrib/python/google-auth/py3/google/auth/_helpers.py
index 78fe22f7264..fba0ba3faf8 100644
--- a/contrib/python/google-auth/py3/google/auth/_helpers.py
+++ b/contrib/python/google-auth/py3/google/auth/_helpers.py
@@ -21,6 +21,7 @@ from email.message import Message
import hashlib
import json
import logging
+import os
import sys
from typing import Any, Dict, Mapping, Optional, Union
import urllib
@@ -287,6 +288,46 @@ def unpadded_urlsafe_b64encode(value):
return base64.urlsafe_b64encode(value).rstrip(b"=")
+def get_bool_from_env(variable_name, default=False):
+ """Gets a boolean value from an environment variable.
+
+ The environment variable is interpreted as a boolean with the following
+ (case-insensitive) rules:
+ - "true", "1" are considered true.
+ - "false", "0" are considered false.
+ Any other values will raise an exception.
+
+ Args:
+ variable_name (str): The name of the environment variable.
+ default (bool): The default value if the environment variable is not
+ set.
+
+ Returns:
+ bool: The boolean value of the environment variable.
+
+ Raises:
+ google.auth.exceptions.InvalidValue: If the environment variable is
+ set to a value that can not be interpreted as a boolean.
+ """
+ value = os.environ.get(variable_name)
+
+ if value is None:
+ return default
+
+ value = value.lower()
+
+ if value in ("true", "1"):
+ return True
+ elif value in ("false", "0"):
+ return False
+ else:
+ raise exceptions.InvalidValue(
+ 'Environment variable "{}" must be one of "true", "false", "1", or "0".'.format(
+ variable_name
+ )
+ )
+
+
def is_python_3():
"""Check if the Python interpreter is Python 2 or 3.
diff --git a/contrib/python/google-auth/py3/google/auth/compute_engine/credentials.py b/contrib/python/google-auth/py3/google/auth/compute_engine/credentials.py
index eb50d288b6a..0f518166abc 100644
--- a/contrib/python/google-auth/py3/google/auth/compute_engine/credentials.py
+++ b/contrib/python/google-auth/py3/google/auth/compute_engine/credentials.py
@@ -30,11 +30,16 @@ from google.auth import metrics
from google.auth.compute_engine import _metadata
from google.oauth2 import _client
+_TRUST_BOUNDARY_LOOKUP_ENDPOINT = (
+ "https://iamcredentials.{}/v1/projects/-/serviceAccounts/{}/allowedLocations"
+)
+
class Credentials(
credentials.Scoped,
credentials.CredentialsWithQuotaProject,
credentials.CredentialsWithUniverseDomain,
+ credentials.CredentialsWithTrustBoundary,
):
"""Compute Engine Credentials.
@@ -61,6 +66,7 @@ class Credentials(
scopes=None,
default_scopes=None,
universe_domain=None,
+ trust_boundary=None,
):
"""
Args:
@@ -76,6 +82,7 @@ class Credentials(
provided or None, credential will attempt to fetch the value
from metadata server. If metadata server doesn't have universe
domain endpoint, then the default googleapis.com will be used.
+ trust_boundary (Mapping[str,str]): A credential trust boundary.
"""
super(Credentials, self).__init__()
self._service_account_email = service_account_email
@@ -86,6 +93,7 @@ class Credentials(
if universe_domain:
self._universe_domain = universe_domain
self._universe_domain_cached = True
+ self._trust_boundary = trust_boundary
def _retrieve_info(self, request):
"""Retrieve information about the service account.
@@ -100,16 +108,22 @@ class Credentials(
request, service_account=self._service_account_email
)
+ if not info or "email" not in info:
+ raise exceptions.RefreshError(
+ "Unexpected response from metadata server: "
+ "service account info is missing 'email' field."
+ )
+
self._service_account_email = info["email"]
# Don't override scopes requested by the user.
if self._scopes is None:
- self._scopes = info["scopes"]
+ self._scopes = info.get("scopes")
def _metric_header_for_usage(self):
return metrics.CRED_TYPE_SA_MDS
- def refresh(self, request):
+ def _refresh_token(self, request):
"""Refresh the access token and scopes.
Args:
@@ -132,6 +146,37 @@ class Credentials(
new_exc = exceptions.RefreshError(caught_exc)
raise new_exc from caught_exc
+ def _build_trust_boundary_lookup_url(self):
+ """Builds and returns the URL for the trust boundary lookup API for GCE."""
+ # If the service account email is 'default', we need to get the
+ # actual email address from the metadata server.
+ if self._service_account_email == "default":
+ from google.auth.transport import requests as google_auth_requests
+
+ request = google_auth_requests.Request()
+ try:
+ info = _metadata.get_service_account_info(request, "default")
+ if not info or "email" not in info:
+ raise exceptions.RefreshError(
+ "Unexpected response from metadata server: "
+ "service account info is missing 'email' field."
+ )
+ self._service_account_email = info["email"]
+
+ except exceptions.TransportError as e:
+ # If fetching the service account email fails due to a transport error,
+ # it means we cannot build the trust boundary lookup URL.
+ # Wrap this in a RefreshError so it's caught by _refresh_trust_boundary.
+ raise exceptions.RefreshError(
+ "Failed to get service account email for trust boundary lookup: {}".format(
+ e
+ )
+ ) from e
+
+ return _TRUST_BOUNDARY_LOOKUP_ENDPOINT.format(
+ self.universe_domain, self.service_account_email
+ )
+
@property
def service_account_email(self):
"""The service account email.
@@ -173,8 +218,9 @@ class Credentials(
quota_project_id=quota_project_id,
scopes=self._scopes,
default_scopes=self._default_scopes,
+ universe_domain=self._universe_domain,
+ trust_boundary=self._trust_boundary,
)
- creds._universe_domain = self._universe_domain
creds._universe_domain_cached = self._universe_domain_cached
return creds
@@ -188,8 +234,9 @@ class Credentials(
default_scopes=default_scopes,
service_account_email=self._service_account_email,
quota_project_id=self._quota_project_id,
+ universe_domain=self._universe_domain,
+ trust_boundary=self._trust_boundary,
)
- creds._universe_domain = self._universe_domain
creds._universe_domain_cached = self._universe_domain_cached
return creds
@@ -200,9 +247,23 @@ class Credentials(
default_scopes=self._default_scopes,
service_account_email=self._service_account_email,
quota_project_id=self._quota_project_id,
+ trust_boundary=self._trust_boundary,
universe_domain=universe_domain,
)
+ @_helpers.copy_docstring(credentials.CredentialsWithTrustBoundary)
+ def with_trust_boundary(self, trust_boundary):
+ creds = self.__class__(
+ service_account_email=self._service_account_email,
+ quota_project_id=self._quota_project_id,
+ scopes=self._scopes,
+ default_scopes=self._default_scopes,
+ universe_domain=self._universe_domain,
+ trust_boundary=trust_boundary,
+ )
+ creds._universe_domain_cached = self._universe_domain_cached
+ return creds
+
_DEFAULT_TOKEN_LIFETIME_SECS = 3600 # 1 hour in seconds
_DEFAULT_TOKEN_URI = "https://www.googleapis.com/oauth2/v4/token"
@@ -275,7 +336,7 @@ class IDTokenCredentials(
if use_metadata_identity_endpoint:
if token_uri or additional_claims or service_account_email or signer:
- raise exceptions.MalformedError(
+ raise ValueError(
"If use_metadata_identity_endpoint is set, token_uri, "
"additional_claims, service_account_email, signer arguments"
" must not be set"
@@ -366,7 +427,7 @@ class IDTokenCredentials(
# since the signer is already instantiated,
# the request is not needed
if self._use_metadata_identity_endpoint:
- raise exceptions.MalformedError(
+ raise ValueError(
"If use_metadata_identity_endpoint is set, token_uri" " must not be set"
)
else:
diff --git a/contrib/python/google-auth/py3/google/auth/credentials.py b/contrib/python/google-auth/py3/google/auth/credentials.py
index 2c67e04432a..82c73c3bfd5 100644
--- a/contrib/python/google-auth/py3/google/auth/credentials.py
+++ b/contrib/python/google-auth/py3/google/auth/credentials.py
@@ -18,14 +18,18 @@
import abc
from enum import Enum
import os
+from typing import List
from google.auth import _helpers, environment_vars
from google.auth import exceptions
from google.auth import metrics
from google.auth._credentials_base import _BaseCredentials
+from google.auth._default import _LOGGER
from google.auth._refresh_worker import RefreshThreadManager
DEFAULT_UNIVERSE_DOMAIN = "googleapis.com"
+NO_OP_TRUST_BOUNDARY_LOCATIONS: List[str] = []
+NO_OP_TRUST_BOUNDARY_ENCODED_LOCATIONS = "0x0"
class Credentials(_BaseCredentials):
@@ -178,22 +182,7 @@ class Credentials(_BaseCredentials):
token (Optional[str]): If specified, overrides the current access
token.
"""
- self._apply(headers, token=token)
- """Trust boundary value will be a cached value from global lookup.
-
- The response of trust boundary will be a list of regions and a hex
- encoded representation.
-
- An example of global lookup response:
- {
- "locations": [
- "us-central1", "us-east1", "europe-west1", "asia-east1"
- ]
- "encoded_locations": "0xA30"
- }
- """
- if self._trust_boundary is not None:
- headers["x-allowed-locations"] = self._trust_boundary["encoded_locations"]
+ self._apply(headers, token)
if self.quota_project_id:
headers["x-goog-user-project"] = self.quota_project_id
@@ -299,6 +288,161 @@ class CredentialsWithUniverseDomain(Credentials):
)
+class CredentialsWithTrustBoundary(Credentials):
+ """Abstract base for credentials supporting ``with_trust_boundary`` factory"""
+
+ @abc.abstractmethod
+ def _refresh_token(self, request):
+ """Refreshes the access token.
+
+ Args:
+ request (google.auth.transport.Request): The object used to make
+ HTTP requests.
+
+ Raises:
+ google.auth.exceptions.RefreshError: If the credentials could
+ not be refreshed.
+ """
+ raise NotImplementedError("_refresh_token must be implemented")
+
+ def with_trust_boundary(self, trust_boundary):
+ """Returns a copy of these credentials with a modified trust boundary.
+
+ Args:
+ trust_boundary Mapping[str, str]: The trust boundary to use for the
+ credential. This should be a map with a "locations" key that maps to
+ a list of GCP regions, and a "encodedLocations" key that maps to a
+ hex string.
+
+ Returns:
+ google.auth.credentials.Credentials: A new credentials instance.
+ """
+ raise NotImplementedError("This credential does not support trust boundaries.")
+
+ def _is_trust_boundary_lookup_required(self):
+ """Checks if a trust boundary lookup is required.
+
+ A lookup is required if the feature is enabled via an environment
+ variable, the universe domain is supported, and a no-op boundary
+ is not already cached.
+
+ Returns:
+ bool: True if a trust boundary lookup is required, False otherwise.
+ """
+ # 1. Check if the feature is enabled via environment variable.
+ if not _helpers.get_bool_from_env(
+ environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED, default=False
+ ):
+ return False
+
+ # 2. Skip trust boundary flow for non-default universe domains.
+ if self.universe_domain != DEFAULT_UNIVERSE_DOMAIN:
+ return False
+
+ # 3. Do not trigger refresh if credential has a cached no-op trust boundary.
+ return not self._has_no_op_trust_boundary()
+
+ def _get_trust_boundary_header(self):
+ if self._trust_boundary is not None:
+ if self._has_no_op_trust_boundary():
+ # STS expects an empty string if the trust boundary value is no-op.
+ return {"x-allowed-locations": ""}
+ else:
+ return {"x-allowed-locations": self._trust_boundary["encodedLocations"]}
+ return {}
+
+ def apply(self, headers, token=None):
+ """Apply the token to the authentication header."""
+ super().apply(headers, token)
+ headers.update(self._get_trust_boundary_header())
+
+ def refresh(self, request):
+ """Refreshes the access token and the trust boundary.
+
+ This method calls the subclass's token refresh logic and then
+ refreshes the trust boundary if applicable.
+ """
+ self._refresh_token(request)
+ self._refresh_trust_boundary(request)
+
+ def _refresh_trust_boundary(self, request):
+ """Triggers a refresh of the trust boundary and updates the cache if necessary.
+
+ Args:
+ request (google.auth.transport.Request): The object used to make
+ HTTP requests.
+
+ Raises:
+ google.auth.exceptions.RefreshError: If the trust boundary could
+ not be refreshed and no cached value is available.
+ """
+ if not self._is_trust_boundary_lookup_required():
+ return
+ try:
+ self._trust_boundary = self._lookup_trust_boundary(request)
+ except exceptions.RefreshError as error:
+ # If the call to the lookup API failed, check if there is a trust boundary
+ # already cached. If there is, do nothing. If not, then throw the error.
+ if self._trust_boundary is None:
+ raise error
+ if _helpers.is_logging_enabled(_LOGGER):
+ _LOGGER.debug(
+ "Using cached trust boundary due to refresh error: %s", error
+ )
+ return
+
+ def _lookup_trust_boundary(self, request):
+ """Calls the trust boundary lookup API to refresh the trust boundary cache.
+
+ Args:
+ request (google.auth.transport.Request): The object used to make
+ HTTP requests.
+
+ Returns:
+ trust_boundary (dict): The trust boundary object returned by the lookup API.
+
+ Raises:
+ google.auth.exceptions.RefreshError: If the trust boundary could not be
+ retrieved.
+ """
+ from google.oauth2 import _client
+
+ url = self._build_trust_boundary_lookup_url()
+ if not url:
+ raise exceptions.InvalidValue("Failed to build trust boundary lookup URL.")
+
+ headers = {}
+ self._apply(headers)
+ headers.update(self._get_trust_boundary_header())
+ return _client._lookup_trust_boundary(request, url, headers=headers)
+
+ @abc.abstractmethod
+ def _build_trust_boundary_lookup_url(self):
+ """
+ Builds and returns the URL for the trust boundary lookup API.
+
+ This method should be implemented by subclasses to provide the
+ specific URL based on the credential type and its properties.
+
+ Returns:
+ str: The URL for the trust boundary lookup endpoint, or None
+ if lookup should be skipped (e.g., for non-applicable universe domains).
+ """
+ raise NotImplementedError(
+ "_build_trust_boundary_lookup_url must be implemented"
+ )
+
+ def _has_no_op_trust_boundary(self):
+ # A no-op trust boundary is indicated by encodedLocations being "0x0".
+ # The "locations" list may or may not be present as an empty list.
+ if self._trust_boundary is None:
+ return False
+ return (
+ self._trust_boundary.get("encodedLocations")
+ == NO_OP_TRUST_BOUNDARY_ENCODED_LOCATIONS
+ )
+
+
class AnonymousCredentials(Credentials):
"""Credentials that do not provide any authentication information.
@@ -382,8 +526,7 @@ class ReadOnlyScoped(metaclass=abc.ABCMeta):
@abc.abstractproperty
def requires_scopes(self):
- """True if these credentials require scopes to obtain an access token.
- """
+ """True if these credentials require scopes to obtain an access token."""
return False
def has_scopes(self, scopes):
diff --git a/contrib/python/google-auth/py3/google/auth/environment_vars.py b/contrib/python/google-auth/py3/google/auth/environment_vars.py
index 81f31571eb8..e5f3598e814 100644
--- a/contrib/python/google-auth/py3/google/auth/environment_vars.py
+++ b/contrib/python/google-auth/py3/google/auth/environment_vars.py
@@ -82,3 +82,7 @@ AWS_SECRET_ACCESS_KEY = "AWS_SECRET_ACCESS_KEY"
AWS_SESSION_TOKEN = "AWS_SESSION_TOKEN"
AWS_REGION = "AWS_REGION"
AWS_DEFAULT_REGION = "AWS_DEFAULT_REGION"
+
+GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED = "GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED"
+"""Environment variable controlling whether to enable trust boundary feature.
+The default value is false. Users have to explicitly set this value to true."""
diff --git a/contrib/python/google-auth/py3/google/auth/external_account.py b/contrib/python/google-auth/py3/google/auth/external_account.py
index 161e6c50ce3..e4eb908f6bc 100644
--- a/contrib/python/google-auth/py3/google/auth/external_account.py
+++ b/contrib/python/google-auth/py3/google/auth/external_account.py
@@ -59,18 +59,18 @@ _DEFAULT_TOKEN_URL = "https://sts.{universe_domain}/v1/token"
@dataclass
class SupplierContext:
"""A context class that contains information about the requested third party credential that is passed
- to AWS security credential and subject token suppliers.
+ to AWS security credential and subject token suppliers.
- Attributes:
- subject_token_type (str): The requested subject token type based on the Oauth2.0 token exchange spec.
- Expected values include::
+ Attributes:
+ subject_token_type (str): The requested subject token type based on the Oauth2.0 token exchange spec.
+ Expected values include::
- “urn:ietf:params:oauth:token-type:jwt”
- “urn:ietf:params:oauth:token-type:id-token”
- “urn:ietf:params:oauth:token-type:saml2”
- “urn:ietf:params:aws:token-type:aws4_request”
+ “urn:ietf:params:oauth:token-type:jwt”
+ “urn:ietf:params:oauth:token-type:id-token”
+ “urn:ietf:params:oauth:token-type:saml2”
+ “urn:ietf:params:aws:token-type:aws4_request”
- audience (str): The requested audience for the subject token.
+ audience (str): The requested audience for the subject token.
"""
subject_token_type: str
@@ -89,7 +89,14 @@ class Credentials(
credentials for Google access token and authorizing requests to Google APIs.
The base class implements the common logic for exchanging external account
credentials for Google access tokens.
- """
+
+ **IMPORTANT**:
+ This class does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details."""
def __init__(
self,
@@ -576,6 +583,14 @@ class Credentials(
def from_info(cls, info, **kwargs):
"""Creates a Credentials instance from parsed external account info.
+ **IMPORTANT**:
+ This method does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using with this method.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
+
Args:
info (Mapping[str, str]): The external account info in Google
format.
@@ -615,6 +630,14 @@ class Credentials(
def from_file(cls, filename, **kwargs):
"""Creates a Credentials instance from an external account json file.
+ **IMPORTANT**:
+ This method does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using with this method.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
+
Args:
filename (str): The path to the external account json file.
kwargs: Additional arguments to pass to the constructor.
diff --git a/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py b/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py
index 4d0c3c68069..53f75cf9322 100644
--- a/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py
+++ b/contrib/python/google-auth/py3/google/auth/external_account_authorized_user.py
@@ -60,7 +60,14 @@ class Credentials(
The credentials are considered immutable. If you want to modify the
quota project, use `with_quota_project` and if you want to modify the token
uri, use `with_token_uri`.
- """
+
+ **IMPORTANT**:
+ This class does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details."""
def __init__(
self,
@@ -328,6 +335,14 @@ class Credentials(
def from_info(cls, info, **kwargs):
"""Creates a Credentials instance from parsed external account info.
+ **IMPORTANT**:
+ This method does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using with this method.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
+
Args:
info (Mapping[str, str]): The external account info in Google
format.
@@ -367,6 +382,14 @@ class Credentials(
def from_file(cls, filename, **kwargs):
"""Creates a Credentials instance from an external account json file.
+ **IMPORTANT**:
+ This method does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using with this method.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
+
Args:
filename (str): The path to the external account json file.
kwargs: Additional arguments to pass to the constructor.
diff --git a/contrib/python/google-auth/py3/google/auth/identity_pool.py b/contrib/python/google-auth/py3/google/auth/identity_pool.py
index c06f8842870..79b7de92056 100644
--- a/contrib/python/google-auth/py3/google/auth/identity_pool.py
+++ b/contrib/python/google-auth/py3/google/auth/identity_pool.py
@@ -253,7 +253,15 @@ def _parse_token_data(token_content, format_type="text", subject_token_field_nam
class Credentials(external_account.Credentials):
- """External account credentials sourced from files and URLs."""
+ """External account credentials sourced from files and URLs.
+
+ **IMPORTANT**:
+ This class does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details."""
def __init__(
self,
@@ -497,6 +505,14 @@ class Credentials(external_account.Credentials):
def from_info(cls, info, **kwargs):
"""Creates an Identity Pool Credentials instance from parsed external account info.
+ **IMPORTANT**:
+ This method does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using with this method.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
+
Args:
info (Mapping[str, str]): The Identity Pool external account info in Google
format.
@@ -517,6 +533,14 @@ class Credentials(external_account.Credentials):
def from_file(cls, filename, **kwargs):
"""Creates an IdentityPool Credentials instance from an external account json file.
+ **IMPORTANT**:
+ This method does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using with this method.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
+
Args:
filename (str): The path to the IdentityPool external account json file.
kwargs: Additional arguments to pass to the constructor.
diff --git a/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py b/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py
index d49998cfbdc..1b67e4406fc 100644
--- a/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py
+++ b/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py
@@ -46,6 +46,9 @@ _REFRESH_ERROR = "Unable to acquire impersonated credentials"
_DEFAULT_TOKEN_LIFETIME_SECS = 3600 # 1 hour in seconds
_GOOGLE_OAUTH2_TOKEN_ENDPOINT = "https://oauth2.googleapis.com/token"
+_TRUST_BOUNDARY_LOOKUP_ENDPOINT = (
+ "https://iamcredentials.{}/v1/projects/-/serviceAccounts/{}/allowedLocations"
+)
_SOURCE_CREDENTIAL_AUTHORIZED_USER_TYPE = "authorized_user"
_SOURCE_CREDENTIAL_SERVICE_ACCOUNT_TYPE = "service_account"
@@ -117,7 +120,10 @@ def _make_iam_token_request(
class Credentials(
- credentials.Scoped, credentials.CredentialsWithQuotaProject, credentials.Signing
+ credentials.Scoped,
+ credentials.CredentialsWithQuotaProject,
+ credentials.Signing,
+ credentials.CredentialsWithTrustBoundary,
):
"""This module defines impersonated credentials which are essentially
impersonated identities.
@@ -178,6 +184,14 @@ class Credentials(
buckets = client.list_buckets(project='your_project')
for bucket in buckets:
print(bucket.name)
+
+ **IMPORTANT**:
+ This class does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
"""
def __init__(
@@ -190,6 +204,7 @@ class Credentials(
lifetime=_DEFAULT_TOKEN_LIFETIME_SECS,
quota_project_id=None,
iam_endpoint_override=None,
+ trust_boundary=None,
):
"""
Args:
@@ -220,6 +235,7 @@ class Credentials(
subject (Optional[str]): sub field of a JWT. This field should only be set
if you wish to impersonate as a user. This feature is useful when
using domain wide delegation.
+ trust_boundary (Mapping[str,str]): A credential trust boundary.
"""
super(Credentials, self).__init__()
@@ -251,15 +267,12 @@ class Credentials(
self._quota_project_id = quota_project_id
self._iam_endpoint_override = iam_endpoint_override
self._cred_file_path = None
+ self._trust_boundary = trust_boundary
def _metric_header_for_usage(self):
return metrics.CRED_TYPE_SA_IMPERSONATE
- @_helpers.copy_docstring(credentials.Credentials)
- def refresh(self, request):
- self._update_token(request)
-
- def _update_token(self, request):
+ def _refresh_token(self, request):
"""Updates credentials with a new access_token representing
the impersonated account.
@@ -331,6 +344,28 @@ class Credentials(
iam_endpoint_override=self._iam_endpoint_override,
)
+ def _build_trust_boundary_lookup_url(self):
+ """Builds and returns the URL for the trust boundary lookup API.
+
+ This method constructs the specific URL for the IAM Credentials API's
+ `allowedLocations` endpoint, using the credential's universe domain
+ and service account email.
+
+ Raises:
+ ValueError: If `self.service_account_email` is None or an empty
+ string, as it's required to form the URL.
+
+ Returns:
+ str: The URL for the trust boundary lookup endpoint.
+ """
+ if not self.service_account_email:
+ raise ValueError(
+ "Service account email is required to build the trust boundary lookup URL."
+ )
+ return _TRUST_BOUNDARY_LOOKUP_ENDPOINT.format(
+ self.universe_domain, self.service_account_email
+ )
+
def sign_bytes(self, message):
from google.auth.transport.requests import AuthorizedSession
@@ -400,10 +435,17 @@ class Credentials(
lifetime=self._lifetime,
quota_project_id=self._quota_project_id,
iam_endpoint_override=self._iam_endpoint_override,
+ trust_boundary=self._trust_boundary,
)
cred._cred_file_path = self._cred_file_path
return cred
+ @_helpers.copy_docstring(credentials.CredentialsWithTrustBoundary)
+ def with_trust_boundary(self, trust_boundary):
+ cred = self._make_copy()
+ cred._trust_boundary = trust_boundary
+ return cred
+
@_helpers.copy_docstring(credentials.CredentialsWithQuotaProject)
def with_quota_project(self, quota_project_id):
cred = self._make_copy()
@@ -420,6 +462,14 @@ class Credentials(
def from_impersonated_service_account_info(cls, info, scopes=None):
"""Creates a Credentials instance from parsed impersonated service account credentials info.
+ **IMPORTANT**:
+ This method does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using with this method.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
+
Args:
info (Mapping[str, str]): The impersonated service account credentials info in Google
format.
@@ -487,9 +537,7 @@ class Credentials(
class IDTokenCredentials(credentials.CredentialsWithQuotaProject):
- """Open ID Connect ID Token-based service account credentials.
-
- """
+ """Open ID Connect ID Token-based service account credentials."""
def __init__(
self,
diff --git a/contrib/python/google-auth/py3/google/auth/pluggable.py b/contrib/python/google-auth/py3/google/auth/pluggable.py
index d725188f87a..fd349537d4d 100644
--- a/contrib/python/google-auth/py3/google/auth/pluggable.py
+++ b/contrib/python/google-auth/py3/google/auth/pluggable.py
@@ -57,7 +57,15 @@ EXECUTABLE_INTERACTIVE_TIMEOUT_MILLIS_UPPER_BOUND = 30 * 60 * 1000 # 30 minutes
class Credentials(external_account.Credentials):
- """External account credentials sourced from executables."""
+ """External account credentials sourced from executables.
+
+ **IMPORTANT**:
+ This class does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details."""
def __init__(
self,
@@ -300,6 +308,14 @@ class Credentials(external_account.Credentials):
def from_info(cls, info, **kwargs):
"""Creates a Pluggable Credentials instance from parsed external account info.
+ **IMPORTANT**:
+ This method does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using with this method.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
+
Args:
info (Mapping[str, str]): The Pluggable external account info in Google
format.
@@ -319,6 +335,14 @@ class Credentials(external_account.Credentials):
def from_file(cls, filename, **kwargs):
"""Creates an Pluggable Credentials instance from an external account json file.
+ **IMPORTANT**:
+ This method does not validate the credential configuration. A security
+ risk occurs when a credential configuration configured with malicious urls
+ is used.
+ When the credential configuration is accepted from an
+ untrusted source, you should validate it before using with this method.
+ Refer https://cloud.google.com/docs/authentication/external/externally-sourced-credentials for more details.
+
Args:
filename (str): The path to the Pluggable external account json file.
kwargs: Additional arguments to pass to the constructor.
diff --git a/contrib/python/google-auth/py3/google/auth/version.py b/contrib/python/google-auth/py3/google/auth/version.py
index 318bf723b43..f309c8d48f3 100644
--- a/contrib/python/google-auth/py3/google/auth/version.py
+++ b/contrib/python/google-auth/py3/google/auth/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "2.40.3"
+__version__ = "2.41.0"
diff --git a/contrib/python/google-auth/py3/google/oauth2/_client.py b/contrib/python/google-auth/py3/google/oauth2/_client.py
index 5a9fc3503c5..9c0e630981e 100644
--- a/contrib/python/google-auth/py3/google/oauth2/_client.py
+++ b/contrib/python/google-auth/py3/google/oauth2/_client.py
@@ -337,6 +337,8 @@ def call_iam_generate_id_token_endpoint(
generateIdToken endpoint.
audience (str): The audience for the ID token.
access_token (str): The access token used to call the IAM endpoint.
+ universe_domain (str): The universe domain for the request. The
+ default is ``googleapis.com``.
Returns:
Tuple[str, datetime]: The ID token and expiration.
@@ -506,3 +508,118 @@ def refresh_grant(
request, token_uri, body, can_retry=can_retry
)
return _handle_refresh_grant_response(response_data, refresh_token)
+
+
+def _lookup_trust_boundary(request, url, headers=None):
+ """Implements the global lookup of a credential trust boundary.
+ For the lookup, we send a request to the global lookup endpoint and then
+ parse the response. Service account credentials, workload identity
+ pools and workforce pools implementation may have trust boundaries configured.
+ Args:
+ request (google.auth.transport.Request): A callable used to make
+ HTTP requests.
+ url (str): The trust boundary lookup url.
+ headers (Optional[Mapping[str, str]]): The headers for the request.
+ Returns:
+ Mapping[str,list|str]: A dictionary containing
+ "locations" as a list of allowed locations as strings and
+ "encodedLocations" as a hex string.
+ e.g:
+ {
+ "locations": [
+ "us-central1", "us-east1", "europe-west1", "asia-east1"
+ ],
+ "encodedLocations": "0xA30"
+ }
+ If the credential is not set up with explicit trust boundaries, a trust boundary
+ of "all" will be returned as a default response.
+ {
+ "locations": [],
+ "encodedLocations": "0x0"
+ }
+ Raises:
+ exceptions.RefreshError: If the response status code is not 200.
+ exceptions.MalformedError: If the response is not in a valid format.
+ """
+
+ response_data = _lookup_trust_boundary_request(request, url, headers=headers)
+ # In case of no-op response, the "locations" list may or may not be present as an empty list.
+ if "encodedLocations" not in response_data:
+ raise exceptions.MalformedError(
+ "Invalid trust boundary info: {}".format(response_data)
+ )
+ return response_data
+
+
+def _lookup_trust_boundary_request(request, url, can_retry=True, headers=None):
+ """Makes a request to the trust boundary lookup endpoint.
+
+ Args:
+ request (google.auth.transport.Request): A callable used to make
+ HTTP requests.
+ url (str): The trust boundary lookup url.
+ can_retry (bool): Enable or disable request retry behavior. Defaults to true.
+ headers (Optional[Mapping[str, str]]): The headers for the request.
+
+ Returns:
+ Mapping[str, str]: The JSON-decoded response data.
+
+ Raises:
+ google.auth.exceptions.RefreshError: If the token endpoint returned
+ an error.
+ """
+ response_status_ok, response_data, retryable_error = _lookup_trust_boundary_request_no_throw(
+ request, url, can_retry, headers
+ )
+ if not response_status_ok:
+ _handle_error_response(response_data, retryable_error)
+ return response_data
+
+
+def _lookup_trust_boundary_request_no_throw(request, url, can_retry=True, headers=None):
+ """Makes a request to the trust boundary lookup endpoint. This
+ function doesn't throw on response errors.
+
+ Args:
+ request (google.auth.transport.Request): A callable used to make
+ HTTP requests.
+ url (str): The trust boundary lookup url.
+ can_retry (bool): Enable or disable request retry behavior. Defaults to true.
+ headers (Optional[Mapping[str, str]]): The headers for the request.
+
+ Returns:
+ Tuple(bool, Mapping[str, str], Optional[bool]): A boolean indicating
+ if the request is successful, a mapping for the JSON-decoded response
+ data and in the case of an error a boolean indicating if the error
+ is retryable.
+ """
+
+ response_data = {}
+ retryable_error = False
+
+ retries = _exponential_backoff.ExponentialBackoff()
+ for _ in retries:
+ response = request(method="GET", url=url, headers=headers)
+ response_body = (
+ response.data.decode("utf-8")
+ if hasattr(response.data, "decode")
+ else response.data
+ )
+
+ try:
+ # response_body should be a JSON
+ response_data = json.loads(response_body)
+ except ValueError:
+ response_data = response_body
+
+ if response.status == http_client.OK:
+ return True, response_data, None
+
+ retryable_error = _can_retry(
+ status_code=response.status, response_data=response_data
+ )
+
+ if not can_retry or not retryable_error:
+ return False, response_data, retryable_error
+
+ return False, response_data, retryable_error
diff --git a/contrib/python/google-auth/py3/google/oauth2/service_account.py b/contrib/python/google-auth/py3/google/oauth2/service_account.py
index 3e84194ac7d..55e020125a4 100644
--- a/contrib/python/google-auth/py3/google/oauth2/service_account.py
+++ b/contrib/python/google-auth/py3/google/oauth2/service_account.py
@@ -84,6 +84,9 @@ from google.oauth2 import _client
_DEFAULT_TOKEN_LIFETIME_SECS = 3600 # 1 hour in seconds
_GOOGLE_OAUTH2_TOKEN_ENDPOINT = "https://oauth2.googleapis.com/token"
+_TRUST_BOUNDARY_LOOKUP_ENDPOINT = (
+ "https://iamcredentials.{}/v1/projects/-/serviceAccounts/{}/allowedLocations"
+)
class Credentials(
@@ -91,6 +94,7 @@ class Credentials(
credentials.Scoped,
credentials.CredentialsWithQuotaProject,
credentials.CredentialsWithTokenUri,
+ credentials.CredentialsWithTrustBoundary,
):
"""Service account credentials
@@ -164,7 +168,7 @@ class Credentials(
universe_domain (str): The universe domain. The default
universe domain is googleapis.com. For default value self
signed jwt is used for token refresh.
- trust_boundary (str): String representation of trust boundary meta.
+ trust_boundary (Mapping[str,str]): A credential trust boundary.
.. note:: Typically one of the helper constructors
:meth:`from_service_account_file` or
@@ -194,7 +198,7 @@ class Credentials(
self._additional_claims = additional_claims
else:
self._additional_claims = {}
- self._trust_boundary = {"locations": [], "encoded_locations": "0x0"}
+ self._trust_boundary = trust_boundary
@classmethod
def _from_signer_and_info(cls, signer, info, **kwargs):
@@ -294,6 +298,7 @@ class Credentials(
additional_claims=self._additional_claims.copy(),
always_use_jwt_access=self._always_use_jwt_access,
universe_domain=self._universe_domain,
+ trust_boundary=self._trust_boundary,
)
cred._cred_file_path = self._cred_file_path
return cred
@@ -381,6 +386,12 @@ class Credentials(
cred._token_uri = token_uri
return cred
+ @_helpers.copy_docstring(credentials.CredentialsWithTrustBoundary)
+ def with_trust_boundary(self, trust_boundary):
+ cred = self._make_copy()
+ cred._trust_boundary = trust_boundary
+ return cred
+
def _make_authorization_grant_assertion(self):
"""Create the OAuth 2.0 assertion.
@@ -424,8 +435,8 @@ class Credentials(
return metrics.CRED_TYPE_SA_JWT
return metrics.CRED_TYPE_SA_ASSERTION
- @_helpers.copy_docstring(credentials.Credentials)
- def refresh(self, request):
+ @_helpers.copy_docstring(credentials.CredentialsWithTrustBoundary)
+ def _refresh_token(self, request):
if self._always_use_jwt_access and not self._jwt_credentials:
# If self signed jwt should be used but jwt credential is not
# created, try to create one with scopes
@@ -491,6 +502,28 @@ class Credentials(
self, audience
)
+ def _build_trust_boundary_lookup_url(self):
+ """Builds and returns the URL for the trust boundary lookup API.
+
+ This method constructs the specific URL for the IAM Credentials API's
+ `allowedLocations` endpoint, using the credential's universe domain
+ and service account email.
+
+ Raises:
+ ValueError: If `self.service_account_email` is None or an empty
+ string, as it's required to form the URL.
+
+ Returns:
+ str: The URL for the trust boundary lookup endpoint.
+ """
+ if not self.service_account_email:
+ raise ValueError(
+ "Service account email is required to build the trust boundary lookup URL."
+ )
+ return _TRUST_BOUNDARY_LOOKUP_ENDPOINT.format(
+ self._universe_domain, self._service_account_email
+ )
+
@_helpers.copy_docstring(credentials.Signing)
def sign_bytes(self, message):
return self._signer.sign(message)
@@ -591,6 +624,7 @@ class IDTokenCredentials(
token endponint is used for token refresh. Note that
iam.serviceAccountTokenCreator role is required to use the IAM
endpoint.
+
.. note:: Typically one of the helper constructors
:meth:`from_service_account_file` or
:meth:`from_service_account_info` are used instead of calling the
@@ -806,6 +840,7 @@ class IDTokenCredentials(
additional_claims={"scope": "https://www.googleapis.com/auth/iam"},
)
jwt_credentials.refresh(request)
+
self.token, self.expiry = _client.call_iam_generate_id_token_endpoint(
request,
self._iam_id_token_endpoint,
diff --git a/contrib/python/google-auth/py3/tests/compute_engine/test_credentials.py b/contrib/python/google-auth/py3/tests/compute_engine/test_credentials.py
index 03fe845b1f3..1c77069938d 100644
--- a/contrib/python/google-auth/py3/tests/compute_engine/test_credentials.py
+++ b/contrib/python/google-auth/py3/tests/compute_engine/test_credentials.py
@@ -13,17 +13,20 @@
# limitations under the License.
import base64
import datetime
+import os
import mock
import pytest # type: ignore
import responses # type: ignore
from google.auth import _helpers
+from google.auth import environment_vars
from google.auth import exceptions
from google.auth import jwt
from google.auth import transport
from google.auth.compute_engine import credentials
from google.auth.transport import requests
+from google.oauth2 import _client
SAMPLE_ID_TOKEN_EXP = 1584393400
@@ -49,7 +52,6 @@ ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE = (
ID_TOKEN_REQUEST_METRICS_HEADER_VALUE = (
"gl-python/3.7 auth/1.1 auth-request-type/it cred-type/mds"
)
-
FAKE_SERVICE_ACCOUNT_EMAIL = "[email protected]"
FAKE_QUOTA_PROJECT_ID = "fake-quota-project"
FAKE_SCOPES = ["scope1", "scope2"]
@@ -60,6 +62,9 @@ FAKE_UNIVERSE_DOMAIN = "fake-universe-domain"
class TestCredentials(object):
credentials = None
credentials_with_all_fields = None
+ VALID_TRUST_BOUNDARY = {"encodedLocations": "valid-encoded-locations"}
+ NO_OP_TRUST_BOUNDARY = {"encodedLocations": ""}
+ EXPECTED_TRUST_BOUNDARY_LOOKUP_URL_DEFAULT_UNIVERSE = "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/default/allowedLocations"
@pytest.fixture(autouse=True)
def credentials_fixture(self):
@@ -174,6 +179,18 @@ class TestCredentials(object):
}
@mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
+ def test_refresh_no_email(self, get):
+ get.return_value = {
+ # No "email" field.
+ "scopes": ["one", "two"]
+ }
+
+ with pytest.raises(exceptions.RefreshError) as excinfo:
+ self.credentials.refresh(None)
+
+ assert excinfo.match(r"missing 'email' field")
+
+ @mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
def test_refresh_error(self, get):
get.side_effect = exceptions.TransportError("http error")
@@ -241,6 +258,18 @@ class TestCredentials(object):
assert creds.universe_domain == "universe_domain"
assert creds._universe_domain_cached
+ def test_with_trust_boundary(self):
+ creds = self.credentials_with_all_fields
+ new_boundary = {"encodedLocations": "new_boundary"}
+ new_creds = creds.with_trust_boundary(new_boundary)
+
+ assert new_creds is not creds
+ assert new_creds._trust_boundary == new_boundary
+ assert new_creds._service_account_email == creds._service_account_email
+ assert new_creds._quota_project_id == creds._quota_project_id
+ assert new_creds._scopes == creds._scopes
+ assert new_creds._default_scopes == creds._default_scopes
+
def test_token_usage_metrics(self):
self.credentials.token = "token"
self.credentials.expiry = None
@@ -280,6 +309,355 @@ class TestCredentials(object):
# domain endpoint.
get_universe_domain.assert_not_called()
+ @mock.patch("google.oauth2._client._lookup_trust_boundary", autospec=True)
+ @mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
+ def test_refresh_trust_boundary_lookup_skipped_if_env_var_not_true(
+ self, mock_metadata_get, mock_lookup_tb
+ ):
+ creds = self.credentials
+ request = mock.Mock()
+
+ mock_metadata_get.side_effect = [
+ # from _retrieve_info
+ {"email": "default", "scopes": ["scope1"]},
+ # from get_service_account_token
+ {"access_token": "mock_token", "expires_in": 3600},
+ ]
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "false"}
+ ):
+ creds.refresh(request)
+
+ mock_lookup_tb.assert_not_called()
+ assert creds._trust_boundary is None
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary", autospec=True)
+ @mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
+ def test_refresh_trust_boundary_lookup_skipped_if_env_var_missing(
+ self, mock_metadata_get, mock_lookup_tb
+ ):
+ creds = self.credentials
+ request = mock.Mock()
+
+ mock_metadata_get.side_effect = [
+ # from _retrieve_info
+ {"email": "default", "scopes": ["scope1"]},
+ # from get_service_account_token
+ {"access_token": "mock_token", "expires_in": 3600},
+ ]
+
+ with mock.patch.dict(os.environ, clear=True):
+ creds.refresh(request)
+
+ mock_lookup_tb.assert_not_called()
+ assert creds._trust_boundary is None
+
+ @mock.patch.object(_client, "_lookup_trust_boundary", autospec=True)
+ @mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
+ def test_refresh_trust_boundary_lookup_success(
+ self, mock_metadata_get, mock_lookup_tb
+ ):
+ mock_lookup_tb.return_value = {
+ "locations": ["us-central1"],
+ "encodedLocations": "0xABC",
+ }
+ creds = self.credentials
+ request = mock.Mock()
+
+ # The first call to _metadata.get is for service account info, the second
+ # for the access token, and the third for the universe domain.
+ mock_metadata_get.side_effect = [
+ # from _retrieve_info
+ {"email": "[email protected]", "scopes": ["scope1"]},
+ # from get_service_account_token
+ {"access_token": "mock_token", "expires_in": 3600},
+ # from get_universe_domain
+ "",
+ ]
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ creds.refresh(request)
+
+ # Verify _metadata.get was called three times.
+ assert mock_metadata_get.call_count == 3
+ # Verify lookup_trust_boundary was called with correct URL and token
+ expected_url = "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/[email protected]/allowedLocations"
+ mock_lookup_tb.assert_called_once_with(
+ request, expected_url, headers={"authorization": "Bearer mock_token"}
+ )
+ # Verify trust boundary was set
+ assert creds._trust_boundary == {
+ "locations": ["us-central1"],
+ "encodedLocations": "0xABC",
+ }
+
+ # Verify x-allowed-locations header is set by apply()
+ headers_applied = {}
+ creds.apply(headers_applied)
+ assert headers_applied["x-allowed-locations"] == "0xABC"
+
+ @mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
+ @mock.patch.object(_client, "_lookup_trust_boundary", autospec=True)
+ def test_refresh_trust_boundary_lookup_fails_no_cache(
+ self, mock_lookup_tb, mock_metadata_get
+ ):
+ mock_lookup_tb.side_effect = exceptions.RefreshError("Lookup failed")
+ creds = self.credentials
+ request = mock.Mock()
+
+ # Mock metadata calls for token, universe domain, and service account info
+ mock_metadata_get.side_effect = [
+ # from _retrieve_info
+ {"email": "[email protected]", "scopes": ["scope1"]},
+ # from get_service_account_token
+ {"access_token": "mock_token", "expires_in": 3600},
+ # from get_universe_domain
+ "",
+ ]
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ with pytest.raises(exceptions.RefreshError, match="Lookup failed"):
+ creds.refresh(request)
+
+ assert creds._trust_boundary is None
+ assert mock_metadata_get.call_count == 3
+ mock_lookup_tb.assert_called_once()
+
+ @mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
+ @mock.patch.object(_client, "_lookup_trust_boundary", autospec=True)
+ def test_refresh_trust_boundary_lookup_fails_with_cached_data(
+ self, mock_lookup_tb, mock_metadata_get
+ ):
+ # First refresh: Successfully fetch a valid trust boundary.
+ mock_lookup_tb.return_value = {
+ "locations": ["us-central1"],
+ "encodedLocations": "0xABC",
+ }
+ mock_metadata_get.side_effect = [
+ # from _retrieve_info
+ {"email": "[email protected]", "scopes": ["scope1"]},
+ # from get_service_account_token
+ {"access_token": "mock_token_1", "expires_in": 3600},
+ # from get_universe_domain
+ "",
+ ]
+ creds = self.credentials
+ request = mock.Mock()
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ creds.refresh(request)
+
+ assert creds._trust_boundary == {
+ "locations": ["us-central1"],
+ "encodedLocations": "0xABC",
+ }
+ mock_lookup_tb.assert_called_once()
+
+ # Second refresh: Mock lookup to fail, but expect cached data to be preserved.
+ mock_lookup_tb.reset_mock()
+ mock_lookup_tb.side_effect = exceptions.RefreshError("Lookup failed")
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ # This refresh should not raise an error because a cached value exists.
+ mock_metadata_get.reset_mock()
+ mock_metadata_get.side_effect = [
+ # from _retrieve_info
+ {"email": "[email protected]", "scopes": ["scope1"]},
+ # from get_service_account_token
+ {"access_token": "mock_token_2", "expires_in": 3600},
+ # from get_universe_domain
+ "",
+ ]
+ creds.refresh(request)
+
+ assert creds._trust_boundary == {
+ "locations": ["us-central1"],
+ "encodedLocations": "0xABC",
+ }
+ mock_lookup_tb.assert_called_once()
+
+ @mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
+ @mock.patch.object(_client, "_lookup_trust_boundary", autospec=True)
+ def test_refresh_fetches_no_op_trust_boundary(
+ self, mock_lookup_tb, mock_metadata_get
+ ):
+ mock_lookup_tb.return_value = {"locations": [], "encodedLocations": "0x0"}
+ creds = self.credentials
+ request = mock.Mock()
+
+ mock_metadata_get.side_effect = [
+ # from _retrieve_info
+ {"email": "[email protected]", "scopes": ["scope1"]},
+ # from get_service_account_token
+ {"access_token": "mock_token", "expires_in": 3600},
+ # from get_universe_domain
+ "",
+ ]
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ creds.refresh(request)
+
+ assert creds._trust_boundary == {"locations": [], "encodedLocations": "0x0"}
+ assert mock_metadata_get.call_count == 3
+ expected_url = "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/[email protected]/allowedLocations"
+ mock_lookup_tb.assert_called_once_with(
+ request, expected_url, headers={"authorization": "Bearer mock_token"}
+ )
+ # Verify that an empty header was added.
+ headers_applied = {}
+ creds.apply(headers_applied)
+ assert headers_applied["x-allowed-locations"] == ""
+
+ @mock.patch("google.auth.compute_engine._metadata.get", autospec=True)
+ @mock.patch.object(_client, "_lookup_trust_boundary", autospec=True)
+ def test_refresh_starts_with_no_op_trust_boundary_skips_lookup(
+ self, mock_lookup_tb, mock_metadata_get
+ ):
+ creds = self.credentials
+ # Use pre-cache universe domain to avoid an extra metadata call.
+ creds._universe_domain_cached = True
+ creds._trust_boundary = {"locations": [], "encodedLocations": "0x0"}
+ request = mock.Mock()
+
+ mock_metadata_get.side_effect = [
+ # from _retrieve_info
+ {"email": "[email protected]", "scopes": ["scope1"]},
+ # from get_service_account_token
+ {"access_token": "mock_token", "expires_in": 3600},
+ ]
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ creds.refresh(request)
+
+ # Verify trust boundary remained NO_OP
+ assert creds._trust_boundary == {"locations": [], "encodedLocations": "0x0"}
+ # Lookup should be skipped
+ mock_lookup_tb.assert_not_called()
+ # Two metadata calls for token refresh should have happened.
+ assert mock_metadata_get.call_count == 2
+
+ # Verify that an empty header was added.
+ headers_applied = {}
+ creds.apply(headers_applied)
+ assert headers_applied["x-allowed-locations"] == ""
+
+ @mock.patch(
+ "google.auth.compute_engine._metadata.get_service_account_info", autospec=True
+ )
+ @mock.patch(
+ "google.auth.compute_engine._metadata.get_universe_domain", autospec=True
+ )
+ def test_build_trust_boundary_lookup_url_default_email(
+ self, mock_get_universe_domain, mock_get_service_account_info
+ ):
+ # Test with default service account email, which needs resolution
+ creds = self.credentials
+ creds._service_account_email = "default"
+ mock_get_service_account_info.return_value = {
+ "email": "[email protected]"
+ }
+ mock_get_universe_domain.return_value = "googleapis.com"
+
+ url = creds._build_trust_boundary_lookup_url()
+
+ mock_get_service_account_info.assert_called_once_with(mock.ANY, "default")
+ mock_get_universe_domain.assert_called_once_with(mock.ANY)
+ assert url == (
+ "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/[email protected]/allowedLocations"
+ )
+
+ @mock.patch(
+ "google.auth.compute_engine._metadata.get_service_account_info", autospec=True
+ )
+ @mock.patch(
+ "google.auth.compute_engine._metadata.get_universe_domain", autospec=True
+ )
+ def test_build_trust_boundary_lookup_url_explicit_email(
+ self, mock_get_universe_domain, mock_get_service_account_info
+ ):
+ # Test with an explicit service account email, no resolution needed
+ creds = self.credentials
+ creds._service_account_email = FAKE_SERVICE_ACCOUNT_EMAIL
+ mock_get_universe_domain.return_value = "googleapis.com"
+
+ url = creds._build_trust_boundary_lookup_url()
+
+ mock_get_service_account_info.assert_not_called()
+ mock_get_universe_domain.assert_called_once_with(mock.ANY)
+ assert url == (
+ "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/[email protected]/allowedLocations"
+ )
+
+ @mock.patch(
+ "google.auth.compute_engine._metadata.get_service_account_info", autospec=True
+ )
+ @mock.patch(
+ "google.auth.compute_engine._metadata.get_universe_domain", autospec=True
+ )
+ def test_build_trust_boundary_lookup_url_non_default_universe(
+ self, mock_get_universe_domain, mock_get_service_account_info
+ ):
+ # Test with a non-default universe domain
+ creds = self.credentials_with_all_fields
+
+ url = creds._build_trust_boundary_lookup_url()
+
+ # Universe domain is cached and email is explicit, so no metadata calls needed.
+ mock_get_service_account_info.assert_not_called()
+ mock_get_universe_domain.assert_not_called()
+ assert url == (
+ "https://iamcredentials.fake-universe-domain/v1/projects/-/serviceAccounts/[email protected]/allowedLocations"
+ )
+
+ @mock.patch(
+ "google.auth.compute_engine._metadata.get_service_account_info", autospec=True
+ )
+ def test_build_trust_boundary_lookup_url_get_service_account_info_fails(
+ self, mock_get_service_account_info
+ ):
+ # Test scenario where get_service_account_info fails
+ mock_get_service_account_info.side_effect = exceptions.TransportError(
+ "Failed to get info"
+ )
+ creds = self.credentials
+ creds._service_account_email = "default"
+
+ with pytest.raises(
+ exceptions.RefreshError,
+ match=r"Failed to get service account email for trust boundary lookup: .*",
+ ):
+ creds._build_trust_boundary_lookup_url()
+
+ @mock.patch(
+ "google.auth.compute_engine._metadata.get_service_account_info", autospec=True
+ )
+ def test_build_trust_boundary_lookup_url_no_email(
+ self, mock_get_service_account_info
+ ):
+ # Test with default service account email, which needs resolution, but metadata
+ # returns no email.
+ creds = self.credentials
+ creds._service_account_email = "default"
+ mock_get_service_account_info.return_value = {"scopes": ["one", "two"]}
+
+ with pytest.raises(exceptions.RefreshError) as excinfo:
+ creds._build_trust_boundary_lookup_url()
+
+ assert excinfo.match(r"missing 'email' field")
+
class TestIDTokenCredentials(object):
credentials = None
@@ -466,7 +844,7 @@ class TestIDTokenCredentials(object):
@responses.activate
def test_with_target_audience_integration(self):
- """ Test that it is possible to refresh credentials
+ """Test that it is possible to refresh credentials
generated from `with_target_audience`.
Instead of mocking the methods, the HTTP responses
@@ -634,7 +1012,7 @@ class TestIDTokenCredentials(object):
@responses.activate
def test_with_quota_project_integration(self):
- """ Test that it is possible to refresh credentials
+ """Test that it is possible to refresh credentials
generated from `with_quota_project`.
Instead of mocking the methods, the HTTP responses
diff --git a/contrib/python/google-auth/py3/tests/oauth2/test__client.py b/contrib/python/google-auth/py3/tests/oauth2/test__client.py
index df77bbcd2f6..ec1725c7e29 100644
--- a/contrib/python/google-auth/py3/tests/oauth2/test__client.py
+++ b/contrib/python/google-auth/py3/tests/oauth2/test__client.py
@@ -325,7 +325,7 @@ def test_call_iam_generate_id_token_endpoint():
"fake_email",
"fake_audience",
"fake_access_token",
- "googleapis.com",
+ universe_domain="googleapis.com",
)
assert (
@@ -631,3 +631,178 @@ def test__token_endpoint_request_no_throw_with_retry(can_retry):
assert mock_request.call_count == 3
else:
assert mock_request.call_count == 1
+
+
+def test_lookup_trust_boundary():
+ response_data = {
+ "locations": ["us-central1", "us-east1"],
+ "encodedLocations": "0x80080000000000",
+ }
+
+ mock_response = mock.create_autospec(transport.Response, instance=True)
+ mock_response.status = http_client.OK
+ mock_response.data = json.dumps(response_data).encode("utf-8")
+
+ mock_request = mock.create_autospec(transport.Request)
+ mock_request.return_value = mock_response
+
+ url = "http://example.com"
+ headers = {"Authorization": "Bearer access_token"}
+ response = _client._lookup_trust_boundary(mock_request, url, headers=headers)
+
+ assert response["encodedLocations"] == "0x80080000000000"
+ assert response["locations"] == ["us-central1", "us-east1"]
+
+ mock_request.assert_called_once_with(method="GET", url=url, headers=headers)
+
+
+def test_lookup_trust_boundary_no_op_response_without_locations():
+ response_data = {"encodedLocations": "0x0"}
+
+ mock_response = mock.create_autospec(transport.Response, instance=True)
+ mock_response.status = http_client.OK
+ mock_response.data = json.dumps(response_data).encode("utf-8")
+
+ mock_request = mock.create_autospec(transport.Request)
+ mock_request.return_value = mock_response
+
+ url = "http://example.com"
+ headers = {"Authorization": "Bearer access_token"}
+ # for the response to be valid, we only need encodedLocations to be present.
+ response = _client._lookup_trust_boundary(mock_request, url, headers=headers)
+ assert response["encodedLocations"] == "0x0"
+ assert "locations" not in response
+
+ mock_request.assert_called_once_with(method="GET", url=url, headers=headers)
+
+
+def test_lookup_trust_boundary_no_op_response():
+ response_data = {"locations": [], "encodedLocations": "0x0"}
+
+ mock_response = mock.create_autospec(transport.Response, instance=True)
+ mock_response.status = http_client.OK
+ mock_response.data = json.dumps(response_data).encode("utf-8")
+
+ mock_request = mock.create_autospec(transport.Request)
+ mock_request.return_value = mock_response
+
+ url = "http://example.com"
+ headers = {"Authorization": "Bearer access_token"}
+ response = _client._lookup_trust_boundary(mock_request, url, headers=headers)
+
+ assert response["encodedLocations"] == "0x0"
+ assert response["locations"] == []
+
+ mock_request.assert_called_once_with(method="GET", url=url, headers=headers)
+
+
+def test_lookup_trust_boundary_error():
+ mock_response = mock.create_autospec(transport.Response, instance=True)
+ mock_response.status = http_client.INTERNAL_SERVER_ERROR
+ mock_response.data = "this is an error message"
+
+ mock_request = mock.create_autospec(transport.Request)
+ mock_request.return_value = mock_response
+
+ url = "http://example.com"
+ headers = {"Authorization": "Bearer access_token"}
+ with pytest.raises(exceptions.RefreshError) as excinfo:
+ _client._lookup_trust_boundary(mock_request, url, headers=headers)
+ assert excinfo.match("this is an error message")
+
+ mock_request.assert_called_with(method="GET", url=url, headers=headers)
+
+
+def test_lookup_trust_boundary_missing_encoded_locations():
+ response_data = {"locations": [], "bad_field": "0x0"}
+
+ mock_response = mock.create_autospec(transport.Response, instance=True)
+ mock_response.status = http_client.OK
+ mock_response.data = json.dumps(response_data).encode("utf-8")
+
+ mock_request = mock.create_autospec(transport.Request)
+ mock_request.return_value = mock_response
+
+ url = "http://example.com"
+ headers = {"Authorization": "Bearer access_token"}
+ with pytest.raises(exceptions.MalformedError) as excinfo:
+ _client._lookup_trust_boundary(mock_request, url, headers=headers)
+ assert excinfo.match("Invalid trust boundary info")
+
+ mock_request.assert_called_once_with(method="GET", url=url, headers=headers)
+
+
+def test_lookup_trust_boundary_internal_failure_and_retry_failure_error():
+ retryable_error = mock.create_autospec(transport.Response, instance=True)
+ retryable_error.status = http_client.BAD_REQUEST
+ retryable_error.data = json.dumps({"error_description": "internal_failure"}).encode(
+ "utf-8"
+ )
+
+ unretryable_error = mock.create_autospec(transport.Response, instance=True)
+ unretryable_error.status = http_client.BAD_REQUEST
+ unretryable_error.data = json.dumps({"error_description": "invalid_scope"}).encode(
+ "utf-8"
+ )
+
+ request = mock.create_autospec(transport.Request)
+
+ request.side_effect = [retryable_error, retryable_error, unretryable_error]
+ headers = {"Authorization": "Bearer access_token"}
+
+ with pytest.raises(exceptions.RefreshError):
+ _client._lookup_trust_boundary_request(
+ request, "http://example.com", headers=headers
+ )
+ # request should be called three times. Two retryable errors and one
+ # unretryable error to break the retry loop.
+ assert request.call_count == 3
+ for call in request.call_args_list:
+ assert call[1]["headers"] == headers
+
+
+def test_lookup_trust_boundary_internal_failure_and_retry_succeeds():
+ retryable_error = mock.create_autospec(transport.Response, instance=True)
+ retryable_error.status = http_client.BAD_REQUEST
+ retryable_error.data = json.dumps({"error_description": "internal_failure"}).encode(
+ "utf-8"
+ )
+
+ response_data = {"locations": [], "encodedLocations": "0x0"}
+ response = mock.create_autospec(transport.Response, instance=True)
+ response.status = http_client.OK
+ response.data = json.dumps(response_data).encode("utf-8")
+
+ request = mock.create_autospec(transport.Request)
+
+ headers = {"Authorization": "Bearer access_token"}
+ request.side_effect = [retryable_error, response]
+
+ _ = _client._lookup_trust_boundary_request(
+ request, "http://example.com", headers=headers
+ )
+
+ assert request.call_count == 2
+ for call in request.call_args_list:
+ assert call[1]["headers"] == headers
+
+
+def test_lookup_trust_boundary_with_headers():
+ response_data = {
+ "locations": ["us-central1", "us-east1"],
+ "encodedLocations": "0x80080000000000",
+ }
+
+ mock_response = mock.create_autospec(transport.Response, instance=True)
+ mock_response.status = http_client.OK
+ mock_response.data = json.dumps(response_data).encode("utf-8")
+
+ mock_request = mock.create_autospec(transport.Request)
+ mock_request.return_value = mock_response
+ headers = {"Authorization": "Bearer access_token", "x-test-header": "test-value"}
+
+ _client._lookup_trust_boundary(mock_request, "http://example.com", headers=headers)
+
+ mock_request.assert_called_once_with(
+ method="GET", url="http://example.com", headers=headers
+ )
diff --git a/contrib/python/google-auth/py3/tests/oauth2/test_service_account.py b/contrib/python/google-auth/py3/tests/oauth2/test_service_account.py
index e60c8200f4b..12f43afc0f7 100644
--- a/contrib/python/google-auth/py3/tests/oauth2/test_service_account.py
+++ b/contrib/python/google-auth/py3/tests/oauth2/test_service_account.py
@@ -20,7 +20,9 @@ import mock
import pytest # type: ignore
from google.auth import _helpers
+from google.auth import credentials
from google.auth import crypt
+from google.auth import environment_vars
from google.auth import exceptions
from google.auth import iam
from google.auth import jwt
@@ -59,14 +61,31 @@ SIGNER = crypt.RSASigner.from_string(PRIVATE_KEY_BYTES, "1")
class TestCredentials(object):
SERVICE_ACCOUNT_EMAIL = "[email protected]"
TOKEN_URI = "https://example.com/oauth2/token"
+ NO_OP_TRUST_BOUNDARY = {
+ "locations": credentials.NO_OP_TRUST_BOUNDARY_LOCATIONS,
+ "encodedLocations": credentials.NO_OP_TRUST_BOUNDARY_ENCODED_LOCATIONS,
+ }
+ VALID_TRUST_BOUNDARY = {
+ "locations": ["us-central1", "us-east1"],
+ "encodedLocations": "0xVALIDHEXSA",
+ }
+ EXPECTED_TRUST_BOUNDARY_LOOKUP_URL_DEFAULT_UNIVERSE = (
+ "https://iamcredentials.googleapis.com/v1/projects/-"
+ "/serviceAccounts/[email protected]/allowedLocations"
+ )
@classmethod
- def make_credentials(cls, universe_domain=DEFAULT_UNIVERSE_DOMAIN):
+ def make_credentials(
+ cls,
+ universe_domain=DEFAULT_UNIVERSE_DOMAIN,
+ trust_boundary=None, # Align with Credentials class default
+ ):
return service_account.Credentials(
SIGNER,
cls.SERVICE_ACCOUNT_EMAIL,
cls.TOKEN_URI,
universe_domain=universe_domain,
+ trust_boundary=trust_boundary,
)
def test_get_cred_info(self):
@@ -252,6 +271,18 @@ class TestCredentials(object):
"always_use_jwt_access should be True for non-default universe domain"
)
+ def test_with_trust_boundary(self):
+ credentials = self.make_credentials()
+ new_boundary = {"encodedLocations": "new_boundary"}
+ new_credentials = credentials.with_trust_boundary(new_boundary)
+
+ assert new_credentials is not credentials
+ assert new_credentials._trust_boundary == new_boundary
+ assert new_credentials._signer == credentials._signer
+ assert (
+ new_credentials.service_account_email == credentials.service_account_email
+ )
+
def test__make_authorization_grant_assertion(self):
credentials = self.make_credentials()
token = credentials._make_authorization_grant_assertion()
@@ -496,10 +527,42 @@ class TestCredentials(object):
# Check that the credentials have the token.
assert credentials.token == token
- # Check that the credentials are valid (have a token and are not
- # expired)
+ # Check that the credentials are valid (have a token and are not expired).
assert credentials.valid
+ # Trust boundary should be None since env var is not set and no initial
+ # boundary was provided.
+ assert credentials._trust_boundary is None
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ @mock.patch("google.oauth2._client.jwt_grant", autospec=True)
+ def test_refresh_skips_trust_boundary_lookup_non_default_universe(
+ self, mock_jwt_grant, mock_lookup_trust_boundary
+ ):
+ # Create credentials with a non-default universe domain
+ credentials = self.make_credentials(universe_domain=FAKE_UNIVERSE_DOMAIN)
+ token = "token"
+ mock_jwt_grant.return_value = (
+ token,
+ _helpers.utcnow() + datetime.timedelta(seconds=500),
+ {},
+ )
+ request = mock.create_autospec(transport.Request, instance=True)
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ credentials.refresh(request)
+
+ # Ensure jwt_grant was called (token refresh happened)
+ mock_jwt_grant.assert_called_once()
+ # Ensure trust boundary lookup was not called
+ mock_lookup_trust_boundary.assert_not_called()
+ # Verify that x-allowed-locations header is not set by apply()
+ headers_applied = {}
+ credentials.apply(headers_applied)
+ assert "x-allowed-locations" not in headers_applied
+
@mock.patch("google.oauth2._client.jwt_grant", autospec=True)
def test_before_request_refreshes(self, jwt_grant):
credentials = self.make_credentials()
@@ -608,6 +671,208 @@ class TestCredentials(object):
credentials.refresh(None)
assert excinfo.match("domain wide delegation is not supported")
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ @mock.patch("google.oauth2._client.jwt_grant", autospec=True)
+ def test_refresh_success_with_valid_trust_boundary(
+ self, mock_jwt_grant, mock_lookup_trust_boundary
+ ):
+ # Start with no boundary.
+ credentials = self.make_credentials(trust_boundary=None)
+ token = "token"
+ mock_jwt_grant.return_value = (
+ token,
+ _helpers.utcnow() + datetime.timedelta(seconds=500),
+ {},
+ )
+ request = mock.create_autospec(transport.Request, instance=True)
+
+ # Mock the trust boundary lookup to return a valid boundary.
+ mock_lookup_trust_boundary.return_value = self.VALID_TRUST_BOUNDARY
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ credentials.refresh(request)
+
+ assert credentials.valid
+ assert credentials.token == token
+
+ # Verify trust boundary was set.
+ assert credentials._trust_boundary == self.VALID_TRUST_BOUNDARY
+
+ # Verify the mock was called with the correct URL.
+ mock_lookup_trust_boundary.assert_called_once_with(
+ request,
+ self.EXPECTED_TRUST_BOUNDARY_LOOKUP_URL_DEFAULT_UNIVERSE,
+ headers={"authorization": "Bearer token"},
+ )
+
+ # Verify x-allowed-locations header is set correctly by apply().
+ headers_applied = {}
+ credentials.apply(headers_applied)
+ assert (
+ headers_applied["x-allowed-locations"]
+ == self.VALID_TRUST_BOUNDARY["encodedLocations"]
+ )
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ @mock.patch("google.oauth2._client.jwt_grant", autospec=True)
+ def test_refresh_fetches_no_op_trust_boundary(
+ self, mock_jwt_grant, mock_lookup_trust_boundary
+ ):
+ # Start with no trust boundary
+ credentials = self.make_credentials(trust_boundary=None)
+ token = "token"
+ mock_jwt_grant.return_value = (
+ token,
+ _helpers.utcnow() + datetime.timedelta(seconds=500),
+ {},
+ )
+ request = mock.create_autospec(transport.Request, instance=True)
+
+ mock_lookup_trust_boundary.return_value = self.NO_OP_TRUST_BOUNDARY
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ credentials.refresh(request)
+
+ assert credentials.valid
+ assert credentials.token == token
+ assert credentials._trust_boundary == self.NO_OP_TRUST_BOUNDARY
+ mock_lookup_trust_boundary.assert_called_once_with(
+ request,
+ self.EXPECTED_TRUST_BOUNDARY_LOOKUP_URL_DEFAULT_UNIVERSE,
+ headers={"authorization": "Bearer token"},
+ )
+ headers_applied = {}
+ credentials.apply(headers_applied)
+ assert headers_applied["x-allowed-locations"] == ""
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ @mock.patch("google.oauth2._client.jwt_grant", autospec=True)
+ def test_refresh_starts_with_no_op_trust_boundary_skips_lookup(
+ self, mock_jwt_grant, mock_lookup_trust_boundary
+ ):
+ credentials = self.make_credentials(
+ trust_boundary=self.NO_OP_TRUST_BOUNDARY
+ ) # Start with NO_OP
+ token = "token"
+ mock_jwt_grant.return_value = (
+ token,
+ _helpers.utcnow() + datetime.timedelta(seconds=500),
+ {},
+ )
+ request = mock.create_autospec(transport.Request, instance=True)
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ credentials.refresh(request)
+
+ assert credentials.valid
+ assert credentials.token == token
+ # Verify trust boundary remained NO_OP
+ assert credentials._trust_boundary == self.NO_OP_TRUST_BOUNDARY
+
+ # Lookup should be skipped
+ mock_lookup_trust_boundary.assert_not_called()
+
+ # Verify that an empty header was added.
+ headers_applied = {}
+ credentials.apply(headers_applied)
+ assert headers_applied["x-allowed-locations"] == ""
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ @mock.patch("google.oauth2._client.jwt_grant", autospec=True)
+ def test_refresh_trust_boundary_lookup_fails_no_cache(
+ self, mock_jwt_grant, mock_lookup_trust_boundary
+ ):
+ # Start with no trust boundary
+ credentials = self.make_credentials(trust_boundary=None)
+ mock_lookup_trust_boundary.side_effect = exceptions.RefreshError(
+ "Lookup failed"
+ )
+ mock_jwt_grant.return_value = (
+ "mock_access_token",
+ _helpers.utcnow() + datetime.timedelta(seconds=3600),
+ {},
+ )
+ request = mock.create_autospec(transport.Request, instance=True)
+
+ # Mock the trust boundary lookup to raise an error
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ), pytest.raises(exceptions.RefreshError, match="Lookup failed"):
+ credentials.refresh(request)
+
+ assert credentials._trust_boundary is None
+ mock_lookup_trust_boundary.assert_called_once()
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ @mock.patch("google.oauth2._client.jwt_grant", autospec=True)
+ def test_refresh_trust_boundary_lookup_fails_with_cached_data(
+ self, mock_jwt_grant, mock_lookup_trust_boundary
+ ):
+ # Initial setup: Credentials with no trust boundary.
+ credentials = self.make_credentials(trust_boundary=None)
+ token = "token"
+ mock_jwt_grant.return_value = (
+ token,
+ _helpers.utcnow() + datetime.timedelta(seconds=500),
+ {},
+ )
+ request = mock.create_autospec(transport.Request, instance=True)
+
+ # First refresh: Successfully fetch a valid trust boundary.
+ mock_lookup_trust_boundary.return_value = self.VALID_TRUST_BOUNDARY
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ credentials.refresh(request)
+
+ assert credentials.valid
+ assert credentials.token == token
+ assert credentials._trust_boundary == self.VALID_TRUST_BOUNDARY
+ mock_lookup_trust_boundary.assert_called_once_with(
+ request,
+ self.EXPECTED_TRUST_BOUNDARY_LOOKUP_URL_DEFAULT_UNIVERSE,
+ headers={"authorization": "Bearer token"},
+ )
+
+ # Second refresh: Mock lookup to fail, but expect cached data to be preserved.
+ mock_lookup_trust_boundary.reset_mock()
+ mock_lookup_trust_boundary.side_effect = exceptions.RefreshError(
+ "Lookup failed"
+ )
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ credentials.refresh(request) # This should NOT raise an exception
+
+ assert credentials.valid # Credentials should still be valid
+ assert (
+ credentials._trust_boundary == self.VALID_TRUST_BOUNDARY
+ ) # Cached data should be preserved
+ mock_lookup_trust_boundary.assert_called_once_with(
+ request,
+ self.EXPECTED_TRUST_BOUNDARY_LOOKUP_URL_DEFAULT_UNIVERSE,
+ headers={
+ "authorization": "Bearer token",
+ "x-allowed-locations": self.VALID_TRUST_BOUNDARY["encodedLocations"],
+ },
+ ) # Lookup should have been attempted again
+
+ def test_build_trust_boundary_lookup_url_no_email(self):
+ credentials = self.make_credentials()
+ credentials._service_account_email = None
+
+ with pytest.raises(ValueError) as excinfo:
+ credentials._build_trust_boundary_lookup_url()
+
+ assert "Service account email is required" in str(excinfo.value)
+
class TestIDTokenCredentials(object):
SERVICE_ACCOUNT_EMAIL = "[email protected]"
@@ -790,9 +1055,14 @@ class TestIDTokenCredentials(object):
)
request = mock.Mock()
credentials.refresh(request)
- req, iam_endpoint, signer_email, target_audience, access_token, universe_domain = call_iam_generate_id_token_endpoint.call_args[
- 0
- ]
+ (
+ req,
+ iam_endpoint,
+ signer_email,
+ target_audience,
+ access_token,
+ universe_domain,
+ ) = call_iam_generate_id_token_endpoint.call_args[0]
assert req == request
assert iam_endpoint == iam._IAM_IDTOKEN_ENDPOINT
assert signer_email == "[email protected]"
@@ -812,9 +1082,14 @@ class TestIDTokenCredentials(object):
)
request = mock.Mock()
credentials.refresh(request)
- req, iam_endpoint, signer_email, target_audience, access_token, universe_domain = call_iam_generate_id_token_endpoint.call_args[
- 0
- ]
+ (
+ req,
+ iam_endpoint,
+ signer_email,
+ target_audience,
+ access_token,
+ universe_domain,
+ ) = call_iam_generate_id_token_endpoint.call_args[0]
assert req == request
assert (
iam_endpoint
diff --git a/contrib/python/google-auth/py3/tests/test__helpers.py b/contrib/python/google-auth/py3/tests/test__helpers.py
index a4337c01608..ce3ec11e29c 100644
--- a/contrib/python/google-auth/py3/tests/test__helpers.py
+++ b/contrib/python/google-auth/py3/tests/test__helpers.py
@@ -20,7 +20,7 @@ import urllib
import pytest # type: ignore
-from google.auth import _helpers
+from google.auth import _helpers, exceptions
# _MOCK_BASE_LOGGER_NAME is the base logger namespace used for testing.
_MOCK_BASE_LOGGER_NAME = "foogle"
@@ -234,6 +234,33 @@ def test_unpadded_urlsafe_b64encode():
assert _helpers.unpadded_urlsafe_b64encode(case) == expected
+def test_get_bool_from_env(monkeypatch):
+ # Test default value when environment variable is not set.
+ assert _helpers.get_bool_from_env("TEST_VAR") is False
+ assert _helpers.get_bool_from_env("TEST_VAR", default=True) is True
+
+ # Test true values (case-insensitive)
+ for true_value in ("true", "True", "TRUE", "1"):
+ monkeypatch.setenv("TEST_VAR", true_value)
+ assert _helpers.get_bool_from_env("TEST_VAR") is True
+
+ # Test false values (case-insensitive)
+ for false_value in ("false", "False", "FALSE", "0"):
+ monkeypatch.setenv("TEST_VAR", false_value)
+ assert _helpers.get_bool_from_env("TEST_VAR") is False
+
+ # Test invalid value
+ monkeypatch.setenv("TEST_VAR", "invalid_value")
+ with pytest.raises(exceptions.InvalidValue) as excinfo:
+ _helpers.get_bool_from_env("TEST_VAR")
+ assert 'must be one of "true", "false", "1", or "0"' in str(excinfo.value)
+
+ # Test empty string value
+ monkeypatch.setenv("TEST_VAR", "")
+ with pytest.raises(exceptions.InvalidValue):
+ _helpers.get_bool_from_env("TEST_VAR")
+
+
def test_hash_sensitive_info_basic():
test_data = {
"expires_in": 3599,
diff --git a/contrib/python/google-auth/py3/tests/test_aws.py b/contrib/python/google-auth/py3/tests/test_aws.py
index df1f02e7d70..41ce970d1e8 100644
--- a/contrib/python/google-auth/py3/tests/test_aws.py
+++ b/contrib/python/google-auth/py3/tests/test_aws.py
@@ -920,7 +920,7 @@ class TestCredentials(object):
assert request_kwargs["body"] is not None
body_tuples = urllib.parse.parse_qsl(request_kwargs["body"])
assert len(body_tuples) == len(request_data.keys())
- for (k, v) in body_tuples:
+ for k, v in body_tuples:
assert v.decode("utf-8") == request_data[k.decode("utf-8")]
@classmethod
@@ -2057,7 +2057,9 @@ class TestCredentials(object):
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
"x-goog-user-project": QUOTA_PROJECT_ID,
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # TODO(negarb): Uncomment and update when trust boundary is supported
+ # for external account credentials.
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
@@ -2150,7 +2152,7 @@ class TestCredentials(object):
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
"x-goog-user-project": QUOTA_PROJECT_ID,
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
@@ -2345,7 +2347,7 @@ class TestCredentials(object):
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
"x-goog-user-project": QUOTA_PROJECT_ID,
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
diff --git a/contrib/python/google-auth/py3/tests/test_credentials.py b/contrib/python/google-auth/py3/tests/test_credentials.py
index e11bcb4e551..1fb88009691 100644
--- a/contrib/python/google-auth/py3/tests/test_credentials.py
+++ b/contrib/python/google-auth/py3/tests/test_credentials.py
@@ -13,17 +13,21 @@
# limitations under the License.
import datetime
+import os
import mock
import pytest # type: ignore
from google.auth import _helpers
from google.auth import credentials
+from google.auth import environment_vars
+from google.auth import exceptions
+from google.oauth2 import _client
-class CredentialsImpl(credentials.Credentials):
- def refresh(self, request):
- self.token = request
+class CredentialsImpl(credentials.CredentialsWithTrustBoundary):
+ def _refresh_token(self, request):
+ self.token = "refreshed-token"
self.expiry = (
datetime.datetime.utcnow()
+ _helpers.REFRESH_THRESHOLD
@@ -33,6 +37,10 @@ class CredentialsImpl(credentials.Credentials):
def with_quota_project(self, quota_project_id):
raise NotImplementedError()
+ def _build_trust_boundary_lookup_url(self):
+ # Using self.token here to make the URL dynamic for testing purposes
+ return "http://mock.url/lookup_for_{}".format(self.token)
+
class CredentialsImplWithMetrics(credentials.Credentials):
def refresh(self, request):
@@ -89,49 +97,49 @@ def test_expired_and_valid():
def test_before_request():
credentials = CredentialsImpl()
- request = "token"
+ request = mock.Mock()
headers = {}
# First call should call refresh, setting the token.
credentials.before_request(request, "http://example.com", "GET", headers)
assert credentials.valid
- assert credentials.token == "token"
- assert headers["authorization"] == "Bearer token"
+ assert credentials.token == "refreshed-token"
+ assert headers["authorization"] == "Bearer refreshed-token"
assert "x-allowed-locations" not in headers
- request = "token2"
+ request = mock.Mock()
headers = {}
# Second call shouldn't call refresh.
credentials.before_request(request, "http://example.com", "GET", headers)
assert credentials.valid
- assert credentials.token == "token"
- assert headers["authorization"] == "Bearer token"
+ assert credentials.token == "refreshed-token"
+ assert headers["authorization"] == "Bearer refreshed-token"
assert "x-allowed-locations" not in headers
def test_before_request_with_trust_boundary():
DUMMY_BOUNDARY = "0xA30"
credentials = CredentialsImpl()
- credentials._trust_boundary = {"locations": [], "encoded_locations": DUMMY_BOUNDARY}
- request = "token"
+ credentials._trust_boundary = {"locations": [], "encodedLocations": DUMMY_BOUNDARY}
+ request = mock.Mock()
headers = {}
# First call should call refresh, setting the token.
credentials.before_request(request, "http://example.com", "GET", headers)
assert credentials.valid
- assert credentials.token == "token"
- assert headers["authorization"] == "Bearer token"
+ assert credentials.token == "refreshed-token"
+ assert headers["authorization"] == "Bearer refreshed-token"
assert headers["x-allowed-locations"] == DUMMY_BOUNDARY
- request = "token2"
+ request = mock.Mock()
headers = {}
# Second call shouldn't call refresh.
credentials.before_request(request, "http://example.com", "GET", headers)
assert credentials.valid
- assert credentials.token == "token"
- assert headers["authorization"] == "Bearer token"
+ assert credentials.token == "refreshed-token"
+ assert headers["authorization"] == "Bearer refreshed-token"
assert headers["x-allowed-locations"] == DUMMY_BOUNDARY
@@ -198,6 +206,18 @@ def test_readonly_scoped_credentials_scopes():
assert credentials.has_scopes(["one", "two"])
assert not credentials.has_scopes(["three"])
+ # Test with default scopes
+ credentials_with_default = ReadOnlyScopedCredentialsImpl()
+ credentials_with_default._default_scopes = ["one", "two"]
+ assert credentials_with_default.has_scopes(["one", "two"])
+ assert not credentials_with_default.has_scopes(["three"])
+
+ # Test with no scopes
+ credentials_no_scopes = ReadOnlyScopedCredentialsImpl()
+ assert not credentials_no_scopes.has_scopes(["one"])
+
+ assert credentials_no_scopes.has_scopes([])
+
def test_readonly_scoped_credentials_requires_scopes():
credentials = ReadOnlyScopedCredentialsImpl()
@@ -245,7 +265,7 @@ def test_nonblocking_refresh_fresh_credentials():
c._refresh_worker = mock.MagicMock()
- request = "token"
+ request = mock.Mock()
c.refresh(request)
assert c.token_state == credentials.TokenState.FRESH
@@ -258,7 +278,7 @@ def test_nonblocking_refresh_invalid_credentials():
c = CredentialsImpl()
c.with_non_blocking_refresh()
- request = "token"
+ request = mock.Mock()
headers = {}
assert c.token_state == credentials.TokenState.INVALID
@@ -266,8 +286,8 @@ def test_nonblocking_refresh_invalid_credentials():
c.before_request(request, "http://example.com", "GET", headers)
assert c.token_state == credentials.TokenState.FRESH
assert c.valid
- assert c.token == "token"
- assert headers["authorization"] == "Bearer token"
+ assert c.token == "refreshed-token"
+ assert headers["authorization"] == "Bearer refreshed-token"
assert "x-identity-trust-boundary" not in headers
@@ -275,7 +295,7 @@ def test_nonblocking_refresh_stale_credentials():
c = CredentialsImpl()
c.with_non_blocking_refresh()
- request = "token"
+ request = mock.Mock()
headers = {}
# Invalid credentials MUST require a blocking refresh.
@@ -296,8 +316,8 @@ def test_nonblocking_refresh_stale_credentials():
assert c.token_state == credentials.TokenState.FRESH
assert c.valid
- assert c.token == "token"
- assert headers["authorization"] == "Bearer token"
+ assert c.token == "refreshed-token"
+ assert headers["authorization"] == "Bearer refreshed-token"
assert "x-identity-trust-boundary" not in headers
@@ -305,7 +325,7 @@ def test_nonblocking_refresh_failed_credentials():
c = CredentialsImpl()
c.with_non_blocking_refresh()
- request = "token"
+ request = mock.Mock()
headers = {}
# Invalid credentials MUST require a blocking refresh.
@@ -328,18 +348,130 @@ def test_nonblocking_refresh_failed_credentials():
assert c.token_state == credentials.TokenState.FRESH
assert c.valid
- assert c.token == "token"
- assert headers["authorization"] == "Bearer token"
+ assert c.token == "refreshed-token"
+ assert headers["authorization"] == "Bearer refreshed-token"
assert "x-identity-trust-boundary" not in headers
def test_token_state_no_expiry():
c = CredentialsImpl()
- request = "token"
+ request = mock.Mock()
c.refresh(request)
c.expiry = None
assert c.token_state == credentials.TokenState.FRESH
c.before_request(request, "http://example.com", "GET", {})
+
+
+class TestCredentialsWithTrustBoundary(object):
+ @mock.patch.object(_client, "_lookup_trust_boundary")
+ def test_lookup_trust_boundary_env_var_not_true(self, mock_lookup_tb):
+ creds = CredentialsImpl()
+ request = mock.Mock()
+
+ # Ensure env var is not "true"
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "false"}
+ ):
+ result = creds._refresh_trust_boundary(request)
+
+ assert result is None
+ mock_lookup_tb.assert_not_called()
+
+ @mock.patch.object(_client, "_lookup_trust_boundary")
+ def test_lookup_trust_boundary_env_var_missing(self, mock_lookup_tb):
+ creds = CredentialsImpl()
+ request = mock.Mock()
+
+ # Ensure env var is missing
+ with mock.patch.dict(os.environ, clear=True):
+ result = creds._refresh_trust_boundary(request)
+
+ assert result is None
+ mock_lookup_tb.assert_not_called()
+
+ @mock.patch.object(_client, "_lookup_trust_boundary")
+ def test_lookup_trust_boundary_non_default_universe(self, mock_lookup_tb):
+ creds = CredentialsImpl()
+ creds._universe_domain = "my.universe.com" # Non-GDU
+ request = mock.Mock()
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ result = creds._refresh_trust_boundary(request)
+
+ assert result is None
+ mock_lookup_tb.assert_not_called()
+
+ @mock.patch.object(_client, "_lookup_trust_boundary")
+ def test_lookup_trust_boundary_calls_client_and_build_url(self, mock_lookup_tb):
+ creds = CredentialsImpl()
+ creds.token = "test_token" # For _build_trust_boundary_lookup_url
+ request = mock.Mock()
+ expected_url = "http://mock.url/lookup_for_test_token"
+ expected_boundary_info = {"encodedLocations": "0xABC"}
+ mock_lookup_tb.return_value = expected_boundary_info
+
+ # Mock _build_trust_boundary_lookup_url to ensure it's called.
+ mock_build_url = mock.Mock(return_value=expected_url)
+ creds._build_trust_boundary_lookup_url = mock_build_url
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ result = creds._lookup_trust_boundary(request)
+
+ assert result == expected_boundary_info
+ mock_build_url.assert_called_once()
+ expected_headers = {"authorization": "Bearer test_token"}
+ mock_lookup_tb.assert_called_once_with(
+ request, expected_url, headers=expected_headers
+ )
+
+ @mock.patch.object(_client, "_lookup_trust_boundary")
+ def test_lookup_trust_boundary_build_url_returns_none(self, mock_lookup_tb):
+ creds = CredentialsImpl()
+ request = mock.Mock()
+
+ # Mock _build_trust_boundary_lookup_url to return None
+ mock_build_url = mock.Mock(return_value=None)
+ creds._build_trust_boundary_lookup_url = mock_build_url
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ with pytest.raises(
+ exceptions.InvalidValue,
+ match="Failed to build trust boundary lookup URL.",
+ ):
+ creds._lookup_trust_boundary(request)
+
+ mock_build_url.assert_called_once() # Ensure _build_trust_boundary_lookup_url was called
+ mock_lookup_tb.assert_not_called() # Ensure _client.lookup_trust_boundary was not called
+
+ @mock.patch("google.auth.credentials._LOGGER")
+ @mock.patch("google.auth._helpers.is_logging_enabled", return_value=True)
+ @mock.patch.object(_client, "_lookup_trust_boundary")
+ def test_refresh_trust_boundary_fails_with_cached_data_and_logging(
+ self, mock_lookup_tb, mock_is_logging_enabled, mock_logger
+ ):
+ creds = CredentialsImpl()
+ creds._trust_boundary = {"encodedLocations": "0xABC"}
+ request = mock.Mock()
+
+ refresh_error = exceptions.RefreshError("Lookup failed")
+ mock_lookup_tb.side_effect = refresh_error
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ creds.refresh(request)
+
+ mock_lookup_tb.assert_called_once()
+ mock_is_logging_enabled.assert_called_once_with(mock_logger)
+ mock_logger.debug.assert_called_once_with(
+ "Using cached trust boundary due to refresh error: %s", refresh_error
+ )
diff --git a/contrib/python/google-auth/py3/tests/test_external_account.py b/contrib/python/google-auth/py3/tests/test_external_account.py
index bddcb4afa1a..d86a19bef16 100644
--- a/contrib/python/google-auth/py3/tests/test_external_account.py
+++ b/contrib/python/google-auth/py3/tests/test_external_account.py
@@ -247,7 +247,7 @@ class TestCredentials(object):
assert "cert" not in request_kwargs
assert request_kwargs["body"] is not None
body_tuples = urllib.parse.parse_qsl(request_kwargs["body"])
- for (k, v) in body_tuples:
+ for k, v in body_tuples:
assert v.decode("utf-8") == request_data[k.decode("utf-8")]
assert len(body_tuples) == len(request_data.keys())
@@ -920,7 +920,9 @@ class TestCredentials(object):
"Content-Type": "application/json",
"authorization": "Bearer {}".format(token_response["access_token"]),
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # TODO(negarb): Uncomment and update when trust boundary is supported
+ # for external account credentials.
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
@@ -1010,7 +1012,7 @@ class TestCredentials(object):
"Content-Type": "application/json",
"authorization": "Bearer {}".format(token_response["access_token"]),
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
@@ -1097,7 +1099,7 @@ class TestCredentials(object):
"Content-Type": "application/json",
"authorization": "Bearer {}".format(token_response["access_token"]),
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
@@ -1331,7 +1333,7 @@ class TestCredentials(object):
"Content-Type": "application/json",
"authorization": "Bearer {}".format(token_response["access_token"]),
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
@@ -1415,7 +1417,7 @@ class TestCredentials(object):
"Content-Type": "application/json",
"authorization": "Bearer {}".format(token_response["access_token"]),
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
@@ -1471,7 +1473,7 @@ class TestCredentials(object):
assert headers == {
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
def test_apply_workforce_without_quota_project_id(self):
@@ -1488,7 +1490,7 @@ class TestCredentials(object):
assert headers == {
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
def test_apply_impersonation_without_quota_project_id(self):
@@ -1520,7 +1522,7 @@ class TestCredentials(object):
assert headers == {
"authorization": "Bearer {}".format(impersonation_response["accessToken"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
def test_apply_with_quota_project_id(self):
@@ -1537,7 +1539,7 @@ class TestCredentials(object):
"other": "header-value",
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
"x-goog-user-project": self.QUOTA_PROJECT_ID,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
def test_apply_impersonation_with_quota_project_id(self):
@@ -1572,7 +1574,7 @@ class TestCredentials(object):
"other": "header-value",
"authorization": "Bearer {}".format(impersonation_response["accessToken"]),
"x-goog-user-project": self.QUOTA_PROJECT_ID,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
def test_before_request(self):
@@ -1588,7 +1590,7 @@ class TestCredentials(object):
assert headers == {
"other": "header-value",
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
# Second call shouldn't call refresh.
@@ -1597,7 +1599,7 @@ class TestCredentials(object):
assert headers == {
"other": "header-value",
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
def test_before_request_workforce(self):
@@ -1615,7 +1617,7 @@ class TestCredentials(object):
assert headers == {
"other": "header-value",
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
# Second call shouldn't call refresh.
@@ -1624,7 +1626,7 @@ class TestCredentials(object):
assert headers == {
"other": "header-value",
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
def test_before_request_impersonation(self):
@@ -1655,7 +1657,7 @@ class TestCredentials(object):
assert headers == {
"other": "header-value",
"authorization": "Bearer {}".format(impersonation_response["accessToken"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
# Second call shouldn't call refresh.
@@ -1664,7 +1666,7 @@ class TestCredentials(object):
assert headers == {
"other": "header-value",
"authorization": "Bearer {}".format(impersonation_response["accessToken"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
@mock.patch("google.auth._helpers.utcnow")
@@ -1693,7 +1695,7 @@ class TestCredentials(object):
# Cached token should be used.
assert headers == {
"authorization": "Bearer token",
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
# Next call should simulate 1 second passed.
@@ -1709,7 +1711,7 @@ class TestCredentials(object):
# New token should be retrieved.
assert headers == {
"authorization": "Bearer {}".format(self.SUCCESS_RESPONSE["access_token"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
@mock.patch("google.auth._helpers.utcnow")
@@ -1754,7 +1756,7 @@ class TestCredentials(object):
# Cached token should be used.
assert headers == {
"authorization": "Bearer token",
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
# Next call should simulate 1 second passed. This will trigger the expiration
@@ -1773,7 +1775,7 @@ class TestCredentials(object):
# New token should be retrieved.
assert headers == {
"authorization": "Bearer {}".format(impersonation_response["accessToken"]),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
@pytest.mark.parametrize(
@@ -1872,7 +1874,7 @@ class TestCredentials(object):
"x-goog-user-project": self.QUOTA_PROJECT_ID,
"authorization": "Bearer {}".format(token_response["access_token"]),
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
@@ -1926,7 +1928,7 @@ class TestCredentials(object):
"authorization": "Bearer {}".format(
impersonation_response["accessToken"]
),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
},
)
@@ -1998,7 +2000,7 @@ class TestCredentials(object):
"authorization": "Bearer {}".format(
self.SUCCESS_RESPONSE["access_token"]
),
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
},
)
@@ -2048,7 +2050,7 @@ class TestCredentials(object):
"Content-Type": "application/json",
"authorization": "Bearer {}".format(token_response["access_token"]),
"x-goog-api-client": IMPERSONATE_ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
- "x-allowed-locations": "0x0",
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
diff --git a/contrib/python/google-auth/py3/tests/test_identity_pool.py b/contrib/python/google-auth/py3/tests/test_identity_pool.py
index 4d78a5c22ea..8ca2892e2e6 100644
--- a/contrib/python/google-auth/py3/tests/test_identity_pool.py
+++ b/contrib/python/google-auth/py3/tests/test_identity_pool.py
@@ -285,7 +285,7 @@ class TestCredentials(object):
assert request_kwargs["body"] is not None
body_tuples = urllib.parse.parse_qsl(request_kwargs["body"])
assert len(body_tuples) == len(request_data.keys())
- for (k, v) in body_tuples:
+ for k, v in body_tuples:
assert v.decode("utf-8") == request_data[k.decode("utf-8")]
@classmethod
@@ -384,7 +384,9 @@ class TestCredentials(object):
"Content-Type": "application/json",
"authorization": "Bearer {}".format(token_response["access_token"]),
"x-goog-api-client": metrics_header_value,
- "x-allowed-locations": "0x0",
+ # TODO(negarb): Uncomment and update when trust boundary is supported
+ # for external account credentials.
+ # "x-allowed-locations": "0x0",
}
impersonation_request_data = {
"delegates": None,
diff --git a/contrib/python/google-auth/py3/tests/test_impersonated_credentials.py b/contrib/python/google-auth/py3/tests/test_impersonated_credentials.py
index 9aeb505fdd9..a9f45f88948 100644
--- a/contrib/python/google-auth/py3/tests/test_impersonated_credentials.py
+++ b/contrib/python/google-auth/py3/tests/test_impersonated_credentials.py
@@ -22,7 +22,9 @@ import mock
import pytest # type: ignore
from google.auth import _helpers
+from google.auth import credentials as auth_credentials
from google.auth import crypt
+from google.auth import environment_vars
from google.auth import exceptions
from google.auth import impersonated_credentials
from google.auth import transport
@@ -128,8 +130,21 @@ class TestImpersonatedCredentials(object):
# Because Python 2.7:
DELEGATES = [] # type: ignore
LIFETIME = 3600
+ NO_OP_TRUST_BOUNDARY = {
+ "locations": auth_credentials.NO_OP_TRUST_BOUNDARY_LOCATIONS,
+ "encodedLocations": auth_credentials.NO_OP_TRUST_BOUNDARY_ENCODED_LOCATIONS,
+ }
+ VALID_TRUST_BOUNDARY = {
+ "locations": ["us-central1", "us-east1"],
+ "encodedLocations": "0xVALIDHEX",
+ }
+ EXPECTED_TRUST_BOUNDARY_LOOKUP_URL_DEFAULT_UNIVERSE = (
+ "https://iamcredentials.googleapis.com/v1/projects/-"
+ "/serviceAccounts/[email protected]/allowedLocations"
+ )
+ FAKE_UNIVERSE_DOMAIN = "universe.foo"
SOURCE_CREDENTIALS = service_account.Credentials(
- SIGNER, SERVICE_ACCOUNT_EMAIL, TOKEN_URI
+ SIGNER, SERVICE_ACCOUNT_EMAIL, TOKEN_URI, trust_boundary=NO_OP_TRUST_BOUNDARY
)
USER_SOURCE_CREDENTIALS = credentials.Credentials(token="ABCDE")
IAM_ENDPOINT_OVERRIDE = (
@@ -144,6 +159,7 @@ class TestImpersonatedCredentials(object):
target_principal=TARGET_PRINCIPAL,
subject=None,
iam_endpoint_override=None,
+ trust_boundary=None, # Align with Credentials class default
):
return Credentials(
@@ -154,6 +170,7 @@ class TestImpersonatedCredentials(object):
lifetime=lifetime,
subject=subject,
iam_endpoint_override=iam_endpoint_override,
+ trust_boundary=trust_boundary,
)
def test_from_impersonated_service_account_info(self):
@@ -163,7 +180,7 @@ class TestImpersonatedCredentials(object):
assert isinstance(credentials, impersonated_credentials.Credentials)
def test_from_impersonated_service_account_info_with_invalid_source_credentials_type(
- self
+ self,
):
info = copy.deepcopy(IMPERSONATED_SERVICE_ACCOUNT_AUTHORIZED_USER_SOURCE_INFO)
assert "source_credentials" in info
@@ -178,7 +195,7 @@ class TestImpersonatedCredentials(object):
)
def test_from_impersonated_service_account_info_with_invalid_impersonation_url(
- self
+ self,
):
info = copy.deepcopy(IMPERSONATED_SERVICE_ACCOUNT_AUTHORIZED_USER_SOURCE_INFO)
info["service_account_impersonation_url"] = "invalid_url"
@@ -263,8 +280,12 @@ class TestImpersonatedCredentials(object):
assert headers["x-goog-api-client"] == "cred-type/imp"
@pytest.mark.parametrize("use_data_bytes", [True, False])
- def test_refresh_success(self, use_data_bytes, mock_donor_credentials):
- credentials = self.make_credentials(lifetime=None)
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ def test_refresh_success(
+ self, mock_lookup_trust_boundary, use_data_bytes, mock_donor_credentials
+ ):
+ # Start with no boundary.
+ credentials = self.make_credentials(lifetime=None, trust_boundary=None)
token = "token"
expire_time = (
@@ -278,7 +299,12 @@ class TestImpersonatedCredentials(object):
use_data_bytes=use_data_bytes,
)
- with mock.patch(
+ # Mock the trust boundary lookup to return a valid value.
+ mock_lookup_trust_boundary.return_value = self.VALID_TRUST_BOUNDARY
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ), mock.patch(
"google.auth.metrics.token_request_access_token_impersonate",
return_value=ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
):
@@ -291,6 +317,239 @@ class TestImpersonatedCredentials(object):
== ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE
)
+ # Verify that the x-allowed-locations header from the source credential
+ # was applied. The source credential has a NO_OP boundary, so the
+ # header should be an empty string.
+ request_kwargs = request.call_args[1]
+ assert "headers" in request_kwargs
+ assert "x-allowed-locations" in request_kwargs["headers"]
+ assert request_kwargs["headers"]["x-allowed-locations"] == ""
+
+ # Verify trust boundary was set.
+ assert credentials._trust_boundary == self.VALID_TRUST_BOUNDARY
+
+ # Verify the mock was called with the correct URL.
+ mock_lookup_trust_boundary.assert_called_once_with(
+ request,
+ self.EXPECTED_TRUST_BOUNDARY_LOOKUP_URL_DEFAULT_UNIVERSE,
+ headers={"authorization": "Bearer token"},
+ )
+
+ # Verify x-allowed-locations header is set correctly by apply().
+ headers_applied = {}
+ credentials.apply(headers_applied)
+ assert (
+ headers_applied["x-allowed-locations"]
+ == self.VALID_TRUST_BOUNDARY["encodedLocations"]
+ )
+
+ def test_refresh_source_creds_no_trust_boundary(self):
+ # Use a source credential that does not support trust boundaries.
+ source_credentials = credentials.Credentials(token="source_token")
+ creds = self.make_credentials(source_credentials=source_credentials)
+ token = "impersonated_token"
+
+ expire_time = (
+ _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
+ ).isoformat("T") + "Z"
+ response_body = {"accessToken": token, "expireTime": expire_time}
+
+ request = self.make_request(
+ data=json.dumps(response_body), status=http_client.OK
+ )
+
+ creds.refresh(request)
+
+ # Verify that the x-allowed-locations header was NOT applied because
+ # the source credential does not support trust boundaries.
+ request_kwargs = request.call_args[1]
+ assert "x-allowed-locations" not in request_kwargs["headers"]
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ def test_refresh_trust_boundary_lookup_fails_no_cache(
+ self, mock_lookup_trust_boundary, mock_donor_credentials
+ ):
+ # Start with no trust boundary
+ credentials = self.make_credentials(lifetime=None, trust_boundary=None)
+ token = "token"
+
+ expire_time = (
+ _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
+ ).isoformat("T") + "Z"
+ response_body = {"accessToken": token, "expireTime": expire_time}
+
+ request = self.make_request(
+ data=json.dumps(response_body), status=http_client.OK
+ )
+
+ # Mock the trust boundary lookup to raise an error
+ mock_lookup_trust_boundary.side_effect = exceptions.RefreshError(
+ "Lookup failed"
+ )
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ), pytest.raises(exceptions.RefreshError) as excinfo:
+ credentials.refresh(request)
+
+ assert "Lookup failed" in str(excinfo.value)
+ assert credentials._trust_boundary is None # Still no trust boundary
+ mock_lookup_trust_boundary.assert_called_once()
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ def test_refresh_fetches_no_op_trust_boundary(
+ self, mock_lookup_trust_boundary, mock_donor_credentials
+ ):
+ # Start with no trust boundary
+ credentials = self.make_credentials(lifetime=None, trust_boundary=None)
+ token = "token"
+ expire_time = (
+ _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
+ ).isoformat("T") + "Z"
+ response_body = {"accessToken": token, "expireTime": expire_time}
+ request = self.make_request(
+ data=json.dumps(response_body), status=http_client.OK
+ )
+
+ mock_lookup_trust_boundary.return_value = (
+ self.NO_OP_TRUST_BOUNDARY
+ ) # Mock returns NO_OP
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ), mock.patch(
+ "google.auth.metrics.token_request_access_token_impersonate",
+ return_value=ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
+ ):
+ credentials.refresh(request)
+
+ assert credentials._trust_boundary == self.NO_OP_TRUST_BOUNDARY
+ mock_lookup_trust_boundary.assert_called_once_with(
+ request,
+ self.EXPECTED_TRUST_BOUNDARY_LOOKUP_URL_DEFAULT_UNIVERSE,
+ headers={"authorization": "Bearer token"},
+ )
+ headers_applied = {}
+ credentials.apply(headers_applied)
+ assert headers_applied["x-allowed-locations"] == ""
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ def test_refresh_skips_trust_boundary_lookup_non_default_universe(
+ self, mock_lookup_trust_boundary
+ ):
+ # Create source credentials with a non-default universe domain
+ source_credentials = service_account.Credentials(
+ SIGNER,
+ TOKEN_URI,
+ universe_domain=self.FAKE_UNIVERSE_DOMAIN,
+ )
+ # Create impersonated credentials using the non-default source credentials
+ credentials = self.make_credentials(source_credentials=source_credentials)
+
+ # Mock the IAM credentials API call for generateAccessToken
+ token = "token"
+ expire_time = (
+ _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
+ ).isoformat("T") + "Z"
+ response_body = {"accessToken": token, "expireTime": expire_time}
+ request = self.make_request(
+ data=json.dumps(response_body), status=http_client.OK
+ )
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ credentials.refresh(request)
+
+ # Ensure trust boundary lookup was not called
+ mock_lookup_trust_boundary.assert_not_called()
+ # Verify that x-allowed-locations header is not set by apply()
+ headers_applied = {}
+ credentials.apply(headers_applied)
+ assert "x-allowed-locations" not in headers_applied
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ def test_refresh_starts_with_no_op_trust_boundary_skips_lookup(
+ self, mock_lookup_trust_boundary, mock_donor_credentials
+ ):
+ credentials = self.make_credentials(
+ lifetime=None, trust_boundary=self.NO_OP_TRUST_BOUNDARY
+ ) # Start with NO_OP
+ token = "token"
+ expire_time = (
+ _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
+ ).isoformat("T") + "Z"
+ response_body = {"accessToken": token, "expireTime": expire_time}
+ request = self.make_request(
+ data=json.dumps(response_body), status=http_client.OK
+ )
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ), mock.patch(
+ "google.auth.metrics.token_request_access_token_impersonate",
+ return_value=ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
+ ):
+ credentials.refresh(request)
+
+ # Verify trust boundary remained NO_OP
+ assert credentials._trust_boundary == self.NO_OP_TRUST_BOUNDARY
+
+ # Lookup should be skipped
+ mock_lookup_trust_boundary.assert_not_called()
+
+ # Verify that an empty header was added.
+ headers_applied = {}
+ credentials.apply(headers_applied)
+ assert headers_applied["x-allowed-locations"] == ""
+
+ @mock.patch("google.oauth2._client._lookup_trust_boundary")
+ def test_refresh_trust_boundary_lookup_fails_with_cached_data2(
+ self, mock_lookup_trust_boundary, mock_donor_credentials
+ ):
+ # Start with no trust boundary
+ credentials = self.make_credentials(lifetime=None, trust_boundary=None)
+ token = "token"
+
+ expire_time = (
+ _helpers.utcnow().replace(microsecond=0) + datetime.timedelta(seconds=500)
+ ).isoformat("T") + "Z"
+ response_body = {"accessToken": token, "expireTime": expire_time}
+
+ request = self.make_request(
+ data=json.dumps(response_body), status=http_client.OK
+ )
+
+ # First refresh: Successfully fetch a valid trust boundary.
+ mock_lookup_trust_boundary.return_value = self.VALID_TRUST_BOUNDARY
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ), mock.patch(
+ "google.auth.metrics.token_request_access_token_impersonate",
+ return_value=ACCESS_TOKEN_REQUEST_METRICS_HEADER_VALUE,
+ ):
+ credentials.refresh(request)
+
+ assert credentials.valid
+ # Verify trust boundary was set.
+ assert credentials._trust_boundary == self.VALID_TRUST_BOUNDARY
+ mock_lookup_trust_boundary.assert_called_once()
+
+ # Second refresh: Mock lookup to fail, but expect cached data to be preserved.
+ mock_lookup_trust_boundary.reset_mock()
+ mock_lookup_trust_boundary.side_effect = exceptions.RefreshError(
+ "Lookup failed"
+ )
+
+ with mock.patch.dict(
+ os.environ, {environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"}
+ ):
+ credentials.refresh(request)
+
+ assert credentials.valid
+ assert credentials._trust_boundary == self.VALID_TRUST_BOUNDARY
+ mock_lookup_trust_boundary.assert_called_once()
+
@pytest.mark.parametrize("use_data_bytes", [True, False])
def test_refresh_with_subject_success(self, use_data_bytes, mock_dwd_credentials):
credentials = self.make_credentials(subject="[email protected]", lifetime=None)
@@ -673,6 +932,37 @@ class TestImpersonatedCredentials(object):
assert credentials.requires_scopes is False
assert credentials._target_scopes == ["fake_scope1", "fake_scope2"]
+ def test_with_trust_boundary(self):
+ credentials = self.make_credentials()
+ new_boundary = {"encodedLocations": "new_boundary"}
+ new_credentials = credentials.with_trust_boundary(new_boundary)
+
+ assert new_credentials is not credentials
+ assert new_credentials._trust_boundary == new_boundary
+ # The source credentials should be a copy, not the same object.
+ # But they should be functionally equivalent.
+ assert (
+ new_credentials._source_credentials is not credentials._source_credentials
+ )
+
+ assert (
+ new_credentials._source_credentials.service_account_email
+ == credentials._source_credentials.service_account_email
+ )
+ assert (
+ new_credentials._source_credentials._signer
+ == credentials._source_credentials._signer
+ )
+ assert new_credentials._target_principal == credentials._target_principal
+
+ def test_build_trust_boundary_lookup_url_no_email(self):
+ credentials = self.make_credentials(target_principal=None)
+
+ with pytest.raises(ValueError) as excinfo:
+ credentials._build_trust_boundary_lookup_url()
+
+ assert "Service account email is required" in str(excinfo.value)
+
def test_with_scopes_provide_default_scopes(self):
credentials = self.make_credentials()
credentials._target_scopes = []
diff --git a/contrib/python/google-auth/py3/ya.make b/contrib/python/google-auth/py3/ya.make
index 9bd4b298b03..f4ad9bdb5f6 100644
--- a/contrib/python/google-auth/py3/ya.make
+++ b/contrib/python/google-auth/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(2.40.3)
+VERSION(2.41.0)
LICENSE(Apache-2.0)
diff --git a/contrib/python/kubernetes/.dist-info/METADATA b/contrib/python/kubernetes/.dist-info/METADATA
index 03a9b0e4f73..ecdf43704b6 100644
--- a/contrib/python/kubernetes/.dist-info/METADATA
+++ b/contrib/python/kubernetes/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: kubernetes
-Version: 33.1.0
+Version: 34.1.0
Summary: Kubernetes python client
Home-page: https://github.com/kubernetes-client/python
Author: Kubernetes
@@ -31,8 +31,7 @@ Requires-Dist: google-auth>=1.0.1
Requires-Dist: websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0
Requires-Dist: requests
Requires-Dist: requests-oauthlib
-Requires-Dist: oauthlib>=3.2.2
-Requires-Dist: urllib3>=1.24.2
+Requires-Dist: urllib3<2.4.0,>=1.24.2
Requires-Dist: durationpy>=0.7
Provides-Extra: adal
Requires-Dist: adal>=1.0.2; extra == "adal"
diff --git a/contrib/python/kubernetes/README.md b/contrib/python/kubernetes/README.md
index 99e2b38e08c..4c95bf30ef3 100644
--- a/contrib/python/kubernetes/README.md
+++ b/contrib/python/kubernetes/README.md
@@ -103,6 +103,7 @@ supported versions of Kubernetes clusters.
- [client 31.y.z](https://pypi.org/project/kubernetes/31.0.0/): Kubernetes 1.30 or below (+-), Kubernetes 1.31 (✓), Kubernetes 1.32 or above (+-)
- [client 32.y.z](https://pypi.org/project/kubernetes/32.0.1/): Kubernetes 1.31 or below (+-), Kubernetes 1.32 (✓), Kubernetes 1.33 or above (+-)
- [client 33.y.z](https://pypi.org/project/kubernetes/33.1.0/): Kubernetes 1.32 or below (+-), Kubernetes 1.33 (✓), Kubernetes 1.34 or above (+-)
+- [client 34.y.z](https://pypi.org/project/kubernetes/34.1.0/): Kubernetes 1.33 or below (+-), Kubernetes 1.34 (✓), Kubernetes 1.35 or above (+-)
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release.
@@ -169,11 +170,13 @@ between client-python versions.
| 30.0 Alpha/Beta | Kubernetes main repo, 1.30 branch | ✗ |
| 30.0 | Kubernetes main repo, 1.30 branch | ✗ |
| 31.0 Alpha/Beta | Kubernetes main repo, 1.31 branch | ✗ |
-| 31.0 | Kubernetes main repo, 1.31 branch | ✓ |
+| 31.0 | Kubernetes main repo, 1.31 branch | ✗ |
| 32.0 Alpha/Beta | Kubernetes main repo, 1.32 branch | ✗ |
| 32.1 | Kubernetes main repo, 1.32 branch | ✓ |
| 33.1 Alpha/Beta | Kubernetes main repo, 1.33 branch | ✗ |
| 33.1 | Kubernetes main repo, 1.33 branch | ✓ |
+| 34.1 Alpha/Beta | Kubernetes main repo, 1.34 branch | ✗ |
+| 34.1 | Kubernetes main repo, 1.34 branch | ✓ |
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release.
diff --git a/contrib/python/kubernetes/kubernetes/__init__.py b/contrib/python/kubernetes/kubernetes/__init__.py
index 2101f0c63f3..af07bd75e00 100644
--- a/contrib/python/kubernetes/kubernetes/__init__.py
+++ b/contrib/python/kubernetes/kubernetes/__init__.py
@@ -14,7 +14,7 @@
__project__ = 'kubernetes'
# The version is auto-updated. Please do not edit.
-__version__ = "33.1.0"
+__version__ = "34.1.0"
from . import client
from . import config
diff --git a/contrib/python/kubernetes/kubernetes/client/__init__.py b/contrib/python/kubernetes/kubernetes/client/__init__.py
index b2e039dff7c..49f720ee50b 100644
--- a/contrib/python/kubernetes/kubernetes/client/__init__.py
+++ b/contrib/python/kubernetes/kubernetes/client/__init__.py
@@ -7,14 +7,14 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
-__version__ = "33.1.0"
+__version__ = "34.1.0"
# import apis into sdk package
from kubernetes.client.api.well_known_api import WellKnownApi
@@ -69,6 +69,7 @@ from kubernetes.client.api.policy_v1_api import PolicyV1Api
from kubernetes.client.api.rbac_authorization_api import RbacAuthorizationApi
from kubernetes.client.api.rbac_authorization_v1_api import RbacAuthorizationV1Api
from kubernetes.client.api.resource_api import ResourceApi
+from kubernetes.client.api.resource_v1_api import ResourceV1Api
from kubernetes.client.api.resource_v1alpha3_api import ResourceV1alpha3Api
from kubernetes.client.api.resource_v1beta1_api import ResourceV1beta1Api
from kubernetes.client.api.resource_v1beta2_api import ResourceV1beta2Api
@@ -101,12 +102,14 @@ from kubernetes.client.models.core_v1_endpoint_port import CoreV1EndpointPort
from kubernetes.client.models.core_v1_event import CoreV1Event
from kubernetes.client.models.core_v1_event_list import CoreV1EventList
from kubernetes.client.models.core_v1_event_series import CoreV1EventSeries
+from kubernetes.client.models.core_v1_resource_claim import CoreV1ResourceClaim
from kubernetes.client.models.discovery_v1_endpoint_port import DiscoveryV1EndpointPort
from kubernetes.client.models.events_v1_event import EventsV1Event
from kubernetes.client.models.events_v1_event_list import EventsV1EventList
from kubernetes.client.models.events_v1_event_series import EventsV1EventSeries
from kubernetes.client.models.flowcontrol_v1_subject import FlowcontrolV1Subject
from kubernetes.client.models.rbac_v1_subject import RbacV1Subject
+from kubernetes.client.models.resource_v1_resource_claim import ResourceV1ResourceClaim
from kubernetes.client.models.storage_v1_token_request import StorageV1TokenRequest
from kubernetes.client.models.v1_api_group import V1APIGroup
from kubernetes.client.models.v1_api_group_list import V1APIGroupList
@@ -121,6 +124,8 @@ from kubernetes.client.models.v1_api_versions import V1APIVersions
from kubernetes.client.models.v1_aws_elastic_block_store_volume_source import V1AWSElasticBlockStoreVolumeSource
from kubernetes.client.models.v1_affinity import V1Affinity
from kubernetes.client.models.v1_aggregation_rule import V1AggregationRule
+from kubernetes.client.models.v1_allocated_device_status import V1AllocatedDeviceStatus
+from kubernetes.client.models.v1_allocation_result import V1AllocationResult
from kubernetes.client.models.v1_app_armor_profile import V1AppArmorProfile
from kubernetes.client.models.v1_attached_volume import V1AttachedVolume
from kubernetes.client.models.v1_audit_annotation import V1AuditAnnotation
@@ -129,6 +134,7 @@ from kubernetes.client.models.v1_azure_file_persistent_volume_source import V1Az
from kubernetes.client.models.v1_azure_file_volume_source import V1AzureFileVolumeSource
from kubernetes.client.models.v1_binding import V1Binding
from kubernetes.client.models.v1_bound_object_reference import V1BoundObjectReference
+from kubernetes.client.models.v1_cel_device_selector import V1CELDeviceSelector
from kubernetes.client.models.v1_csi_driver import V1CSIDriver
from kubernetes.client.models.v1_csi_driver_list import V1CSIDriverList
from kubernetes.client.models.v1_csi_driver_spec import V1CSIDriverSpec
@@ -141,6 +147,9 @@ from kubernetes.client.models.v1_csi_storage_capacity import V1CSIStorageCapacit
from kubernetes.client.models.v1_csi_storage_capacity_list import V1CSIStorageCapacityList
from kubernetes.client.models.v1_csi_volume_source import V1CSIVolumeSource
from kubernetes.client.models.v1_capabilities import V1Capabilities
+from kubernetes.client.models.v1_capacity_request_policy import V1CapacityRequestPolicy
+from kubernetes.client.models.v1_capacity_request_policy_range import V1CapacityRequestPolicyRange
+from kubernetes.client.models.v1_capacity_requirements import V1CapacityRequirements
from kubernetes.client.models.v1_ceph_fs_persistent_volume_source import V1CephFSPersistentVolumeSource
from kubernetes.client.models.v1_ceph_fs_volume_source import V1CephFSVolumeSource
from kubernetes.client.models.v1_certificate_signing_request import V1CertificateSigningRequest
@@ -168,9 +177,12 @@ from kubernetes.client.models.v1_config_map_node_config_source import V1ConfigMa
from kubernetes.client.models.v1_config_map_projection import V1ConfigMapProjection
from kubernetes.client.models.v1_config_map_volume_source import V1ConfigMapVolumeSource
from kubernetes.client.models.v1_container import V1Container
+from kubernetes.client.models.v1_container_extended_resource_request import V1ContainerExtendedResourceRequest
from kubernetes.client.models.v1_container_image import V1ContainerImage
from kubernetes.client.models.v1_container_port import V1ContainerPort
from kubernetes.client.models.v1_container_resize_policy import V1ContainerResizePolicy
+from kubernetes.client.models.v1_container_restart_rule import V1ContainerRestartRule
+from kubernetes.client.models.v1_container_restart_rule_on_exit_codes import V1ContainerRestartRuleOnExitCodes
from kubernetes.client.models.v1_container_state import V1ContainerState
from kubernetes.client.models.v1_container_state_running import V1ContainerStateRunning
from kubernetes.client.models.v1_container_state_terminated import V1ContainerStateTerminated
@@ -179,6 +191,8 @@ from kubernetes.client.models.v1_container_status import V1ContainerStatus
from kubernetes.client.models.v1_container_user import V1ContainerUser
from kubernetes.client.models.v1_controller_revision import V1ControllerRevision
from kubernetes.client.models.v1_controller_revision_list import V1ControllerRevisionList
+from kubernetes.client.models.v1_counter import V1Counter
+from kubernetes.client.models.v1_counter_set import V1CounterSet
from kubernetes.client.models.v1_cron_job import V1CronJob
from kubernetes.client.models.v1_cron_job_list import V1CronJobList
from kubernetes.client.models.v1_cron_job_spec import V1CronJobSpec
@@ -210,6 +224,25 @@ from kubernetes.client.models.v1_deployment_list import V1DeploymentList
from kubernetes.client.models.v1_deployment_spec import V1DeploymentSpec
from kubernetes.client.models.v1_deployment_status import V1DeploymentStatus
from kubernetes.client.models.v1_deployment_strategy import V1DeploymentStrategy
+from kubernetes.client.models.v1_device import V1Device
+from kubernetes.client.models.v1_device_allocation_configuration import V1DeviceAllocationConfiguration
+from kubernetes.client.models.v1_device_allocation_result import V1DeviceAllocationResult
+from kubernetes.client.models.v1_device_attribute import V1DeviceAttribute
+from kubernetes.client.models.v1_device_capacity import V1DeviceCapacity
+from kubernetes.client.models.v1_device_claim import V1DeviceClaim
+from kubernetes.client.models.v1_device_claim_configuration import V1DeviceClaimConfiguration
+from kubernetes.client.models.v1_device_class import V1DeviceClass
+from kubernetes.client.models.v1_device_class_configuration import V1DeviceClassConfiguration
+from kubernetes.client.models.v1_device_class_list import V1DeviceClassList
+from kubernetes.client.models.v1_device_class_spec import V1DeviceClassSpec
+from kubernetes.client.models.v1_device_constraint import V1DeviceConstraint
+from kubernetes.client.models.v1_device_counter_consumption import V1DeviceCounterConsumption
+from kubernetes.client.models.v1_device_request import V1DeviceRequest
+from kubernetes.client.models.v1_device_request_allocation_result import V1DeviceRequestAllocationResult
+from kubernetes.client.models.v1_device_selector import V1DeviceSelector
+from kubernetes.client.models.v1_device_sub_request import V1DeviceSubRequest
+from kubernetes.client.models.v1_device_taint import V1DeviceTaint
+from kubernetes.client.models.v1_device_toleration import V1DeviceToleration
from kubernetes.client.models.v1_downward_api_projection import V1DownwardAPIProjection
from kubernetes.client.models.v1_downward_api_volume_file import V1DownwardAPIVolumeFile
from kubernetes.client.models.v1_downward_api_volume_source import V1DownwardAPIVolumeSource
@@ -230,6 +263,7 @@ from kubernetes.client.models.v1_ephemeral_container import V1EphemeralContainer
from kubernetes.client.models.v1_ephemeral_volume_source import V1EphemeralVolumeSource
from kubernetes.client.models.v1_event_source import V1EventSource
from kubernetes.client.models.v1_eviction import V1Eviction
+from kubernetes.client.models.v1_exact_device_request import V1ExactDeviceRequest
from kubernetes.client.models.v1_exec_action import V1ExecAction
from kubernetes.client.models.v1_exempt_priority_level_configuration import V1ExemptPriorityLevelConfiguration
from kubernetes.client.models.v1_expression_warning import V1ExpressionWarning
@@ -237,6 +271,7 @@ from kubernetes.client.models.v1_external_documentation import V1ExternalDocumen
from kubernetes.client.models.v1_fc_volume_source import V1FCVolumeSource
from kubernetes.client.models.v1_field_selector_attributes import V1FieldSelectorAttributes
from kubernetes.client.models.v1_field_selector_requirement import V1FieldSelectorRequirement
+from kubernetes.client.models.v1_file_key_selector import V1FileKeySelector
from kubernetes.client.models.v1_flex_persistent_volume_source import V1FlexPersistentVolumeSource
from kubernetes.client.models.v1_flex_volume_source import V1FlexVolumeSource
from kubernetes.client.models.v1_flocker_volume_source import V1FlockerVolumeSource
@@ -331,6 +366,7 @@ from kubernetes.client.models.v1_namespace_condition import V1NamespaceCondition
from kubernetes.client.models.v1_namespace_list import V1NamespaceList
from kubernetes.client.models.v1_namespace_spec import V1NamespaceSpec
from kubernetes.client.models.v1_namespace_status import V1NamespaceStatus
+from kubernetes.client.models.v1_network_device_data import V1NetworkDeviceData
from kubernetes.client.models.v1_network_policy import V1NetworkPolicy
from kubernetes.client.models.v1_network_policy_egress_rule import V1NetworkPolicyEgressRule
from kubernetes.client.models.v1_network_policy_ingress_rule import V1NetworkPolicyIngressRule
@@ -362,6 +398,7 @@ from kubernetes.client.models.v1_non_resource_rule import V1NonResourceRule
from kubernetes.client.models.v1_object_field_selector import V1ObjectFieldSelector
from kubernetes.client.models.v1_object_meta import V1ObjectMeta
from kubernetes.client.models.v1_object_reference import V1ObjectReference
+from kubernetes.client.models.v1_opaque_device_configuration import V1OpaqueDeviceConfiguration
from kubernetes.client.models.v1_overhead import V1Overhead
from kubernetes.client.models.v1_owner_reference import V1OwnerReference
from kubernetes.client.models.v1_param_kind import V1ParamKind
@@ -383,6 +420,7 @@ from kubernetes.client.models.v1_pod import V1Pod
from kubernetes.client.models.v1_pod_affinity import V1PodAffinity
from kubernetes.client.models.v1_pod_affinity_term import V1PodAffinityTerm
from kubernetes.client.models.v1_pod_anti_affinity import V1PodAntiAffinity
+from kubernetes.client.models.v1_pod_certificate_projection import V1PodCertificateProjection
from kubernetes.client.models.v1_pod_condition import V1PodCondition
from kubernetes.client.models.v1_pod_dns_config import V1PodDNSConfig
from kubernetes.client.models.v1_pod_dns_config_option import V1PodDNSConfigOption
@@ -390,6 +428,7 @@ from kubernetes.client.models.v1_pod_disruption_budget import V1PodDisruptionBud
from kubernetes.client.models.v1_pod_disruption_budget_list import V1PodDisruptionBudgetList
from kubernetes.client.models.v1_pod_disruption_budget_spec import V1PodDisruptionBudgetSpec
from kubernetes.client.models.v1_pod_disruption_budget_status import V1PodDisruptionBudgetStatus
+from kubernetes.client.models.v1_pod_extended_resource_claim_status import V1PodExtendedResourceClaimStatus
from kubernetes.client.models.v1_pod_failure_policy import V1PodFailurePolicy
from kubernetes.client.models.v1_pod_failure_policy_on_exit_codes_requirement import V1PodFailurePolicyOnExitCodesRequirement
from kubernetes.client.models.v1_pod_failure_policy_on_pod_conditions_pattern import V1PodFailurePolicyOnPodConditionsPattern
@@ -438,16 +477,26 @@ from kubernetes.client.models.v1_replication_controller_list import V1Replicatio
from kubernetes.client.models.v1_replication_controller_spec import V1ReplicationControllerSpec
from kubernetes.client.models.v1_replication_controller_status import V1ReplicationControllerStatus
from kubernetes.client.models.v1_resource_attributes import V1ResourceAttributes
-from kubernetes.client.models.v1_resource_claim import V1ResourceClaim
+from kubernetes.client.models.v1_resource_claim_consumer_reference import V1ResourceClaimConsumerReference
+from kubernetes.client.models.v1_resource_claim_list import V1ResourceClaimList
+from kubernetes.client.models.v1_resource_claim_spec import V1ResourceClaimSpec
+from kubernetes.client.models.v1_resource_claim_status import V1ResourceClaimStatus
+from kubernetes.client.models.v1_resource_claim_template import V1ResourceClaimTemplate
+from kubernetes.client.models.v1_resource_claim_template_list import V1ResourceClaimTemplateList
+from kubernetes.client.models.v1_resource_claim_template_spec import V1ResourceClaimTemplateSpec
from kubernetes.client.models.v1_resource_field_selector import V1ResourceFieldSelector
from kubernetes.client.models.v1_resource_health import V1ResourceHealth
from kubernetes.client.models.v1_resource_policy_rule import V1ResourcePolicyRule
+from kubernetes.client.models.v1_resource_pool import V1ResourcePool
from kubernetes.client.models.v1_resource_quota import V1ResourceQuota
from kubernetes.client.models.v1_resource_quota_list import V1ResourceQuotaList
from kubernetes.client.models.v1_resource_quota_spec import V1ResourceQuotaSpec
from kubernetes.client.models.v1_resource_quota_status import V1ResourceQuotaStatus
from kubernetes.client.models.v1_resource_requirements import V1ResourceRequirements
from kubernetes.client.models.v1_resource_rule import V1ResourceRule
+from kubernetes.client.models.v1_resource_slice import V1ResourceSlice
+from kubernetes.client.models.v1_resource_slice_list import V1ResourceSliceList
+from kubernetes.client.models.v1_resource_slice_spec import V1ResourceSliceSpec
from kubernetes.client.models.v1_resource_status import V1ResourceStatus
from kubernetes.client.models.v1_role import V1Role
from kubernetes.client.models.v1_role_binding import V1RoleBinding
@@ -560,6 +609,8 @@ from kubernetes.client.models.v1_volume_attachment_list import V1VolumeAttachmen
from kubernetes.client.models.v1_volume_attachment_source import V1VolumeAttachmentSource
from kubernetes.client.models.v1_volume_attachment_spec import V1VolumeAttachmentSpec
from kubernetes.client.models.v1_volume_attachment_status import V1VolumeAttachmentStatus
+from kubernetes.client.models.v1_volume_attributes_class import V1VolumeAttributesClass
+from kubernetes.client.models.v1_volume_attributes_class_list import V1VolumeAttributesClassList
from kubernetes.client.models.v1_volume_device import V1VolumeDevice
from kubernetes.client.models.v1_volume_error import V1VolumeError
from kubernetes.client.models.v1_volume_mount import V1VolumeMount
@@ -592,6 +643,10 @@ from kubernetes.client.models.v1alpha1_mutation import V1alpha1Mutation
from kubernetes.client.models.v1alpha1_named_rule_with_operations import V1alpha1NamedRuleWithOperations
from kubernetes.client.models.v1alpha1_param_kind import V1alpha1ParamKind
from kubernetes.client.models.v1alpha1_param_ref import V1alpha1ParamRef
+from kubernetes.client.models.v1alpha1_pod_certificate_request import V1alpha1PodCertificateRequest
+from kubernetes.client.models.v1alpha1_pod_certificate_request_list import V1alpha1PodCertificateRequestList
+from kubernetes.client.models.v1alpha1_pod_certificate_request_spec import V1alpha1PodCertificateRequestSpec
+from kubernetes.client.models.v1alpha1_pod_certificate_request_status import V1alpha1PodCertificateRequestStatus
from kubernetes.client.models.v1alpha1_server_storage_version import V1alpha1ServerStorageVersion
from kubernetes.client.models.v1alpha1_storage_version import V1alpha1StorageVersion
from kubernetes.client.models.v1alpha1_storage_version_condition import V1alpha1StorageVersionCondition
@@ -607,53 +662,21 @@ from kubernetes.client.models.v1alpha1_volume_attributes_class_list import V1alp
from kubernetes.client.models.v1alpha2_lease_candidate import V1alpha2LeaseCandidate
from kubernetes.client.models.v1alpha2_lease_candidate_list import V1alpha2LeaseCandidateList
from kubernetes.client.models.v1alpha2_lease_candidate_spec import V1alpha2LeaseCandidateSpec
-from kubernetes.client.models.v1alpha3_allocated_device_status import V1alpha3AllocatedDeviceStatus
-from kubernetes.client.models.v1alpha3_allocation_result import V1alpha3AllocationResult
-from kubernetes.client.models.v1alpha3_basic_device import V1alpha3BasicDevice
from kubernetes.client.models.v1alpha3_cel_device_selector import V1alpha3CELDeviceSelector
-from kubernetes.client.models.v1alpha3_counter import V1alpha3Counter
-from kubernetes.client.models.v1alpha3_counter_set import V1alpha3CounterSet
-from kubernetes.client.models.v1alpha3_device import V1alpha3Device
-from kubernetes.client.models.v1alpha3_device_allocation_configuration import V1alpha3DeviceAllocationConfiguration
-from kubernetes.client.models.v1alpha3_device_allocation_result import V1alpha3DeviceAllocationResult
-from kubernetes.client.models.v1alpha3_device_attribute import V1alpha3DeviceAttribute
-from kubernetes.client.models.v1alpha3_device_claim import V1alpha3DeviceClaim
-from kubernetes.client.models.v1alpha3_device_claim_configuration import V1alpha3DeviceClaimConfiguration
-from kubernetes.client.models.v1alpha3_device_class import V1alpha3DeviceClass
-from kubernetes.client.models.v1alpha3_device_class_configuration import V1alpha3DeviceClassConfiguration
-from kubernetes.client.models.v1alpha3_device_class_list import V1alpha3DeviceClassList
-from kubernetes.client.models.v1alpha3_device_class_spec import V1alpha3DeviceClassSpec
-from kubernetes.client.models.v1alpha3_device_constraint import V1alpha3DeviceConstraint
-from kubernetes.client.models.v1alpha3_device_counter_consumption import V1alpha3DeviceCounterConsumption
-from kubernetes.client.models.v1alpha3_device_request import V1alpha3DeviceRequest
-from kubernetes.client.models.v1alpha3_device_request_allocation_result import V1alpha3DeviceRequestAllocationResult
from kubernetes.client.models.v1alpha3_device_selector import V1alpha3DeviceSelector
-from kubernetes.client.models.v1alpha3_device_sub_request import V1alpha3DeviceSubRequest
from kubernetes.client.models.v1alpha3_device_taint import V1alpha3DeviceTaint
from kubernetes.client.models.v1alpha3_device_taint_rule import V1alpha3DeviceTaintRule
from kubernetes.client.models.v1alpha3_device_taint_rule_list import V1alpha3DeviceTaintRuleList
from kubernetes.client.models.v1alpha3_device_taint_rule_spec import V1alpha3DeviceTaintRuleSpec
from kubernetes.client.models.v1alpha3_device_taint_selector import V1alpha3DeviceTaintSelector
-from kubernetes.client.models.v1alpha3_device_toleration import V1alpha3DeviceToleration
-from kubernetes.client.models.v1alpha3_network_device_data import V1alpha3NetworkDeviceData
-from kubernetes.client.models.v1alpha3_opaque_device_configuration import V1alpha3OpaqueDeviceConfiguration
-from kubernetes.client.models.v1alpha3_resource_claim import V1alpha3ResourceClaim
-from kubernetes.client.models.v1alpha3_resource_claim_consumer_reference import V1alpha3ResourceClaimConsumerReference
-from kubernetes.client.models.v1alpha3_resource_claim_list import V1alpha3ResourceClaimList
-from kubernetes.client.models.v1alpha3_resource_claim_spec import V1alpha3ResourceClaimSpec
-from kubernetes.client.models.v1alpha3_resource_claim_status import V1alpha3ResourceClaimStatus
-from kubernetes.client.models.v1alpha3_resource_claim_template import V1alpha3ResourceClaimTemplate
-from kubernetes.client.models.v1alpha3_resource_claim_template_list import V1alpha3ResourceClaimTemplateList
-from kubernetes.client.models.v1alpha3_resource_claim_template_spec import V1alpha3ResourceClaimTemplateSpec
-from kubernetes.client.models.v1alpha3_resource_pool import V1alpha3ResourcePool
-from kubernetes.client.models.v1alpha3_resource_slice import V1alpha3ResourceSlice
-from kubernetes.client.models.v1alpha3_resource_slice_list import V1alpha3ResourceSliceList
-from kubernetes.client.models.v1alpha3_resource_slice_spec import V1alpha3ResourceSliceSpec
from kubernetes.client.models.v1beta1_allocated_device_status import V1beta1AllocatedDeviceStatus
from kubernetes.client.models.v1beta1_allocation_result import V1beta1AllocationResult
-from kubernetes.client.models.v1beta1_audit_annotation import V1beta1AuditAnnotation
+from kubernetes.client.models.v1beta1_apply_configuration import V1beta1ApplyConfiguration
from kubernetes.client.models.v1beta1_basic_device import V1beta1BasicDevice
from kubernetes.client.models.v1beta1_cel_device_selector import V1beta1CELDeviceSelector
+from kubernetes.client.models.v1beta1_capacity_request_policy import V1beta1CapacityRequestPolicy
+from kubernetes.client.models.v1beta1_capacity_request_policy_range import V1beta1CapacityRequestPolicyRange
+from kubernetes.client.models.v1beta1_capacity_requirements import V1beta1CapacityRequirements
from kubernetes.client.models.v1beta1_cluster_trust_bundle import V1beta1ClusterTrustBundle
from kubernetes.client.models.v1beta1_cluster_trust_bundle_list import V1beta1ClusterTrustBundleList
from kubernetes.client.models.v1beta1_cluster_trust_bundle_spec import V1beta1ClusterTrustBundleSpec
@@ -678,15 +701,22 @@ from kubernetes.client.models.v1beta1_device_selector import V1beta1DeviceSelect
from kubernetes.client.models.v1beta1_device_sub_request import V1beta1DeviceSubRequest
from kubernetes.client.models.v1beta1_device_taint import V1beta1DeviceTaint
from kubernetes.client.models.v1beta1_device_toleration import V1beta1DeviceToleration
-from kubernetes.client.models.v1beta1_expression_warning import V1beta1ExpressionWarning
from kubernetes.client.models.v1beta1_ip_address import V1beta1IPAddress
from kubernetes.client.models.v1beta1_ip_address_list import V1beta1IPAddressList
from kubernetes.client.models.v1beta1_ip_address_spec import V1beta1IPAddressSpec
+from kubernetes.client.models.v1beta1_json_patch import V1beta1JSONPatch
from kubernetes.client.models.v1beta1_lease_candidate import V1beta1LeaseCandidate
from kubernetes.client.models.v1beta1_lease_candidate_list import V1beta1LeaseCandidateList
from kubernetes.client.models.v1beta1_lease_candidate_spec import V1beta1LeaseCandidateSpec
from kubernetes.client.models.v1beta1_match_condition import V1beta1MatchCondition
from kubernetes.client.models.v1beta1_match_resources import V1beta1MatchResources
+from kubernetes.client.models.v1beta1_mutating_admission_policy import V1beta1MutatingAdmissionPolicy
+from kubernetes.client.models.v1beta1_mutating_admission_policy_binding import V1beta1MutatingAdmissionPolicyBinding
+from kubernetes.client.models.v1beta1_mutating_admission_policy_binding_list import V1beta1MutatingAdmissionPolicyBindingList
+from kubernetes.client.models.v1beta1_mutating_admission_policy_binding_spec import V1beta1MutatingAdmissionPolicyBindingSpec
+from kubernetes.client.models.v1beta1_mutating_admission_policy_list import V1beta1MutatingAdmissionPolicyList
+from kubernetes.client.models.v1beta1_mutating_admission_policy_spec import V1beta1MutatingAdmissionPolicySpec
+from kubernetes.client.models.v1beta1_mutation import V1beta1Mutation
from kubernetes.client.models.v1beta1_named_rule_with_operations import V1beta1NamedRuleWithOperations
from kubernetes.client.models.v1beta1_network_device_data import V1beta1NetworkDeviceData
from kubernetes.client.models.v1beta1_opaque_device_configuration import V1beta1OpaqueDeviceConfiguration
@@ -709,21 +739,15 @@ from kubernetes.client.models.v1beta1_service_cidr import V1beta1ServiceCIDR
from kubernetes.client.models.v1beta1_service_cidr_list import V1beta1ServiceCIDRList
from kubernetes.client.models.v1beta1_service_cidr_spec import V1beta1ServiceCIDRSpec
from kubernetes.client.models.v1beta1_service_cidr_status import V1beta1ServiceCIDRStatus
-from kubernetes.client.models.v1beta1_type_checking import V1beta1TypeChecking
-from kubernetes.client.models.v1beta1_validating_admission_policy import V1beta1ValidatingAdmissionPolicy
-from kubernetes.client.models.v1beta1_validating_admission_policy_binding import V1beta1ValidatingAdmissionPolicyBinding
-from kubernetes.client.models.v1beta1_validating_admission_policy_binding_list import V1beta1ValidatingAdmissionPolicyBindingList
-from kubernetes.client.models.v1beta1_validating_admission_policy_binding_spec import V1beta1ValidatingAdmissionPolicyBindingSpec
-from kubernetes.client.models.v1beta1_validating_admission_policy_list import V1beta1ValidatingAdmissionPolicyList
-from kubernetes.client.models.v1beta1_validating_admission_policy_spec import V1beta1ValidatingAdmissionPolicySpec
-from kubernetes.client.models.v1beta1_validating_admission_policy_status import V1beta1ValidatingAdmissionPolicyStatus
-from kubernetes.client.models.v1beta1_validation import V1beta1Validation
from kubernetes.client.models.v1beta1_variable import V1beta1Variable
from kubernetes.client.models.v1beta1_volume_attributes_class import V1beta1VolumeAttributesClass
from kubernetes.client.models.v1beta1_volume_attributes_class_list import V1beta1VolumeAttributesClassList
from kubernetes.client.models.v1beta2_allocated_device_status import V1beta2AllocatedDeviceStatus
from kubernetes.client.models.v1beta2_allocation_result import V1beta2AllocationResult
from kubernetes.client.models.v1beta2_cel_device_selector import V1beta2CELDeviceSelector
+from kubernetes.client.models.v1beta2_capacity_request_policy import V1beta2CapacityRequestPolicy
+from kubernetes.client.models.v1beta2_capacity_request_policy_range import V1beta2CapacityRequestPolicyRange
+from kubernetes.client.models.v1beta2_capacity_requirements import V1beta2CapacityRequirements
from kubernetes.client.models.v1beta2_counter import V1beta2Counter
from kubernetes.client.models.v1beta2_counter_set import V1beta2CounterSet
from kubernetes.client.models.v1beta2_device import V1beta2Device
diff --git a/contrib/python/kubernetes/kubernetes/client/api/__init__.py b/contrib/python/kubernetes/kubernetes/client/api/__init__.py
index ac167ebffb9..7bc5ad88257 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/__init__.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/__init__.py
@@ -55,6 +55,7 @@ from kubernetes.client.api.policy_v1_api import PolicyV1Api
from kubernetes.client.api.rbac_authorization_api import RbacAuthorizationApi
from kubernetes.client.api.rbac_authorization_v1_api import RbacAuthorizationV1Api
from kubernetes.client.api.resource_api import ResourceApi
+from kubernetes.client.api.resource_v1_api import ResourceV1Api
from kubernetes.client.api.resource_v1alpha3_api import ResourceV1alpha3Api
from kubernetes.client.api.resource_v1beta1_api import ResourceV1beta1Api
from kubernetes.client.api.resource_v1beta2_api import ResourceV1beta2Api
diff --git a/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_api.py b/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_api.py
index edfb06e15ef..2a0b527cb2f 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1_api.py
index be25b990e63..abde655ea54 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1alpha1_api.py b/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1alpha1_api.py
index fbbddd11d82..c95724be616 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1alpha1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1alpha1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1beta1_api.py b/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1beta1_api.py
index 15e2c3bd3d8..9b14fbb54c8 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1beta1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1beta1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -36,17 +36,17 @@ class AdmissionregistrationV1beta1Api(object):
api_client = ApiClient()
self.api_client = api_client
- def create_validating_admission_policy(self, body, **kwargs): # noqa: E501
- """create_validating_admission_policy # noqa: E501
+ def create_mutating_admission_policy(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy # noqa: E501
- create a ValidatingAdmissionPolicy # 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_validating_admission_policy(body, async_req=True)
+ >>> thread = api.create_mutating_admission_policy(body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param V1beta1ValidatingAdmissionPolicy body: (required)
+ :param V1beta1MutatingAdmissionPolicy body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
@@ -58,24 +58,24 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicy
+ :return: V1beta1MutatingAdmissionPolicy
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.create_validating_admission_policy_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_mutating_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
+ def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy # noqa: E501
- create a ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(body, async_req=True)
+ >>> thread = api.create_mutating_admission_policy_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param V1beta1ValidatingAdmissionPolicy body: (required)
+ :param V1beta1MutatingAdmissionPolicy body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
@@ -89,7 +89,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -116,14 +116,14 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method create_validating_admission_policy" % key
+ " 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 ('body' not in local_var_params or # noqa: E501
local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy`") # noqa: E501
collection_formats = {}
@@ -155,14 +155,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies', 'POST',
+ '/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_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicy', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -170,17 +170,17 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def create_validating_admission_policy_binding(self, body, **kwargs): # noqa: E501
- """create_validating_admission_policy_binding # noqa: E501
+ def create_mutating_admission_policy_binding(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy_binding # noqa: E501
- create a ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(body, async_req=True)
+ >>> thread = api.create_mutating_admission_policy_binding(body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param V1beta1ValidatingAdmissionPolicyBinding body: (required)
+ :param V1beta1MutatingAdmissionPolicyBinding body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
@@ -192,24 +192,24 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicyBinding
+ :return: V1beta1MutatingAdmissionPolicyBinding
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.create_validating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501
+ return self.create_mutating_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
+ def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_mutating_admission_policy_binding # noqa: E501
- create a ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(body, async_req=True)
+ >>> thread = api.create_mutating_admission_policy_binding_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param V1beta1ValidatingAdmissionPolicyBinding body: (required)
+ :param V1beta1MutatingAdmissionPolicyBinding body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
@@ -223,7 +223,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -250,14 +250,14 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method create_validating_admission_policy_binding" % key
+ " 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 ('body' not in local_var_params or # noqa: E501
local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy_binding`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy_binding`") # noqa: E501
collection_formats = {}
@@ -289,14 +289,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings', 'POST',
+ '/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_type='V1beta1ValidatingAdmissionPolicyBinding', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicyBinding', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -304,13 +304,13 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def delete_collection_validating_admission_policy(self, **kwargs): # noqa: E501
- """delete_collection_validating_admission_policy # noqa: E501
+ def delete_collection_mutating_admission_policy(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy # noqa: E501
- delete collection of ValidatingAdmissionPolicy # 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_validating_admission_policy(async_req=True)
+ >>> thread = api.delete_collection_mutating_admission_policy(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
@@ -341,15 +341,15 @@ class AdmissionregistrationV1beta1Api(object):
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.delete_collection_validating_admission_policy_with_http_info(**kwargs) # noqa: E501
+ return self.delete_collection_mutating_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
+ def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy # noqa: E501
- delete collection of ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(async_req=True)
+ >>> thread = api.delete_collection_mutating_admission_policy_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
@@ -414,7 +414,7 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method delete_collection_validating_admission_policy" % key
+ " to method delete_collection_mutating_admission_policy" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
@@ -469,7 +469,7 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies', 'DELETE',
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies', 'DELETE',
path_params,
query_params,
header_params,
@@ -484,13 +484,13 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def delete_collection_validating_admission_policy_binding(self, **kwargs): # noqa: E501
- """delete_collection_validating_admission_policy_binding # noqa: E501
+ def delete_collection_mutating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """delete_collection_mutating_admission_policy_binding # noqa: E501
- delete collection of ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(async_req=True)
+ >>> thread = api.delete_collection_mutating_admission_policy_binding(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
@@ -521,15 +521,15 @@ class AdmissionregistrationV1beta1Api(object):
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.delete_collection_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501
+ return self.delete_collection_mutating_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
+ 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 ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(async_req=True)
+ >>> thread = api.delete_collection_mutating_admission_policy_binding_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
@@ -594,7 +594,7 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method delete_collection_validating_admission_policy_binding" % key
+ " to method delete_collection_mutating_admission_policy_binding" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
@@ -649,7 +649,7 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings', 'DELETE',
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings', 'DELETE',
path_params,
query_params,
header_params,
@@ -664,17 +664,17 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def delete_validating_admission_policy(self, name, **kwargs): # noqa: E501
- """delete_validating_admission_policy # noqa: E501
+ def delete_mutating_admission_policy(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy # noqa: E501
- delete a ValidatingAdmissionPolicy # 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_validating_admission_policy(name, async_req=True)
+ >>> thread = api.delete_mutating_admission_policy(name, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
+ :param str name: name of the MutatingAdmissionPolicy (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
@@ -694,19 +694,19 @@ class AdmissionregistrationV1beta1Api(object):
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.delete_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501
+ return self.delete_mutating_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
+ def delete_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy # noqa: E501
- delete a ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(name, async_req=True)
+ >>> thread = api.delete_mutating_admission_policy_with_http_info(name, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
+ :param str name: name of the MutatingAdmissionPolicy (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
@@ -753,14 +753,14 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method delete_validating_admission_policy" % key
+ " 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 ('name' not in local_var_params or # noqa: E501
local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy`") # noqa: E501
collection_formats = {}
@@ -798,7 +798,7 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}', 'DELETE',
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name}', 'DELETE',
path_params,
query_params,
header_params,
@@ -813,17 +813,17 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def delete_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501
- """delete_validating_admission_policy_binding # noqa: E501
+ def delete_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy_binding # noqa: E501
- delete a ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(name, async_req=True)
+ >>> thread = api.delete_mutating_admission_policy_binding(name, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str name: name of the MutatingAdmissionPolicyBinding (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
@@ -843,19 +843,19 @@ class AdmissionregistrationV1beta1Api(object):
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.delete_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501
+ return self.delete_mutating_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
+ def delete_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_mutating_admission_policy_binding # noqa: E501
- delete a ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> thread = api.delete_mutating_admission_policy_binding_with_http_info(name, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str name: name of the MutatingAdmissionPolicyBinding (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
@@ -902,14 +902,14 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method delete_validating_admission_policy_binding" % key
+ " 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 ('name' not in local_var_params or # noqa: E501
local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy_binding`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy_binding`") # noqa: E501
collection_formats = {}
@@ -947,7 +947,7 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}', 'DELETE',
+ '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'DELETE',
path_params,
query_params,
header_params,
@@ -1067,13 +1067,13 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def list_validating_admission_policy(self, **kwargs): # noqa: E501
- """list_validating_admission_policy # noqa: E501
+ def list_mutating_admission_policy(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy # noqa: E501
- list or watch objects of kind ValidatingAdmissionPolicy # 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_validating_admission_policy(async_req=True)
+ >>> thread = api.list_mutating_admission_policy(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
@@ -1095,20 +1095,20 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicyList
+ :return: V1beta1MutatingAdmissionPolicyList
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_validating_admission_policy_with_http_info(**kwargs) # noqa: E501
+ return self.list_mutating_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
+ def list_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy # noqa: E501
- list or watch objects of kind ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(async_req=True)
+ >>> thread = api.list_mutating_admission_policy_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
@@ -1132,7 +1132,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -1165,7 +1165,7 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method list_validating_admission_policy" % key
+ " to method list_mutating_admission_policy" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
@@ -1212,14 +1212,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies', 'GET',
+ '/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_type='V1beta1ValidatingAdmissionPolicyList', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicyList', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -1227,13 +1227,13 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def list_validating_admission_policy_binding(self, **kwargs): # noqa: E501
- """list_validating_admission_policy_binding # noqa: E501
+ def list_mutating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """list_mutating_admission_policy_binding # noqa: E501
- list or watch objects of kind ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(async_req=True)
+ >>> thread = api.list_mutating_admission_policy_binding(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
@@ -1255,20 +1255,20 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicyBindingList
+ :return: V1beta1MutatingAdmissionPolicyBindingList
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.list_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501
+ return self.list_mutating_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
+ 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 ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(async_req=True)
+ >>> thread = api.list_mutating_admission_policy_binding_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
@@ -1292,7 +1292,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -1325,7 +1325,7 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method list_validating_admission_policy_binding" % key
+ " to method list_mutating_admission_policy_binding" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
@@ -1372,14 +1372,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings', 'GET',
+ '/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_type='V1beta1ValidatingAdmissionPolicyBindingList', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicyBindingList', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -1387,17 +1387,17 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def patch_validating_admission_policy(self, name, body, **kwargs): # noqa: E501
- """patch_validating_admission_policy # noqa: E501
+ def patch_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy # noqa: E501
- partially update the specified ValidatingAdmissionPolicy # 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_validating_admission_policy(name, body, async_req=True)
+ >>> thread = api.patch_mutating_admission_policy(name, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
+ :param str name: name of the MutatingAdmissionPolicy (required)
:param object body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
@@ -1411,24 +1411,24 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicy
+ :return: V1beta1MutatingAdmissionPolicy
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.patch_validating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501
+ return self.patch_mutating_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
+ def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy # noqa: E501
- partially update the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(name, body, async_req=True)
+ >>> thread = api.patch_mutating_admission_policy_with_http_info(name, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
+ :param str name: name of the MutatingAdmissionPolicy (required)
:param object body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
@@ -1444,7 +1444,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -1473,18 +1473,18 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method patch_validating_admission_policy" % key
+ " 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 ('name' not in local_var_params or # noqa: E501
local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy`") # 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 ('body' not in local_var_params or # noqa: E501
local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy`") # noqa: E501
collection_formats = {}
@@ -1524,14 +1524,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}', 'PATCH',
+ '/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_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicy', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -1539,17 +1539,17 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def patch_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
- """patch_validating_admission_policy_binding # noqa: E501
+ def patch_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
+ """patch_mutating_admission_policy_binding # noqa: E501
- partially update the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(name, body, async_req=True)
+ >>> thread = api.patch_mutating_admission_policy_binding(name, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str name: name of the MutatingAdmissionPolicyBinding (required)
:param object body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
@@ -1563,24 +1563,24 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicyBinding
+ :return: V1beta1MutatingAdmissionPolicyBinding
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.patch_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501
+ return self.patch_mutating_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
+ 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 ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> thread = api.patch_mutating_admission_policy_binding_with_http_info(name, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str name: name of the MutatingAdmissionPolicyBinding (required)
:param object body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
@@ -1596,7 +1596,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -1625,18 +1625,18 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method patch_validating_admission_policy_binding" % key
+ " 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 ('name' not in local_var_params or # noqa: E501
local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_binding`") # 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 ('body' not in local_var_params or # noqa: E501
local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy_binding`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy_binding`") # noqa: E501
collection_formats = {}
@@ -1676,14 +1676,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}', 'PATCH',
+ '/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_type='V1beta1ValidatingAdmissionPolicyBinding', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicyBinding', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -1691,169 +1691,17 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def patch_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501
- """patch_validating_admission_policy_status # noqa: E501
+ def read_mutating_admission_policy(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy # noqa: E501
- partially update status of the specified ValidatingAdmissionPolicy # 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.patch_validating_admission_policy_status(name, body, async_req=True)
+ >>> thread = api.read_mutating_admission_policy(name, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicy
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation',
- 'force'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method patch_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_status`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `patch_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
- if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
- query_params.append(('force', local_var_params['force'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status', 'PATCH',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def read_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 async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
+ :param str name: name of the MutatingAdmissionPolicy (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -1862,24 +1710,24 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicy
+ :return: V1beta1MutatingAdmissionPolicy
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.read_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501
+ return self.read_mutating_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
+ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy # noqa: E501
- read the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_with_http_info(name, async_req=True)
+ >>> thread = api.read_mutating_admission_policy_with_http_info(name, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
+ :param str name: name of the MutatingAdmissionPolicy (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param _return_http_data_only: response data without head status code
and headers
@@ -1890,7 +1738,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -1914,14 +1762,14 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method read_validating_admission_policy" % key
+ " 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 ('name' not in local_var_params or # noqa: E501
local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy`") # noqa: E501
collection_formats = {}
@@ -1947,14 +1795,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}', 'GET',
+ '/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_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicy', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -1962,17 +1810,17 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def read_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501
- """read_validating_admission_policy_binding # noqa: E501
+ def read_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy_binding # noqa: E501
- read the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(name, async_req=True)
+ >>> thread = api.read_mutating_admission_policy_binding(name, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str name: name of the MutatingAdmissionPolicyBinding (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
@@ -1981,24 +1829,24 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicyBinding
+ :return: V1beta1MutatingAdmissionPolicyBinding
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.read_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501
+ return self.read_mutating_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
+ def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_mutating_admission_policy_binding # noqa: E501
- read the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> thread = api.read_mutating_admission_policy_binding_with_http_info(name, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str name: name of the MutatingAdmissionPolicyBinding (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param _return_http_data_only: response data without head status code
and headers
@@ -2009,7 +1857,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -2033,14 +1881,14 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method read_validating_admission_policy_binding" % key
+ " 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 ('name' not in local_var_params or # noqa: E501
local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy_binding`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy_binding`") # noqa: E501
collection_formats = {}
@@ -2066,276 +1914,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1beta1ValidatingAdmissionPolicyBinding', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def read_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 async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicy
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'pretty'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method read_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `read_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def replace_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 async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
- :param V1beta1ValidatingAdmissionPolicy body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicy
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
- :param V1beta1ValidatingAdmissionPolicy body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method replace_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `replace_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}', 'PUT',
+ '/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_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicyBinding', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -2343,18 +1929,18 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def replace_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
- """replace_validating_admission_policy_binding # noqa: E501
+ def replace_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy # noqa: E501
- replace the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding(name, body, async_req=True)
+ >>> thread = api.replace_mutating_admission_policy(name, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicyBinding (required)
- :param V1beta1ValidatingAdmissionPolicyBinding body: (required)
+ :param str name: name of the MutatingAdmissionPolicy (required)
+ :param V1beta1MutatingAdmissionPolicy body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
@@ -2366,25 +1952,25 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicyBinding
+ :return: V1beta1MutatingAdmissionPolicy
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.replace_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501
+ return self.replace_mutating_admission_policy_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
+ def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy # noqa: E501
- replace the specified ValidatingAdmissionPolicyBinding # 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_validating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> thread = api.replace_mutating_admission_policy_with_http_info(name, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicyBinding (required)
- :param V1beta1ValidatingAdmissionPolicyBinding body: (required)
+ :param str name: name of the MutatingAdmissionPolicy (required)
+ :param V1beta1MutatingAdmissionPolicy body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
@@ -2398,7 +1984,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -2426,18 +2012,18 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method replace_validating_admission_policy_binding" % key
+ " 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 ('name' not in local_var_params or # noqa: E501
local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_binding`") # 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 ('body' not in local_var_params or # noqa: E501
local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_binding`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy`") # noqa: E501
collection_formats = {}
@@ -2471,14 +2057,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}', 'PUT',
+ '/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_type='V1beta1ValidatingAdmissionPolicyBinding', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicy', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -2486,18 +2072,18 @@ class AdmissionregistrationV1beta1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- def replace_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501
- """replace_validating_admission_policy_status # noqa: E501
+ def replace_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy_binding # noqa: E501
- replace status of the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_status(name, body, async_req=True)
+ >>> thread = api.replace_mutating_admission_policy_binding(name, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
- :param V1beta1ValidatingAdmissionPolicy body: (required)
+ :param str name: name of the MutatingAdmissionPolicyBinding (required)
+ :param V1beta1MutatingAdmissionPolicyBinding body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
@@ -2509,25 +2095,25 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: V1beta1ValidatingAdmissionPolicy
+ :return: V1beta1MutatingAdmissionPolicyBinding
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
- return self.replace_validating_admission_policy_status_with_http_info(name, body, **kwargs) # noqa: E501
+ return self.replace_mutating_admission_policy_binding_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
+ def replace_mutating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_mutating_admission_policy_binding # noqa: E501
- replace status of the specified ValidatingAdmissionPolicy # 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_validating_admission_policy_status_with_http_info(name, body, async_req=True)
+ >>> thread = api.replace_mutating_admission_policy_binding_with_http_info(name, body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
- :param str name: name of the ValidatingAdmissionPolicy (required)
- :param V1beta1ValidatingAdmissionPolicy body: (required)
+ :param str name: name of the MutatingAdmissionPolicyBinding (required)
+ :param V1beta1MutatingAdmissionPolicyBinding body: (required)
:param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
:param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
:param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
@@ -2541,7 +2127,7 @@ class AdmissionregistrationV1beta1Api(object):
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
- :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict))
+ :return: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
@@ -2569,18 +2155,18 @@ class AdmissionregistrationV1beta1Api(object):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
- " to method replace_validating_admission_policy_status" % key
+ " 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 ('name' not in local_var_params or # noqa: E501
local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_status`") # 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 ('body' not in local_var_params or # noqa: E501
local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_status`") # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy_binding`") # noqa: E501
collection_formats = {}
@@ -2614,14 +2200,14 @@ class AdmissionregistrationV1beta1Api(object):
auth_settings = ['BearerToken'] # noqa: E501
return self.api_client.call_api(
- '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status', 'PUT',
+ '/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_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501
+ response_type='V1beta1MutatingAdmissionPolicyBinding', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/api/apiextensions_api.py b/contrib/python/kubernetes/kubernetes/client/api/apiextensions_api.py
index a7229730a62..a2de1de5afd 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/apiextensions_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/apiextensions_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/apiextensions_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/apiextensions_v1_api.py
index b21a961bdf2..f3c801159fe 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/apiextensions_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/apiextensions_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/apiregistration_api.py b/contrib/python/kubernetes/kubernetes/client/api/apiregistration_api.py
index 518cf225e26..cf5f7a2e233 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/apiregistration_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/apiregistration_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/apiregistration_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/apiregistration_v1_api.py
index 0d705471ca1..1ac27e99744 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/apiregistration_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/apiregistration_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/apis_api.py b/contrib/python/kubernetes/kubernetes/client/api/apis_api.py
index 359fe314481..24f6de17411 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/apis_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/apis_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/apps_api.py b/contrib/python/kubernetes/kubernetes/client/api/apps_api.py
index 118c8a1860d..1da5f3314dc 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/apps_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/apps_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/apps_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/apps_v1_api.py
index 0c39a4fa956..93e332b1335 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/apps_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/apps_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/authentication_api.py b/contrib/python/kubernetes/kubernetes/client/api/authentication_api.py
index bd7c8c761a0..27b118c98b7 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/authentication_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/authentication_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/authentication_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/authentication_v1_api.py
index b049a908879..34e9396f224 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/authentication_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/authentication_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/authorization_api.py b/contrib/python/kubernetes/kubernetes/client/api/authorization_api.py
index eee6338988c..e0fe3712ea3 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/authorization_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/authorization_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/authorization_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/authorization_v1_api.py
index 1a87ee91ef9..c240ce272f7 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/authorization_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/authorization_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/autoscaling_api.py b/contrib/python/kubernetes/kubernetes/client/api/autoscaling_api.py
index d329ad2d456..aedbf889a5e 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/autoscaling_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/autoscaling_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/autoscaling_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/autoscaling_v1_api.py
index 514903d486e..2a935fbab05 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/autoscaling_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/autoscaling_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/autoscaling_v2_api.py b/contrib/python/kubernetes/kubernetes/client/api/autoscaling_v2_api.py
index d336add93f4..ce95f1f2cac 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/autoscaling_v2_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/autoscaling_v2_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/batch_api.py b/contrib/python/kubernetes/kubernetes/client/api/batch_api.py
index 5f6f7c62ec4..8c9b1a1158c 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/batch_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/batch_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/batch_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/batch_v1_api.py
index 7fdc5319e3c..3881dc5d449 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/batch_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/batch_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/certificates_api.py b/contrib/python/kubernetes/kubernetes/client/api/certificates_api.py
index b72b98a1838..4e1bb128a5d 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/certificates_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/certificates_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/certificates_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/certificates_v1_api.py
index 842e053ea0d..3447d85dcec 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/certificates_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/certificates_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/certificates_v1alpha1_api.py b/contrib/python/kubernetes/kubernetes/client/api/certificates_v1alpha1_api.py
index 62ef4c69a33..168a2f7ee0a 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/certificates_v1alpha1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/certificates_v1alpha1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -170,6 +170,149 @@ class CertificatesV1alpha1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ 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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha1PodCertificateRequest body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1alpha1PodCertificateRequest
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha1PodCertificateRequest body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_namespaced_pod_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 ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1PodCertificateRequest', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def delete_cluster_trust_bundle(self, name, **kwargs): # noqa: E501
"""delete_cluster_trust_bundle # noqa: E501
@@ -499,6 +642,353 @@ class CertificatesV1alpha1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ 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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1Status
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_pod_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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'namespace',
+ 'pretty',
+ '_continue',
+ 'dry_run',
+ 'field_selector',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'label_selector',
+ 'limit',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_collection_namespaced_pod_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 ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1Status', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_namespaced_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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1Status
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty',
+ 'dry_run',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_namespaced_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1Status', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def get_api_resources(self, **kwargs): # noqa: E501
"""get_api_resources # noqa: E501
@@ -764,6 +1254,335 @@ class CertificatesV1alpha1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ 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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1alpha1PodCertificateRequestList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1alpha1PodCertificateRequestList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'namespace',
+ 'pretty',
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_namespaced_pod_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 ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1PodCertificateRequestList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_pod_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 async_req bool: execute request asynchronously
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1alpha1PodCertificateRequestList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1alpha1PodCertificateRequestList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'pretty',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_pod_certificate_request_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/podcertificaterequests', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1PodCertificateRequestList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def patch_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501
"""patch_cluster_trust_bundle # noqa: E501
@@ -916,6 +1735,328 @@ class CertificatesV1alpha1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1alpha1PodCertificateRequest
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method patch_namespaced_pod_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1PodCertificateRequest', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def patch_namespaced_pod_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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1alpha1PodCertificateRequest
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method patch_namespaced_pod_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1PodCertificateRequest', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def read_cluster_trust_bundle(self, name, **kwargs): # noqa: E501
"""read_cluster_trust_bundle # noqa: E501
@@ -1035,6 +2176,262 @@ class CertificatesV1alpha1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1alpha1PodCertificateRequest
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method read_namespaced_pod_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1PodCertificateRequest', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def read_namespaced_pod_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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1alpha1PodCertificateRequest
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method read_namespaced_pod_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1PodCertificateRequest', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def replace_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501
"""replace_cluster_trust_bundle # noqa: E501
@@ -1177,3 +2574,307 @@ class CertificatesV1alpha1Api(object):
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+
+ def replace_namespaced_pod_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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha1PodCertificateRequest body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1alpha1PodCertificateRequest
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha1PodCertificateRequest body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method replace_namespaced_pod_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_certificate_request`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1PodCertificateRequest', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def replace_namespaced_pod_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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha1PodCertificateRequest body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1alpha1PodCertificateRequest
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the PodCertificateRequest (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha1PodCertificateRequest body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method replace_namespaced_pod_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_certificate_request_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1PodCertificateRequest', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/contrib/python/kubernetes/kubernetes/client/api/certificates_v1beta1_api.py b/contrib/python/kubernetes/kubernetes/client/api/certificates_v1beta1_api.py
index 630983a5432..bb9382f570d 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/certificates_v1beta1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/certificates_v1beta1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/coordination_api.py b/contrib/python/kubernetes/kubernetes/client/api/coordination_api.py
index 7274ada5fae..6557f73daf7 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/coordination_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/coordination_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/coordination_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/coordination_v1_api.py
index 9a4de0340d9..91e4b3d20e9 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/coordination_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/coordination_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/coordination_v1alpha2_api.py b/contrib/python/kubernetes/kubernetes/client/api/coordination_v1alpha2_api.py
index 440cf780465..7572fa19578 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/coordination_v1alpha2_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/coordination_v1alpha2_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/coordination_v1beta1_api.py b/contrib/python/kubernetes/kubernetes/client/api/coordination_v1beta1_api.py
index 0ac7db875ad..4e3d42c8622 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/coordination_v1beta1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/coordination_v1beta1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/core_api.py b/contrib/python/kubernetes/kubernetes/client/api/core_api.py
index 3c9ded93be1..71ad82a1494 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/core_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/core_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/core_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/core_v1_api.py
index fa64203bca6..4ea0ed311bd 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/core_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/core_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/custom_objects_api.py b/contrib/python/kubernetes/kubernetes/client/api/custom_objects_api.py
index f5af0e758c5..9a9ef0012ea 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/custom_objects_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/custom_objects_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/discovery_api.py b/contrib/python/kubernetes/kubernetes/client/api/discovery_api.py
index 040dee2897c..80c0566b3e6 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/discovery_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/discovery_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/discovery_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/discovery_v1_api.py
index f775778bd01..9afa99000b5 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/discovery_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/discovery_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/events_api.py b/contrib/python/kubernetes/kubernetes/client/api/events_api.py
index 66f02f41b7b..2e66c5b36e4 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/events_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/events_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/events_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/events_v1_api.py
index 1ca196fe533..dcc4df783aa 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/events_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/events_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_api.py b/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_api.py
index 26664da0ec8..600a2ffee4f 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_v1_api.py
index 75eb2b10b5e..ce1ce648765 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_api.py b/contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_api.py
index 091b5e934ac..624feaaaa70 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_v1alpha1_api.py b/contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_v1alpha1_api.py
index 795da4f47af..fc8d167cd3c 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_v1alpha1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/internal_apiserver_v1alpha1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/logs_api.py b/contrib/python/kubernetes/kubernetes/client/api/logs_api.py
index ec1463e8e3c..ecad1a124c1 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/logs_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/logs_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/networking_api.py b/contrib/python/kubernetes/kubernetes/client/api/networking_api.py
index 3f3ebdaa2fb..0b5c5dd4938 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/networking_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/networking_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/networking_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/networking_v1_api.py
index 0a078d846c9..b975921397f 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/networking_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/networking_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/networking_v1beta1_api.py b/contrib/python/kubernetes/kubernetes/client/api/networking_v1beta1_api.py
index a5642a06189..46d22506000 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/networking_v1beta1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/networking_v1beta1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/node_api.py b/contrib/python/kubernetes/kubernetes/client/api/node_api.py
index 0fa1d9a9c99..6cbe7321910 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/node_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/node_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/node_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/node_v1_api.py
index 0fae5236452..85220fcdef5 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/node_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/node_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/openid_api.py b/contrib/python/kubernetes/kubernetes/client/api/openid_api.py
index 05400c78cba..8d17172a352 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/openid_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/openid_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/policy_api.py b/contrib/python/kubernetes/kubernetes/client/api/policy_api.py
index c69f7ae0dde..95ac1ec5213 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/policy_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/policy_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/policy_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/policy_v1_api.py
index f4d0ee70f29..d8f7fffdc91 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/policy_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/policy_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_api.py b/contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_api.py
index 7ad6bb9ee52..5f7105b090f 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_v1_api.py
index 10fc3a844e2..aa811e43b97 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/rbac_authorization_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/resource_api.py b/contrib/python/kubernetes/kubernetes/client/api/resource_api.py
index 6e2668e567a..9355aa8ccf4 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/resource_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/resource_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/resource_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/resource_v1_api.py
new file mode 100644
index 00000000000..abc10f8ca8e
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/api/resource_v1_api.py
@@ -0,0 +1,5177 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from kubernetes.client.api_client import ApiClient
+from kubernetes.client.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
+
+
+class 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 async_req bool: execute request asynchronously
+ :param V1DeviceClass body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1DeviceClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param V1DeviceClass body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_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 ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_device_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1DeviceClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def create_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param ResourceV1ResourceClaim body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: ResourceV1ResourceClaim
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param ResourceV1ResourceClaim body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_namespaced_resource_claim" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='ResourceV1ResourceClaim', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def create_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1ResourceClaimTemplate body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceClaimTemplate
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1ResourceClaimTemplate body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_namespaced_resource_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 ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceClaimTemplate', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def create_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 async_req bool: execute request asynchronously
+ :param V1ResourceSlice body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceSlice
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param V1ResourceSlice body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_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 ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_resource_slice`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_collection_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 async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1Status
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_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 async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'pretty',
+ '_continue',
+ 'dry_run',
+ 'field_selector',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'label_selector',
+ 'limit',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_collection_device_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1Status', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_collection_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1Status
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'namespace',
+ 'pretty',
+ '_continue',
+ 'dry_run',
+ 'field_selector',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'label_selector',
+ 'limit',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_collection_namespaced_resource_claim" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1Status', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_collection_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1Status
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'namespace',
+ 'pretty',
+ '_continue',
+ 'dry_run',
+ 'field_selector',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'label_selector',
+ 'limit',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_collection_namespaced_resource_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 ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1Status', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_collection_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 async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1Status
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_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 async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'pretty',
+ '_continue',
+ 'dry_run',
+ 'field_selector',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'label_selector',
+ 'limit',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_collection_resource_slice" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1Status', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_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 async_req bool: execute request asynchronously
+ :param str name: name of the DeviceClass (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1DeviceClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the DeviceClass (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty',
+ 'dry_run',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1DeviceClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: ResourceV1ResourceClaim
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty',
+ 'dry_run',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_namespaced_resource_claim" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='ResourceV1ResourceClaim', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimTemplate (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceClaimTemplate
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimTemplate (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty',
+ 'dry_run',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_namespaced_resource_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceClaimTemplate', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def delete_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceSlice (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceSlice
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceSlice (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty',
+ 'dry_run',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_api_resources(self, **kwargs): # noqa: E501
+ """get_api_resources # noqa: E501
+
+ get available resources # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_api_resources(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1APIResourceList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_resources_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_resources # noqa: E501
+
+ get available resources # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_api_resources_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_api_resources" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1APIResourceList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_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 async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1DeviceClassList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1DeviceClassList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'pretty',
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_device_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1DeviceClassList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceClaimList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceClaimList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'namespace',
+ 'pretty',
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_namespaced_resource_claim" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceClaimList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceClaimTemplateList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'namespace',
+ 'pretty',
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_namespaced_resource_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 ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceClaimTemplateList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_resource_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 async_req bool: execute request asynchronously
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceClaimList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceClaimList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'pretty',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_resource_claim_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceClaimList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_resource_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 async_req bool: execute request asynchronously
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceClaimTemplateList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'pretty',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_resource_claim_template_for_all_namespaces" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceClaimTemplateList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def list_resource_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 async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceSliceList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceSliceList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'pretty',
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_resource_slice" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceSliceList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def patch_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 async_req bool: execute request asynchronously
+ :param str name: name of the DeviceClass (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1DeviceClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the DeviceClass (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method patch_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_device_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1DeviceClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def patch_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: ResourceV1ResourceClaim
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method patch_namespaced_resource_claim" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='ResourceV1ResourceClaim', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def patch_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: ResourceV1ResourceClaim
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method patch_namespaced_resource_claim_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='ResourceV1ResourceClaim', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def patch_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimTemplate (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceClaimTemplate
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimTemplate (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method patch_namespaced_resource_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceClaimTemplate', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def patch_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceSlice (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceSlice
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceSlice (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method patch_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_resource_slice`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def read_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 async_req bool: execute request asynchronously
+ :param str name: name of the DeviceClass (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1DeviceClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the DeviceClass (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method read_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1DeviceClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def read_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: ResourceV1ResourceClaim
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method read_namespaced_resource_claim" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='ResourceV1ResourceClaim', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def read_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: ResourceV1ResourceClaim
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method read_namespaced_resource_claim_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='ResourceV1ResourceClaim', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def read_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimTemplate (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceClaimTemplate
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimTemplate (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method read_namespaced_resource_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceClaimTemplate', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def read_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceSlice (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceSlice
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceSlice (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method read_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def replace_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 async_req bool: execute request asynchronously
+ :param str name: name of the DeviceClass (required)
+ :param V1DeviceClass body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1DeviceClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the DeviceClass (required)
+ :param V1DeviceClass body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method replace_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_device_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1DeviceClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def replace_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param ResourceV1ResourceClaim body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: ResourceV1ResourceClaim
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param ResourceV1ResourceClaim body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method replace_namespaced_resource_claim" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='ResourceV1ResourceClaim', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def replace_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param ResourceV1ResourceClaim body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: ResourceV1ResourceClaim
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaim (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param ResourceV1ResourceClaim body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method replace_namespaced_resource_claim_status" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_status`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='ResourceV1ResourceClaim', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def replace_namespaced_resource_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimTemplate (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1ResourceClaimTemplate body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceClaimTemplate
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimTemplate (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1ResourceClaimTemplate body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'namespace',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method replace_namespaced_resource_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'namespace' is set
+ if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
+ local_var_params['namespace'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_template`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceClaimTemplate', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def replace_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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceSlice (required)
+ :param V1ResourceSlice body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1ResourceSlice
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ 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 async_req bool: execute request asynchronously
+ :param str name: name of the ResourceSlice (required)
+ :param V1ResourceSlice body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method replace_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_resource_slice`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/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_type='V1ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/contrib/python/kubernetes/kubernetes/client/api/resource_v1alpha3_api.py b/contrib/python/kubernetes/kubernetes/client/api/resource_v1alpha3_api.py
index fc488dd297d..8d30c666672 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/resource_v1alpha3_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/resource_v1alpha3_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -36,140 +36,6 @@ class ResourceV1alpha3Api(object):
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 async_req bool: execute request asynchronously
- :param V1alpha3DeviceClass body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3DeviceClass
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param V1alpha3DeviceClass body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3DeviceClass, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_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 ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `create_device_class`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/deviceclasses', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3DeviceClass', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
def create_device_taint_rule(self, body, **kwargs): # noqa: E501
"""create_device_taint_rule # noqa: E501
@@ -304,606 +170,6 @@ class ResourceV1alpha3Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- 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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaim body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaim
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaim body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaim, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'namespace',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_namespaced_resource_claim" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaim', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaimTemplate body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaimTemplate
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaimTemplate body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'namespace',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_namespaced_resource_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 ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim_template`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaimTemplate', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def create_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 async_req bool: execute request asynchronously
- :param V1alpha3ResourceSlice body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceSlice
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param V1alpha3ResourceSlice body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceSlice, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method create_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 ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `create_resource_slice`") # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/resourceslices', 'POST',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceSlice', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_collection_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 async_req bool: execute request asynchronously
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param V1DeleteOptions body:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1Status
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_collection_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 async_req bool: execute request asynchronously
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param V1DeleteOptions body:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'pretty',
- '_continue',
- 'dry_run',
- 'field_selector',
- 'grace_period_seconds',
- 'ignore_store_read_error_with_cluster_breaking_potential',
- 'label_selector',
- 'limit',
- 'orphan_dependents',
- 'propagation_policy',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'body'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_collection_device_class" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
- query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
- if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
- query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
- query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
- if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
- query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/deviceclasses', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1Status', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
def delete_collection_device_taint_rule(self, **kwargs): # noqa: E501
"""delete_collection_device_taint_rule # noqa: E501
@@ -1084,713 +350,6 @@ class ResourceV1alpha3Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- 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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param V1DeleteOptions body:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1Status
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_collection_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param V1DeleteOptions body:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'namespace',
- 'pretty',
- '_continue',
- 'dry_run',
- 'field_selector',
- 'grace_period_seconds',
- 'ignore_store_read_error_with_cluster_breaking_potential',
- 'label_selector',
- 'limit',
- 'orphan_dependents',
- 'propagation_policy',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'body'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_collection_namespaced_resource_claim" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
- query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
- if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
- query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
- query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
- if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
- query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1Status', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_collection_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param V1DeleteOptions body:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1Status
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_collection_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param V1DeleteOptions body:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'namespace',
- 'pretty',
- '_continue',
- 'dry_run',
- 'field_selector',
- 'grace_period_seconds',
- 'ignore_store_read_error_with_cluster_breaking_potential',
- 'label_selector',
- 'limit',
- 'orphan_dependents',
- 'propagation_policy',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'body'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_collection_namespaced_resource_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 ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
- query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
- if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
- query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
- query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
- if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
- query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1Status', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_collection_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 async_req bool: execute request asynchronously
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param V1DeleteOptions body:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1Status
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs['_return_http_data_only'] = True
- return self.delete_collection_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 async_req bool: execute request asynchronously
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param V1DeleteOptions body:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'pretty',
- '_continue',
- 'dry_run',
- 'field_selector',
- 'grace_period_seconds',
- 'ignore_store_read_error_with_cluster_breaking_potential',
- 'label_selector',
- 'limit',
- 'orphan_dependents',
- 'propagation_policy',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'body'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_collection_resource_slice" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
- query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
- if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
- query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
- query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
- if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
- query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/resourceslices', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1Status', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_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 async_req bool: execute request asynchronously
- :param str name: name of the DeviceClass (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param V1DeleteOptions body:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3DeviceClass
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the DeviceClass (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param V1DeleteOptions body:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3DeviceClass, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'pretty',
- 'dry_run',
- 'grace_period_seconds',
- 'ignore_store_read_error_with_cluster_breaking_potential',
- 'orphan_dependents',
- 'propagation_policy',
- 'body'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `delete_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
- query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
- if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
- query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
- if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
- query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
- if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
- query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3DeviceClass', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
def delete_device_taint_rule(self, name, **kwargs): # noqa: E501
"""delete_device_taint_rule # noqa: E501
@@ -1940,471 +499,6 @@ class ResourceV1alpha3Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param V1DeleteOptions body:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaim
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param V1DeleteOptions body:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaim, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'pretty',
- 'dry_run',
- 'grace_period_seconds',
- 'ignore_store_read_error_with_cluster_breaking_potential',
- 'orphan_dependents',
- 'propagation_policy',
- 'body'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_namespaced_resource_claim" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'name' is set
- if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
- query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
- if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
- query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
- if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
- query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
- if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
- query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaim', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaimTemplate (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param V1DeleteOptions body:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaimTemplate
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaimTemplate (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param V1DeleteOptions body:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'pretty',
- 'dry_run',
- 'grace_period_seconds',
- 'ignore_store_read_error_with_cluster_breaking_potential',
- 'orphan_dependents',
- 'propagation_policy',
- 'body'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_namespaced_resource_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim_template`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
- query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
- if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
- query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
- if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
- query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
- if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
- query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaimTemplate', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def delete_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceSlice (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param V1DeleteOptions body:
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceSlice
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceSlice (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
- :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
- :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
- :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
- :param V1DeleteOptions body:
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceSlice, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'pretty',
- 'dry_run',
- 'grace_period_seconds',
- 'ignore_store_read_error_with_cluster_breaking_potential',
- 'orphan_dependents',
- 'propagation_policy',
- 'body'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `delete_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
- query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
- if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
- query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
- if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
- query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
- if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
- query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/resourceslices/{name}', 'DELETE',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceSlice', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
def get_api_resources(self, **kwargs): # noqa: E501
"""get_api_resources # noqa: E501
@@ -2510,166 +604,6 @@ class ResourceV1alpha3Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- 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 async_req bool: execute request asynchronously
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3DeviceClassList
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3DeviceClassList, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'pretty',
- 'allow_watch_bookmarks',
- '_continue',
- 'field_selector',
- 'label_selector',
- 'limit',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'watch'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method list_device_class" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
- query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
- if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
- query_params.append(('watch', local_var_params['watch'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/deviceclasses', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3DeviceClassList', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
def list_device_taint_rule(self, **kwargs): # noqa: E501
"""list_device_taint_rule # noqa: E501
@@ -2830,976 +764,6 @@ class ResourceV1alpha3Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- 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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaimList
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaimList, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'namespace',
- 'pretty',
- 'allow_watch_bookmarks',
- '_continue',
- 'field_selector',
- 'label_selector',
- 'limit',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'watch'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method list_namespaced_resource_claim" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
- query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
- if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
- query_params.append(('watch', local_var_params['watch'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaimList', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def list_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaimTemplateList
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'namespace',
- 'pretty',
- 'allow_watch_bookmarks',
- '_continue',
- 'field_selector',
- 'label_selector',
- 'limit',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'watch'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method list_namespaced_resource_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 ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
- query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
- if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
- query_params.append(('watch', local_var_params['watch'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaimTemplateList', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def list_resource_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 async_req bool: execute request asynchronously
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaimList
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaimList, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'allow_watch_bookmarks',
- '_continue',
- 'field_selector',
- 'label_selector',
- 'limit',
- 'pretty',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'watch'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method list_resource_claim_for_all_namespaces" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
- query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
- if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
- query_params.append(('watch', local_var_params['watch'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/resourceclaims', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaimList', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def list_resource_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 async_req bool: execute request asynchronously
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaimTemplateList
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'allow_watch_bookmarks',
- '_continue',
- 'field_selector',
- 'label_selector',
- 'limit',
- 'pretty',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'watch'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method list_resource_claim_template_for_all_namespaces" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
- query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
- if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
- query_params.append(('watch', local_var_params['watch'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaimTemplateList', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def list_resource_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 async_req bool: execute request asynchronously
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceSliceList
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
- :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
- :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
- :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
- :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
- :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
- :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
- :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
- :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceSliceList, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'pretty',
- 'allow_watch_bookmarks',
- '_continue',
- 'field_selector',
- 'label_selector',
- 'limit',
- 'resource_version',
- 'resource_version_match',
- 'send_initial_events',
- 'timeout_seconds',
- 'watch'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method list_resource_slice" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
- query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
- if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
- query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
- if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
- query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
- if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
- query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
- if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
- query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
- if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
- query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
- if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
- query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
- if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
- query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
- if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
- query_params.append(('watch', local_var_params['watch'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/resourceslices', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceSliceList', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def patch_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 async_req bool: execute request asynchronously
- :param str name: name of the DeviceClass (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3DeviceClass
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the DeviceClass (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3DeviceClass, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation',
- 'force'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method patch_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `patch_device_class`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `patch_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
- if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
- query_params.append(('force', local_var_params['force'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}', 'PATCH',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3DeviceClass', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
def patch_device_taint_rule(self, name, body, **kwargs): # noqa: E501
"""patch_device_taint_rule # noqa: E501
@@ -3952,760 +916,6 @@ class ResourceV1alpha3Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaim
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaim, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation',
- 'force'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method patch_namespaced_resource_claim" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'name' is set
- if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
- if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
- query_params.append(('force', local_var_params['force'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}', 'PATCH',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaim', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def patch_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaim
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaim, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation',
- 'force'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method patch_namespaced_resource_claim_status" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'name' is set
- if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_status`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_status`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
- if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
- query_params.append(('force', local_var_params['force'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status', 'PATCH',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaim', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def patch_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaimTemplate (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaimTemplate
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaimTemplate (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation',
- 'force'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method patch_namespaced_resource_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_template`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_template`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
- if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
- query_params.append(('force', local_var_params['force'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PATCH',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaimTemplate', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def patch_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceSlice (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceSlice
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceSlice (required)
- :param object body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceSlice, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation',
- 'force'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method patch_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `patch_resource_slice`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `patch_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
- if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
- query_params.append(('force', local_var_params['force'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/resourceslices/{name}', 'PATCH',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceSlice', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def read_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 async_req bool: execute request asynchronously
- :param str name: name of the DeviceClass (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3DeviceClass
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the DeviceClass (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3DeviceClass, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'pretty'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method read_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `read_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3DeviceClass', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
def read_device_taint_rule(self, name, **kwargs): # noqa: E501
"""read_device_taint_rule # noqa: E501
@@ -4825,652 +1035,6 @@ class ResourceV1alpha3Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaim
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaim, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'pretty'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method read_namespaced_resource_claim" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'name' is set
- if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaim', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def read_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaim
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaim, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'pretty'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method read_namespaced_resource_claim_status" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'name' is set
- if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_status`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaim', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def read_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaimTemplate (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaimTemplate
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaimTemplate (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'pretty'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method read_namespaced_resource_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_template`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaimTemplate', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def read_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceSlice (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceSlice
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceSlice (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceSlice, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'pretty'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method read_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `read_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/resourceslices/{name}', 'GET',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceSlice', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def replace_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 async_req bool: execute request asynchronously
- :param str name: name of the DeviceClass (required)
- :param V1alpha3DeviceClass body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3DeviceClass
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the DeviceClass (required)
- :param V1alpha3DeviceClass body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3DeviceClass, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method replace_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `replace_device_class`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `replace_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3DeviceClass', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
def replace_device_taint_rule(self, name, body, **kwargs): # noqa: E501
"""replace_device_taint_rule # noqa: E501
@@ -5613,602 +1177,3 @@ class ResourceV1alpha3Api(object):
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
-
- def replace_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaim body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaim
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaim body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaim, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method replace_namespaced_resource_claim" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'name' is set
- if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaim', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def replace_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaim body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaim
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaim (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaim body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaim, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method replace_namespaced_resource_claim_status" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
- # verify the required parameter 'name' is set
- if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_status`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_status`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaim', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def replace_namespaced_resource_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaimTemplate (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaimTemplate body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceClaimTemplate
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceClaimTemplate (required)
- :param str namespace: object name and auth scope, such as for teams and projects (required)
- :param V1alpha3ResourceClaimTemplate body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'namespace',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method replace_namespaced_resource_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_template`") # noqa: E501
- # verify the required parameter 'namespace' is set
- if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501
- local_var_params['namespace'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_template`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceClaimTemplate', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
-
- def replace_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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceSlice (required)
- :param V1alpha3ResourceSlice body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: V1alpha3ResourceSlice
- If the method is called asynchronously,
- returns the request thread.
- """
- 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 async_req bool: execute request asynchronously
- :param str name: name of the ResourceSlice (required)
- :param V1alpha3ResourceSlice body: (required)
- :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
- :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
- :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
- :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
- :param _return_http_data_only: response data without head status code
- and headers
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: tuple(V1alpha3ResourceSlice, status_code(int), headers(HTTPHeaderDict))
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- 'name',
- 'body',
- 'pretty',
- 'dry_run',
- 'field_manager',
- 'field_validation'
- ]
- all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout'
- ]
- )
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method replace_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 ('name' not in local_var_params or # noqa: E501
- local_var_params['name'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `name` when calling `replace_resource_slice`") # noqa: E501
- # verify the required parameter 'body' is set
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
- local_var_params['body'] is None): # noqa: E501
- raise ApiValueError("Missing the required parameter `body` when calling `replace_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
- query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
- if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
- query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
- if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
- query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
- if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
- query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if 'body' in local_var_params:
- body_params = local_var_params['body']
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
-
- # Authentication setting
- auth_settings = ['BearerToken'] # noqa: E501
-
- return self.api_client.call_api(
- '/apis/resource.k8s.io/v1alpha3/resourceslices/{name}', 'PUT',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type='V1alpha3ResourceSlice', # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats)
diff --git a/contrib/python/kubernetes/kubernetes/client/api/resource_v1beta1_api.py b/contrib/python/kubernetes/kubernetes/client/api/resource_v1beta1_api.py
index 7fdc99aac98..85432de610c 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/resource_v1beta1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/resource_v1beta1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/resource_v1beta2_api.py b/contrib/python/kubernetes/kubernetes/client/api/resource_v1beta2_api.py
index e4dc3a3188b..ed48b287427 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/resource_v1beta2_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/resource_v1beta2_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/scheduling_api.py b/contrib/python/kubernetes/kubernetes/client/api/scheduling_api.py
index d24032c23f1..1faa1bf52c7 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/scheduling_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/scheduling_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/scheduling_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/scheduling_v1_api.py
index 6e38f1e21f3..2bba536580a 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/scheduling_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/scheduling_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/storage_api.py b/contrib/python/kubernetes/kubernetes/client/api/storage_api.py
index d40cee988bf..e11a398069f 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/storage_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/storage_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/storage_v1_api.py b/contrib/python/kubernetes/kubernetes/client/api/storage_v1_api.py
index 984e488d988..1583b1632f8 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/storage_v1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/storage_v1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -715,6 +715,140 @@ class StorageV1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def create_volume_attributes_class(self, body, **kwargs): # noqa: E501
+ """create_volume_attributes_class # noqa: E501
+
+ create a VolumeAttributesClass # 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_volume_attributes_class(body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param V1VolumeAttributesClass body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1VolumeAttributesClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_volume_attributes_class_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_volume_attributes_class # noqa: E501
+
+ create a VolumeAttributesClass # 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_volume_attributes_class_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param V1VolumeAttributesClass body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method create_volume_attributes_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 ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `create_volume_attributes_class`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storage.k8s.io/v1/volumeattributesclasses', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1VolumeAttributesClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def delete_collection_csi_driver(self, **kwargs): # noqa: E501
"""delete_collection_csi_driver # noqa: E501
@@ -1624,6 +1758,186 @@ class StorageV1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def delete_collection_volume_attributes_class(self, **kwargs): # noqa: E501
+ """delete_collection_volume_attributes_class # noqa: E501
+
+ delete collection of VolumeAttributesClass # noqa: 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_volume_attributes_class(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1Status
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_collection_volume_attributes_class_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_volume_attributes_class # noqa: E501
+
+ delete collection of VolumeAttributesClass # noqa: 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_volume_attributes_class_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'pretty',
+ '_continue',
+ 'dry_run',
+ 'field_selector',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'label_selector',
+ 'limit',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_collection_volume_attributes_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storage.k8s.io/v1/volumeattributesclasses', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1Status', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def delete_csi_driver(self, name, **kwargs): # noqa: E501
"""delete_csi_driver # noqa: E501
@@ -2378,6 +2692,155 @@ class StorageV1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def delete_volume_attributes_class(self, name, **kwargs): # noqa: E501
+ """delete_volume_attributes_class # noqa: E501
+
+ delete a VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_volume_attributes_class(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the VolumeAttributesClass (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1VolumeAttributesClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_volume_attributes_class_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_volume_attributes_class # noqa: E501
+
+ delete a VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_volume_attributes_class_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the VolumeAttributesClass (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
+ :param bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it
+ :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty',
+ 'dry_run',
+ 'grace_period_seconds',
+ 'ignore_store_read_error_with_cluster_breaking_potential',
+ 'orphan_dependents',
+ 'propagation_policy',
+ 'body'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method delete_volume_attributes_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `delete_volume_attributes_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501
+ query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501
+ if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] is not None: # noqa: E501
+ query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501
+ if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501
+ query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501
+ if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501
+ query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storage.k8s.io/v1/volumeattributesclasses/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1VolumeAttributesClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def get_api_resources(self, **kwargs): # noqa: E501
"""get_api_resources # noqa: E501
@@ -3452,6 +3915,166 @@ class StorageV1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def list_volume_attributes_class(self, **kwargs): # noqa: E501
+ """list_volume_attributes_class # noqa: E501
+
+ list or watch objects of kind VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_volume_attributes_class(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1VolumeAttributesClassList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_volume_attributes_class_with_http_info(**kwargs) # noqa: E501
+
+ def list_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501
+ """list_volume_attributes_class # noqa: E501
+
+ list or watch objects of kind VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_volume_attributes_class_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.
+ :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
+ :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.
+ :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.
+ :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
+ :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset
+ :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.
+ :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
+ :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1VolumeAttributesClassList, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'pretty',
+ 'allow_watch_bookmarks',
+ '_continue',
+ 'field_selector',
+ 'label_selector',
+ 'limit',
+ 'resource_version',
+ 'resource_version_match',
+ 'send_initial_events',
+ 'timeout_seconds',
+ 'watch'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method list_volume_attributes_class" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501
+ query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501
+ if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501
+ query_params.append(('continue', local_var_params['_continue'])) # noqa: E501
+ if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501
+ query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501
+ if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501
+ query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
+ if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501
+ query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501
+ if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501
+ query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501
+ if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501
+ query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501
+ if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501
+ query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501
+ if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501
+ query_params.append(('watch', local_var_params['watch'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storage.k8s.io/v1/volumeattributesclasses', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1VolumeAttributesClassList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def patch_csi_driver(self, name, body, **kwargs): # noqa: E501
"""patch_csi_driver # noqa: E501
@@ -4373,6 +4996,158 @@ class StorageV1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def patch_volume_attributes_class(self, name, body, **kwargs): # noqa: E501
+ """patch_volume_attributes_class # noqa: E501
+
+ partially update the specified VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_volume_attributes_class(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the VolumeAttributesClass (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1VolumeAttributesClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_volume_attributes_class_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_volume_attributes_class # noqa: E501
+
+ partially update the specified VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_volume_attributes_class_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the VolumeAttributesClass (required)
+ :param object body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation',
+ 'force'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method patch_volume_attributes_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `patch_volume_attributes_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `patch_volume_attributes_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+ if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501
+ query_params.append(('force', local_var_params['force'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storage.k8s.io/v1/volumeattributesclasses/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1VolumeAttributesClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def read_csi_driver(self, name, **kwargs): # noqa: E501
"""read_csi_driver # noqa: E501
@@ -5096,6 +5871,125 @@ class StorageV1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def read_volume_attributes_class(self, name, **kwargs): # noqa: E501
+ """read_volume_attributes_class # noqa: E501
+
+ read the specified VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.read_volume_attributes_class(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the VolumeAttributesClass (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1VolumeAttributesClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_volume_attributes_class_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_volume_attributes_class # noqa: E501
+
+ read the specified VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.read_volume_attributes_class_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the VolumeAttributesClass (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method read_volume_attributes_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `read_volume_attributes_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storage.k8s.io/v1/volumeattributesclasses/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1VolumeAttributesClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def replace_csi_driver(self, name, body, **kwargs): # noqa: E501
"""replace_csi_driver # noqa: E501
@@ -5962,3 +6856,146 @@ class StorageV1Api(object):
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+
+ def replace_volume_attributes_class(self, name, body, **kwargs): # noqa: E501
+ """replace_volume_attributes_class # noqa: E501
+
+ replace the specified VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_volume_attributes_class(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the VolumeAttributesClass (required)
+ :param V1VolumeAttributesClass body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: V1VolumeAttributesClass
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_volume_attributes_class_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_volume_attributes_class # noqa: E501
+
+ replace the specified VolumeAttributesClass # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_volume_attributes_class_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the VolumeAttributesClass (required)
+ :param V1VolumeAttributesClass body: (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
+ :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
+ :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'body',
+ 'pretty',
+ 'dry_run',
+ 'field_manager',
+ 'field_validation'
+ ]
+ all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout'
+ ]
+ )
+
+ for key, val in six.iteritems(local_var_params['kwargs']):
+ if key not in all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method replace_volume_attributes_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 ('name' not in local_var_params or # noqa: E501
+ local_var_params['name'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `name` when calling `replace_volume_attributes_class`") # noqa: E501
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
+ local_var_params['body'] is None): # noqa: E501
+ raise ApiValueError("Missing the required parameter `body` when calling `replace_volume_attributes_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storage.k8s.io/v1/volumeattributesclasses/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1VolumeAttributesClass', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/contrib/python/kubernetes/kubernetes/client/api/storage_v1alpha1_api.py b/contrib/python/kubernetes/kubernetes/client/api/storage_v1alpha1_api.py
index 1b8b6bf997b..4d4ecdd57f9 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/storage_v1alpha1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/storage_v1alpha1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/storage_v1beta1_api.py b/contrib/python/kubernetes/kubernetes/client/api/storage_v1beta1_api.py
index c52d22cc7ae..aff2c50d419 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/storage_v1beta1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/storage_v1beta1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/storagemigration_api.py b/contrib/python/kubernetes/kubernetes/client/api/storagemigration_api.py
index 52b944af0a8..b911ee86c40 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/storagemigration_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/storagemigration_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/storagemigration_v1alpha1_api.py b/contrib/python/kubernetes/kubernetes/client/api/storagemigration_v1alpha1_api.py
index 9d40acef98f..0103fd55dc6 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/storagemigration_v1alpha1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/storagemigration_v1alpha1_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/version_api.py b/contrib/python/kubernetes/kubernetes/client/api/version_api.py
index 47f385e62b7..d7221907695 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/version_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/version_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/well_known_api.py b/contrib/python/kubernetes/kubernetes/client/api/well_known_api.py
index 23acb791fa9..e6491bc46ab 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/well_known_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/well_known_api.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api_client.py b/contrib/python/kubernetes/kubernetes/client/api_client.py
index fff2e820a1a..814ee8be479 100644
--- a/contrib/python/kubernetes/kubernetes/client/api_client.py
+++ b/contrib/python/kubernetes/kubernetes/client/api_client.py
@@ -4,7 +4,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -78,7 +78,7 @@ class ApiClient(object):
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
- self.user_agent = 'OpenAPI-Generator/33.1.0/python'
+ self.user_agent = 'OpenAPI-Generator/34.1.0/python'
self.client_side_validation = configuration.client_side_validation
def __enter__(self):
diff --git a/contrib/python/kubernetes/kubernetes/client/configuration.py b/contrib/python/kubernetes/kubernetes/client/configuration.py
index 67ea667dc6c..19d165f3ee5 100644
--- a/contrib/python/kubernetes/kubernetes/client/configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -20,6 +20,7 @@ import urllib3
import six
from six.moves import http_client as httplib
+import os
class Configuration(object):
@@ -158,6 +159,15 @@ class Configuration(object):
"""
self.proxy = None
+# Load proxy from environment variables (if set)
+ if os.getenv("HTTPS_PROXY"): self.proxy = os.getenv("HTTPS_PROXY")
+ if os.getenv("https_proxy"): self.proxy = os.getenv("https_proxy")
+ if os.getenv("HTTP_PROXY"): self.proxy = os.getenv("HTTP_PROXY")
+ if os.getenv("http_proxy"): self.proxy = os.getenv("http_proxy")
+ self.no_proxy = None
+ # Load no_proxy from environment variables (if set)
+ if os.getenv("NO_PROXY"): self.no_proxy = os.getenv("NO_PROXY")
+ if os.getenv("no_proxy"): self.no_proxy = os.getenv("no_proxy")
"""Proxy URL
"""
self.no_proxy = None
@@ -353,8 +363,8 @@ class Configuration(object):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
- "Version of the API: release-1.33\n"\
- "SDK Package Version: 33.1.0".\
+ "Version of the API: release-1.34\n"\
+ "SDK Package Version: 34.1.0".\
format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self):
diff --git a/contrib/python/kubernetes/kubernetes/client/exceptions.py b/contrib/python/kubernetes/kubernetes/client/exceptions.py
index 092ba0c6aa9..51856fac2cf 100644
--- a/contrib/python/kubernetes/kubernetes/client/exceptions.py
+++ b/contrib/python/kubernetes/kubernetes/client/exceptions.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/__init__.py b/contrib/python/kubernetes/kubernetes/client/models/__init__.py
index 880798fbaaa..d51e63e6c48 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/__init__.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/__init__.py
@@ -6,7 +6,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -24,12 +24,14 @@ from kubernetes.client.models.core_v1_endpoint_port import CoreV1EndpointPort
from kubernetes.client.models.core_v1_event import CoreV1Event
from kubernetes.client.models.core_v1_event_list import CoreV1EventList
from kubernetes.client.models.core_v1_event_series import CoreV1EventSeries
+from kubernetes.client.models.core_v1_resource_claim import CoreV1ResourceClaim
from kubernetes.client.models.discovery_v1_endpoint_port import DiscoveryV1EndpointPort
from kubernetes.client.models.events_v1_event import EventsV1Event
from kubernetes.client.models.events_v1_event_list import EventsV1EventList
from kubernetes.client.models.events_v1_event_series import EventsV1EventSeries
from kubernetes.client.models.flowcontrol_v1_subject import FlowcontrolV1Subject
from kubernetes.client.models.rbac_v1_subject import RbacV1Subject
+from kubernetes.client.models.resource_v1_resource_claim import ResourceV1ResourceClaim
from kubernetes.client.models.storage_v1_token_request import StorageV1TokenRequest
from kubernetes.client.models.v1_api_group import V1APIGroup
from kubernetes.client.models.v1_api_group_list import V1APIGroupList
@@ -44,6 +46,8 @@ from kubernetes.client.models.v1_api_versions import V1APIVersions
from kubernetes.client.models.v1_aws_elastic_block_store_volume_source import V1AWSElasticBlockStoreVolumeSource
from kubernetes.client.models.v1_affinity import V1Affinity
from kubernetes.client.models.v1_aggregation_rule import V1AggregationRule
+from kubernetes.client.models.v1_allocated_device_status import V1AllocatedDeviceStatus
+from kubernetes.client.models.v1_allocation_result import V1AllocationResult
from kubernetes.client.models.v1_app_armor_profile import V1AppArmorProfile
from kubernetes.client.models.v1_attached_volume import V1AttachedVolume
from kubernetes.client.models.v1_audit_annotation import V1AuditAnnotation
@@ -52,6 +56,7 @@ from kubernetes.client.models.v1_azure_file_persistent_volume_source import V1Az
from kubernetes.client.models.v1_azure_file_volume_source import V1AzureFileVolumeSource
from kubernetes.client.models.v1_binding import V1Binding
from kubernetes.client.models.v1_bound_object_reference import V1BoundObjectReference
+from kubernetes.client.models.v1_cel_device_selector import V1CELDeviceSelector
from kubernetes.client.models.v1_csi_driver import V1CSIDriver
from kubernetes.client.models.v1_csi_driver_list import V1CSIDriverList
from kubernetes.client.models.v1_csi_driver_spec import V1CSIDriverSpec
@@ -64,6 +69,9 @@ from kubernetes.client.models.v1_csi_storage_capacity import V1CSIStorageCapacit
from kubernetes.client.models.v1_csi_storage_capacity_list import V1CSIStorageCapacityList
from kubernetes.client.models.v1_csi_volume_source import V1CSIVolumeSource
from kubernetes.client.models.v1_capabilities import V1Capabilities
+from kubernetes.client.models.v1_capacity_request_policy import V1CapacityRequestPolicy
+from kubernetes.client.models.v1_capacity_request_policy_range import V1CapacityRequestPolicyRange
+from kubernetes.client.models.v1_capacity_requirements import V1CapacityRequirements
from kubernetes.client.models.v1_ceph_fs_persistent_volume_source import V1CephFSPersistentVolumeSource
from kubernetes.client.models.v1_ceph_fs_volume_source import V1CephFSVolumeSource
from kubernetes.client.models.v1_certificate_signing_request import V1CertificateSigningRequest
@@ -91,9 +99,12 @@ from kubernetes.client.models.v1_config_map_node_config_source import V1ConfigMa
from kubernetes.client.models.v1_config_map_projection import V1ConfigMapProjection
from kubernetes.client.models.v1_config_map_volume_source import V1ConfigMapVolumeSource
from kubernetes.client.models.v1_container import V1Container
+from kubernetes.client.models.v1_container_extended_resource_request import V1ContainerExtendedResourceRequest
from kubernetes.client.models.v1_container_image import V1ContainerImage
from kubernetes.client.models.v1_container_port import V1ContainerPort
from kubernetes.client.models.v1_container_resize_policy import V1ContainerResizePolicy
+from kubernetes.client.models.v1_container_restart_rule import V1ContainerRestartRule
+from kubernetes.client.models.v1_container_restart_rule_on_exit_codes import V1ContainerRestartRuleOnExitCodes
from kubernetes.client.models.v1_container_state import V1ContainerState
from kubernetes.client.models.v1_container_state_running import V1ContainerStateRunning
from kubernetes.client.models.v1_container_state_terminated import V1ContainerStateTerminated
@@ -102,6 +113,8 @@ from kubernetes.client.models.v1_container_status import V1ContainerStatus
from kubernetes.client.models.v1_container_user import V1ContainerUser
from kubernetes.client.models.v1_controller_revision import V1ControllerRevision
from kubernetes.client.models.v1_controller_revision_list import V1ControllerRevisionList
+from kubernetes.client.models.v1_counter import V1Counter
+from kubernetes.client.models.v1_counter_set import V1CounterSet
from kubernetes.client.models.v1_cron_job import V1CronJob
from kubernetes.client.models.v1_cron_job_list import V1CronJobList
from kubernetes.client.models.v1_cron_job_spec import V1CronJobSpec
@@ -133,6 +146,25 @@ from kubernetes.client.models.v1_deployment_list import V1DeploymentList
from kubernetes.client.models.v1_deployment_spec import V1DeploymentSpec
from kubernetes.client.models.v1_deployment_status import V1DeploymentStatus
from kubernetes.client.models.v1_deployment_strategy import V1DeploymentStrategy
+from kubernetes.client.models.v1_device import V1Device
+from kubernetes.client.models.v1_device_allocation_configuration import V1DeviceAllocationConfiguration
+from kubernetes.client.models.v1_device_allocation_result import V1DeviceAllocationResult
+from kubernetes.client.models.v1_device_attribute import V1DeviceAttribute
+from kubernetes.client.models.v1_device_capacity import V1DeviceCapacity
+from kubernetes.client.models.v1_device_claim import V1DeviceClaim
+from kubernetes.client.models.v1_device_claim_configuration import V1DeviceClaimConfiguration
+from kubernetes.client.models.v1_device_class import V1DeviceClass
+from kubernetes.client.models.v1_device_class_configuration import V1DeviceClassConfiguration
+from kubernetes.client.models.v1_device_class_list import V1DeviceClassList
+from kubernetes.client.models.v1_device_class_spec import V1DeviceClassSpec
+from kubernetes.client.models.v1_device_constraint import V1DeviceConstraint
+from kubernetes.client.models.v1_device_counter_consumption import V1DeviceCounterConsumption
+from kubernetes.client.models.v1_device_request import V1DeviceRequest
+from kubernetes.client.models.v1_device_request_allocation_result import V1DeviceRequestAllocationResult
+from kubernetes.client.models.v1_device_selector import V1DeviceSelector
+from kubernetes.client.models.v1_device_sub_request import V1DeviceSubRequest
+from kubernetes.client.models.v1_device_taint import V1DeviceTaint
+from kubernetes.client.models.v1_device_toleration import V1DeviceToleration
from kubernetes.client.models.v1_downward_api_projection import V1DownwardAPIProjection
from kubernetes.client.models.v1_downward_api_volume_file import V1DownwardAPIVolumeFile
from kubernetes.client.models.v1_downward_api_volume_source import V1DownwardAPIVolumeSource
@@ -153,6 +185,7 @@ from kubernetes.client.models.v1_ephemeral_container import V1EphemeralContainer
from kubernetes.client.models.v1_ephemeral_volume_source import V1EphemeralVolumeSource
from kubernetes.client.models.v1_event_source import V1EventSource
from kubernetes.client.models.v1_eviction import V1Eviction
+from kubernetes.client.models.v1_exact_device_request import V1ExactDeviceRequest
from kubernetes.client.models.v1_exec_action import V1ExecAction
from kubernetes.client.models.v1_exempt_priority_level_configuration import V1ExemptPriorityLevelConfiguration
from kubernetes.client.models.v1_expression_warning import V1ExpressionWarning
@@ -160,6 +193,7 @@ from kubernetes.client.models.v1_external_documentation import V1ExternalDocumen
from kubernetes.client.models.v1_fc_volume_source import V1FCVolumeSource
from kubernetes.client.models.v1_field_selector_attributes import V1FieldSelectorAttributes
from kubernetes.client.models.v1_field_selector_requirement import V1FieldSelectorRequirement
+from kubernetes.client.models.v1_file_key_selector import V1FileKeySelector
from kubernetes.client.models.v1_flex_persistent_volume_source import V1FlexPersistentVolumeSource
from kubernetes.client.models.v1_flex_volume_source import V1FlexVolumeSource
from kubernetes.client.models.v1_flocker_volume_source import V1FlockerVolumeSource
@@ -254,6 +288,7 @@ from kubernetes.client.models.v1_namespace_condition import V1NamespaceCondition
from kubernetes.client.models.v1_namespace_list import V1NamespaceList
from kubernetes.client.models.v1_namespace_spec import V1NamespaceSpec
from kubernetes.client.models.v1_namespace_status import V1NamespaceStatus
+from kubernetes.client.models.v1_network_device_data import V1NetworkDeviceData
from kubernetes.client.models.v1_network_policy import V1NetworkPolicy
from kubernetes.client.models.v1_network_policy_egress_rule import V1NetworkPolicyEgressRule
from kubernetes.client.models.v1_network_policy_ingress_rule import V1NetworkPolicyIngressRule
@@ -285,6 +320,7 @@ from kubernetes.client.models.v1_non_resource_rule import V1NonResourceRule
from kubernetes.client.models.v1_object_field_selector import V1ObjectFieldSelector
from kubernetes.client.models.v1_object_meta import V1ObjectMeta
from kubernetes.client.models.v1_object_reference import V1ObjectReference
+from kubernetes.client.models.v1_opaque_device_configuration import V1OpaqueDeviceConfiguration
from kubernetes.client.models.v1_overhead import V1Overhead
from kubernetes.client.models.v1_owner_reference import V1OwnerReference
from kubernetes.client.models.v1_param_kind import V1ParamKind
@@ -306,6 +342,7 @@ from kubernetes.client.models.v1_pod import V1Pod
from kubernetes.client.models.v1_pod_affinity import V1PodAffinity
from kubernetes.client.models.v1_pod_affinity_term import V1PodAffinityTerm
from kubernetes.client.models.v1_pod_anti_affinity import V1PodAntiAffinity
+from kubernetes.client.models.v1_pod_certificate_projection import V1PodCertificateProjection
from kubernetes.client.models.v1_pod_condition import V1PodCondition
from kubernetes.client.models.v1_pod_dns_config import V1PodDNSConfig
from kubernetes.client.models.v1_pod_dns_config_option import V1PodDNSConfigOption
@@ -313,6 +350,7 @@ from kubernetes.client.models.v1_pod_disruption_budget import V1PodDisruptionBud
from kubernetes.client.models.v1_pod_disruption_budget_list import V1PodDisruptionBudgetList
from kubernetes.client.models.v1_pod_disruption_budget_spec import V1PodDisruptionBudgetSpec
from kubernetes.client.models.v1_pod_disruption_budget_status import V1PodDisruptionBudgetStatus
+from kubernetes.client.models.v1_pod_extended_resource_claim_status import V1PodExtendedResourceClaimStatus
from kubernetes.client.models.v1_pod_failure_policy import V1PodFailurePolicy
from kubernetes.client.models.v1_pod_failure_policy_on_exit_codes_requirement import V1PodFailurePolicyOnExitCodesRequirement
from kubernetes.client.models.v1_pod_failure_policy_on_pod_conditions_pattern import V1PodFailurePolicyOnPodConditionsPattern
@@ -361,16 +399,26 @@ from kubernetes.client.models.v1_replication_controller_list import V1Replicatio
from kubernetes.client.models.v1_replication_controller_spec import V1ReplicationControllerSpec
from kubernetes.client.models.v1_replication_controller_status import V1ReplicationControllerStatus
from kubernetes.client.models.v1_resource_attributes import V1ResourceAttributes
-from kubernetes.client.models.v1_resource_claim import V1ResourceClaim
+from kubernetes.client.models.v1_resource_claim_consumer_reference import V1ResourceClaimConsumerReference
+from kubernetes.client.models.v1_resource_claim_list import V1ResourceClaimList
+from kubernetes.client.models.v1_resource_claim_spec import V1ResourceClaimSpec
+from kubernetes.client.models.v1_resource_claim_status import V1ResourceClaimStatus
+from kubernetes.client.models.v1_resource_claim_template import V1ResourceClaimTemplate
+from kubernetes.client.models.v1_resource_claim_template_list import V1ResourceClaimTemplateList
+from kubernetes.client.models.v1_resource_claim_template_spec import V1ResourceClaimTemplateSpec
from kubernetes.client.models.v1_resource_field_selector import V1ResourceFieldSelector
from kubernetes.client.models.v1_resource_health import V1ResourceHealth
from kubernetes.client.models.v1_resource_policy_rule import V1ResourcePolicyRule
+from kubernetes.client.models.v1_resource_pool import V1ResourcePool
from kubernetes.client.models.v1_resource_quota import V1ResourceQuota
from kubernetes.client.models.v1_resource_quota_list import V1ResourceQuotaList
from kubernetes.client.models.v1_resource_quota_spec import V1ResourceQuotaSpec
from kubernetes.client.models.v1_resource_quota_status import V1ResourceQuotaStatus
from kubernetes.client.models.v1_resource_requirements import V1ResourceRequirements
from kubernetes.client.models.v1_resource_rule import V1ResourceRule
+from kubernetes.client.models.v1_resource_slice import V1ResourceSlice
+from kubernetes.client.models.v1_resource_slice_list import V1ResourceSliceList
+from kubernetes.client.models.v1_resource_slice_spec import V1ResourceSliceSpec
from kubernetes.client.models.v1_resource_status import V1ResourceStatus
from kubernetes.client.models.v1_role import V1Role
from kubernetes.client.models.v1_role_binding import V1RoleBinding
@@ -483,6 +531,8 @@ from kubernetes.client.models.v1_volume_attachment_list import V1VolumeAttachmen
from kubernetes.client.models.v1_volume_attachment_source import V1VolumeAttachmentSource
from kubernetes.client.models.v1_volume_attachment_spec import V1VolumeAttachmentSpec
from kubernetes.client.models.v1_volume_attachment_status import V1VolumeAttachmentStatus
+from kubernetes.client.models.v1_volume_attributes_class import V1VolumeAttributesClass
+from kubernetes.client.models.v1_volume_attributes_class_list import V1VolumeAttributesClassList
from kubernetes.client.models.v1_volume_device import V1VolumeDevice
from kubernetes.client.models.v1_volume_error import V1VolumeError
from kubernetes.client.models.v1_volume_mount import V1VolumeMount
@@ -515,6 +565,10 @@ from kubernetes.client.models.v1alpha1_mutation import V1alpha1Mutation
from kubernetes.client.models.v1alpha1_named_rule_with_operations import V1alpha1NamedRuleWithOperations
from kubernetes.client.models.v1alpha1_param_kind import V1alpha1ParamKind
from kubernetes.client.models.v1alpha1_param_ref import V1alpha1ParamRef
+from kubernetes.client.models.v1alpha1_pod_certificate_request import V1alpha1PodCertificateRequest
+from kubernetes.client.models.v1alpha1_pod_certificate_request_list import V1alpha1PodCertificateRequestList
+from kubernetes.client.models.v1alpha1_pod_certificate_request_spec import V1alpha1PodCertificateRequestSpec
+from kubernetes.client.models.v1alpha1_pod_certificate_request_status import V1alpha1PodCertificateRequestStatus
from kubernetes.client.models.v1alpha1_server_storage_version import V1alpha1ServerStorageVersion
from kubernetes.client.models.v1alpha1_storage_version import V1alpha1StorageVersion
from kubernetes.client.models.v1alpha1_storage_version_condition import V1alpha1StorageVersionCondition
@@ -530,53 +584,21 @@ from kubernetes.client.models.v1alpha1_volume_attributes_class_list import V1alp
from kubernetes.client.models.v1alpha2_lease_candidate import V1alpha2LeaseCandidate
from kubernetes.client.models.v1alpha2_lease_candidate_list import V1alpha2LeaseCandidateList
from kubernetes.client.models.v1alpha2_lease_candidate_spec import V1alpha2LeaseCandidateSpec
-from kubernetes.client.models.v1alpha3_allocated_device_status import V1alpha3AllocatedDeviceStatus
-from kubernetes.client.models.v1alpha3_allocation_result import V1alpha3AllocationResult
-from kubernetes.client.models.v1alpha3_basic_device import V1alpha3BasicDevice
from kubernetes.client.models.v1alpha3_cel_device_selector import V1alpha3CELDeviceSelector
-from kubernetes.client.models.v1alpha3_counter import V1alpha3Counter
-from kubernetes.client.models.v1alpha3_counter_set import V1alpha3CounterSet
-from kubernetes.client.models.v1alpha3_device import V1alpha3Device
-from kubernetes.client.models.v1alpha3_device_allocation_configuration import V1alpha3DeviceAllocationConfiguration
-from kubernetes.client.models.v1alpha3_device_allocation_result import V1alpha3DeviceAllocationResult
-from kubernetes.client.models.v1alpha3_device_attribute import V1alpha3DeviceAttribute
-from kubernetes.client.models.v1alpha3_device_claim import V1alpha3DeviceClaim
-from kubernetes.client.models.v1alpha3_device_claim_configuration import V1alpha3DeviceClaimConfiguration
-from kubernetes.client.models.v1alpha3_device_class import V1alpha3DeviceClass
-from kubernetes.client.models.v1alpha3_device_class_configuration import V1alpha3DeviceClassConfiguration
-from kubernetes.client.models.v1alpha3_device_class_list import V1alpha3DeviceClassList
-from kubernetes.client.models.v1alpha3_device_class_spec import V1alpha3DeviceClassSpec
-from kubernetes.client.models.v1alpha3_device_constraint import V1alpha3DeviceConstraint
-from kubernetes.client.models.v1alpha3_device_counter_consumption import V1alpha3DeviceCounterConsumption
-from kubernetes.client.models.v1alpha3_device_request import V1alpha3DeviceRequest
-from kubernetes.client.models.v1alpha3_device_request_allocation_result import V1alpha3DeviceRequestAllocationResult
from kubernetes.client.models.v1alpha3_device_selector import V1alpha3DeviceSelector
-from kubernetes.client.models.v1alpha3_device_sub_request import V1alpha3DeviceSubRequest
from kubernetes.client.models.v1alpha3_device_taint import V1alpha3DeviceTaint
from kubernetes.client.models.v1alpha3_device_taint_rule import V1alpha3DeviceTaintRule
from kubernetes.client.models.v1alpha3_device_taint_rule_list import V1alpha3DeviceTaintRuleList
from kubernetes.client.models.v1alpha3_device_taint_rule_spec import V1alpha3DeviceTaintRuleSpec
from kubernetes.client.models.v1alpha3_device_taint_selector import V1alpha3DeviceTaintSelector
-from kubernetes.client.models.v1alpha3_device_toleration import V1alpha3DeviceToleration
-from kubernetes.client.models.v1alpha3_network_device_data import V1alpha3NetworkDeviceData
-from kubernetes.client.models.v1alpha3_opaque_device_configuration import V1alpha3OpaqueDeviceConfiguration
-from kubernetes.client.models.v1alpha3_resource_claim import V1alpha3ResourceClaim
-from kubernetes.client.models.v1alpha3_resource_claim_consumer_reference import V1alpha3ResourceClaimConsumerReference
-from kubernetes.client.models.v1alpha3_resource_claim_list import V1alpha3ResourceClaimList
-from kubernetes.client.models.v1alpha3_resource_claim_spec import V1alpha3ResourceClaimSpec
-from kubernetes.client.models.v1alpha3_resource_claim_status import V1alpha3ResourceClaimStatus
-from kubernetes.client.models.v1alpha3_resource_claim_template import V1alpha3ResourceClaimTemplate
-from kubernetes.client.models.v1alpha3_resource_claim_template_list import V1alpha3ResourceClaimTemplateList
-from kubernetes.client.models.v1alpha3_resource_claim_template_spec import V1alpha3ResourceClaimTemplateSpec
-from kubernetes.client.models.v1alpha3_resource_pool import V1alpha3ResourcePool
-from kubernetes.client.models.v1alpha3_resource_slice import V1alpha3ResourceSlice
-from kubernetes.client.models.v1alpha3_resource_slice_list import V1alpha3ResourceSliceList
-from kubernetes.client.models.v1alpha3_resource_slice_spec import V1alpha3ResourceSliceSpec
from kubernetes.client.models.v1beta1_allocated_device_status import V1beta1AllocatedDeviceStatus
from kubernetes.client.models.v1beta1_allocation_result import V1beta1AllocationResult
-from kubernetes.client.models.v1beta1_audit_annotation import V1beta1AuditAnnotation
+from kubernetes.client.models.v1beta1_apply_configuration import V1beta1ApplyConfiguration
from kubernetes.client.models.v1beta1_basic_device import V1beta1BasicDevice
from kubernetes.client.models.v1beta1_cel_device_selector import V1beta1CELDeviceSelector
+from kubernetes.client.models.v1beta1_capacity_request_policy import V1beta1CapacityRequestPolicy
+from kubernetes.client.models.v1beta1_capacity_request_policy_range import V1beta1CapacityRequestPolicyRange
+from kubernetes.client.models.v1beta1_capacity_requirements import V1beta1CapacityRequirements
from kubernetes.client.models.v1beta1_cluster_trust_bundle import V1beta1ClusterTrustBundle
from kubernetes.client.models.v1beta1_cluster_trust_bundle_list import V1beta1ClusterTrustBundleList
from kubernetes.client.models.v1beta1_cluster_trust_bundle_spec import V1beta1ClusterTrustBundleSpec
@@ -601,15 +623,22 @@ from kubernetes.client.models.v1beta1_device_selector import V1beta1DeviceSelect
from kubernetes.client.models.v1beta1_device_sub_request import V1beta1DeviceSubRequest
from kubernetes.client.models.v1beta1_device_taint import V1beta1DeviceTaint
from kubernetes.client.models.v1beta1_device_toleration import V1beta1DeviceToleration
-from kubernetes.client.models.v1beta1_expression_warning import V1beta1ExpressionWarning
from kubernetes.client.models.v1beta1_ip_address import V1beta1IPAddress
from kubernetes.client.models.v1beta1_ip_address_list import V1beta1IPAddressList
from kubernetes.client.models.v1beta1_ip_address_spec import V1beta1IPAddressSpec
+from kubernetes.client.models.v1beta1_json_patch import V1beta1JSONPatch
from kubernetes.client.models.v1beta1_lease_candidate import V1beta1LeaseCandidate
from kubernetes.client.models.v1beta1_lease_candidate_list import V1beta1LeaseCandidateList
from kubernetes.client.models.v1beta1_lease_candidate_spec import V1beta1LeaseCandidateSpec
from kubernetes.client.models.v1beta1_match_condition import V1beta1MatchCondition
from kubernetes.client.models.v1beta1_match_resources import V1beta1MatchResources
+from kubernetes.client.models.v1beta1_mutating_admission_policy import V1beta1MutatingAdmissionPolicy
+from kubernetes.client.models.v1beta1_mutating_admission_policy_binding import V1beta1MutatingAdmissionPolicyBinding
+from kubernetes.client.models.v1beta1_mutating_admission_policy_binding_list import V1beta1MutatingAdmissionPolicyBindingList
+from kubernetes.client.models.v1beta1_mutating_admission_policy_binding_spec import V1beta1MutatingAdmissionPolicyBindingSpec
+from kubernetes.client.models.v1beta1_mutating_admission_policy_list import V1beta1MutatingAdmissionPolicyList
+from kubernetes.client.models.v1beta1_mutating_admission_policy_spec import V1beta1MutatingAdmissionPolicySpec
+from kubernetes.client.models.v1beta1_mutation import V1beta1Mutation
from kubernetes.client.models.v1beta1_named_rule_with_operations import V1beta1NamedRuleWithOperations
from kubernetes.client.models.v1beta1_network_device_data import V1beta1NetworkDeviceData
from kubernetes.client.models.v1beta1_opaque_device_configuration import V1beta1OpaqueDeviceConfiguration
@@ -632,21 +661,15 @@ from kubernetes.client.models.v1beta1_service_cidr import V1beta1ServiceCIDR
from kubernetes.client.models.v1beta1_service_cidr_list import V1beta1ServiceCIDRList
from kubernetes.client.models.v1beta1_service_cidr_spec import V1beta1ServiceCIDRSpec
from kubernetes.client.models.v1beta1_service_cidr_status import V1beta1ServiceCIDRStatus
-from kubernetes.client.models.v1beta1_type_checking import V1beta1TypeChecking
-from kubernetes.client.models.v1beta1_validating_admission_policy import V1beta1ValidatingAdmissionPolicy
-from kubernetes.client.models.v1beta1_validating_admission_policy_binding import V1beta1ValidatingAdmissionPolicyBinding
-from kubernetes.client.models.v1beta1_validating_admission_policy_binding_list import V1beta1ValidatingAdmissionPolicyBindingList
-from kubernetes.client.models.v1beta1_validating_admission_policy_binding_spec import V1beta1ValidatingAdmissionPolicyBindingSpec
-from kubernetes.client.models.v1beta1_validating_admission_policy_list import V1beta1ValidatingAdmissionPolicyList
-from kubernetes.client.models.v1beta1_validating_admission_policy_spec import V1beta1ValidatingAdmissionPolicySpec
-from kubernetes.client.models.v1beta1_validating_admission_policy_status import V1beta1ValidatingAdmissionPolicyStatus
-from kubernetes.client.models.v1beta1_validation import V1beta1Validation
from kubernetes.client.models.v1beta1_variable import V1beta1Variable
from kubernetes.client.models.v1beta1_volume_attributes_class import V1beta1VolumeAttributesClass
from kubernetes.client.models.v1beta1_volume_attributes_class_list import V1beta1VolumeAttributesClassList
from kubernetes.client.models.v1beta2_allocated_device_status import V1beta2AllocatedDeviceStatus
from kubernetes.client.models.v1beta2_allocation_result import V1beta2AllocationResult
from kubernetes.client.models.v1beta2_cel_device_selector import V1beta2CELDeviceSelector
+from kubernetes.client.models.v1beta2_capacity_request_policy import V1beta2CapacityRequestPolicy
+from kubernetes.client.models.v1beta2_capacity_request_policy_range import V1beta2CapacityRequestPolicyRange
+from kubernetes.client.models.v1beta2_capacity_requirements import V1beta2CapacityRequirements
from kubernetes.client.models.v1beta2_counter import V1beta2Counter
from kubernetes.client.models.v1beta2_counter_set import V1beta2CounterSet
from kubernetes.client.models.v1beta2_device import V1beta2Device
diff --git a/contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_service_reference.py b/contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_service_reference.py
index 7db203b984c..0fe986dcba2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_service_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_service_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_webhook_client_config.py b/contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_webhook_client_config.py
index e5180773d32..8bb180bef4f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_webhook_client_config.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/admissionregistration_v1_webhook_client_config.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_service_reference.py b/contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_service_reference.py
index 48bdf140458..e108a756b7a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_service_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_service_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_webhook_client_config.py b/contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_webhook_client_config.py
index 785bfd10141..4423990538f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_webhook_client_config.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/apiextensions_v1_webhook_client_config.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/apiregistration_v1_service_reference.py b/contrib/python/kubernetes/kubernetes/client/models/apiregistration_v1_service_reference.py
index da8a9ba2f40..c76c2fb86fb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/apiregistration_v1_service_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/apiregistration_v1_service_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/authentication_v1_token_request.py b/contrib/python/kubernetes/kubernetes/client/models/authentication_v1_token_request.py
index 6837bf50b8e..2206e9a30fb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/authentication_v1_token_request.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/authentication_v1_token_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/core_v1_endpoint_port.py b/contrib/python/kubernetes/kubernetes/client/models/core_v1_endpoint_port.py
index 4a27a90cbe2..6c7d20f0e82 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/core_v1_endpoint_port.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/core_v1_endpoint_port.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/core_v1_event.py b/contrib/python/kubernetes/kubernetes/client/models/core_v1_event.py
index 5f33a5249d3..e6306763b62 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/core_v1_event.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/core_v1_event.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/core_v1_event_list.py b/contrib/python/kubernetes/kubernetes/client/models/core_v1_event_list.py
index 122c01523e8..f65314771fa 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/core_v1_event_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/core_v1_event_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/core_v1_event_series.py b/contrib/python/kubernetes/kubernetes/client/models/core_v1_event_series.py
index 710386c71fa..97b317ec174 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/core_v1_event_series.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/core_v1_event_series.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim.py b/contrib/python/kubernetes/kubernetes/client/models/core_v1_resource_claim.py
index 0e06ae5da0c..5276e97589c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/core_v1_resource_claim.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1ResourceClaim(object):
+class CoreV1ResourceClaim(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -43,7 +43,7 @@ class V1ResourceClaim(object):
}
def __init__(self, name=None, request=None, local_vars_configuration=None): # noqa: E501
- """V1ResourceClaim - a model defined in OpenAPI""" # noqa: E501
+ """CoreV1ResourceClaim - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -58,22 +58,22 @@ class V1ResourceClaim(object):
@property
def name(self):
- """Gets the name of this V1ResourceClaim. # noqa: E501
+ """Gets the name of this CoreV1ResourceClaim. # noqa: E501
Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. # noqa: E501
- :return: The name of this V1ResourceClaim. # noqa: E501
+ :return: The name of this CoreV1ResourceClaim. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
- """Sets the name of this V1ResourceClaim.
+ """Sets the name of this CoreV1ResourceClaim.
Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. # noqa: E501
- :param name: The name of this V1ResourceClaim. # noqa: E501
+ :param name: The name of this CoreV1ResourceClaim. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
@@ -83,22 +83,22 @@ class V1ResourceClaim(object):
@property
def request(self):
- """Gets the request of this V1ResourceClaim. # noqa: E501
+ """Gets the request of this CoreV1ResourceClaim. # noqa: E501
Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request. # noqa: E501
- :return: The request of this V1ResourceClaim. # noqa: E501
+ :return: The request of this CoreV1ResourceClaim. # noqa: E501
:rtype: str
"""
return self._request
@request.setter
def request(self, request):
- """Sets the request of this V1ResourceClaim.
+ """Sets the request of this CoreV1ResourceClaim.
Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request. # noqa: E501
- :param request: The request of this V1ResourceClaim. # noqa: E501
+ :param request: The request of this CoreV1ResourceClaim. # noqa: E501
:type: str
"""
@@ -138,14 +138,14 @@ class V1ResourceClaim(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1ResourceClaim):
+ if not isinstance(other, CoreV1ResourceClaim):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1ResourceClaim):
+ if not isinstance(other, CoreV1ResourceClaim):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/discovery_v1_endpoint_port.py b/contrib/python/kubernetes/kubernetes/client/models/discovery_v1_endpoint_port.py
index 18e7e69547c..551ef016b17 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/discovery_v1_endpoint_port.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/discovery_v1_endpoint_port.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/events_v1_event.py b/contrib/python/kubernetes/kubernetes/client/models/events_v1_event.py
index f4acb4b1be1..4a69759a09e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/events_v1_event.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/events_v1_event.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/events_v1_event_list.py b/contrib/python/kubernetes/kubernetes/client/models/events_v1_event_list.py
index 257a9e0b000..e3884287b9c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/events_v1_event_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/events_v1_event_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/events_v1_event_series.py b/contrib/python/kubernetes/kubernetes/client/models/events_v1_event_series.py
index aea315f3074..30b59b6543c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/events_v1_event_series.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/events_v1_event_series.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/flowcontrol_v1_subject.py b/contrib/python/kubernetes/kubernetes/client/models/flowcontrol_v1_subject.py
index fb12f8ef101..bbf34a7ba2e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/flowcontrol_v1_subject.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/flowcontrol_v1_subject.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/rbac_v1_subject.py b/contrib/python/kubernetes/kubernetes/client/models/rbac_v1_subject.py
index 273ed70e6e5..a4fc369bcac 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/rbac_v1_subject.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/rbac_v1_subject.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim.py b/contrib/python/kubernetes/kubernetes/client/models/resource_v1_resource_claim.py
index bbf3b1763fe..fe38c5b55ff 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/resource_v1_resource_claim.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceClaim(object):
+class ResourceV1ResourceClaim(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -36,8 +36,8 @@ class V1alpha3ResourceClaim(object):
'api_version': 'str',
'kind': 'str',
'metadata': 'V1ObjectMeta',
- 'spec': 'V1alpha3ResourceClaimSpec',
- 'status': 'V1alpha3ResourceClaimStatus'
+ 'spec': 'V1ResourceClaimSpec',
+ 'status': 'V1ResourceClaimStatus'
}
attribute_map = {
@@ -49,7 +49,7 @@ class V1alpha3ResourceClaim(object):
}
def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceClaim - a model defined in OpenAPI""" # noqa: E501
+ """ResourceV1ResourceClaim - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -73,22 +73,22 @@ class V1alpha3ResourceClaim(object):
@property
def api_version(self):
- """Gets the api_version of this V1alpha3ResourceClaim. # noqa: E501
+ """Gets the api_version of this ResourceV1ResourceClaim. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1alpha3ResourceClaim. # noqa: E501
+ :return: The api_version of this ResourceV1ResourceClaim. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1alpha3ResourceClaim.
+ """Sets the api_version of this ResourceV1ResourceClaim.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1alpha3ResourceClaim. # noqa: E501
+ :param api_version: The api_version of this ResourceV1ResourceClaim. # noqa: E501
:type: str
"""
@@ -96,22 +96,22 @@ class V1alpha3ResourceClaim(object):
@property
def kind(self):
- """Gets the kind of this V1alpha3ResourceClaim. # noqa: E501
+ """Gets the kind of this ResourceV1ResourceClaim. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1alpha3ResourceClaim. # noqa: E501
+ :return: The kind of this ResourceV1ResourceClaim. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1alpha3ResourceClaim.
+ """Sets the kind of this ResourceV1ResourceClaim.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1alpha3ResourceClaim. # noqa: E501
+ :param kind: The kind of this ResourceV1ResourceClaim. # noqa: E501
:type: str
"""
@@ -119,20 +119,20 @@ class V1alpha3ResourceClaim(object):
@property
def metadata(self):
- """Gets the metadata of this V1alpha3ResourceClaim. # noqa: E501
+ """Gets the metadata of this ResourceV1ResourceClaim. # noqa: E501
- :return: The metadata of this V1alpha3ResourceClaim. # noqa: E501
+ :return: The metadata of this ResourceV1ResourceClaim. # noqa: E501
:rtype: V1ObjectMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1alpha3ResourceClaim.
+ """Sets the metadata of this ResourceV1ResourceClaim.
- :param metadata: The metadata of this V1alpha3ResourceClaim. # noqa: E501
+ :param metadata: The metadata of this ResourceV1ResourceClaim. # noqa: E501
:type: V1ObjectMeta
"""
@@ -140,21 +140,21 @@ class V1alpha3ResourceClaim(object):
@property
def spec(self):
- """Gets the spec of this V1alpha3ResourceClaim. # noqa: E501
+ """Gets the spec of this ResourceV1ResourceClaim. # noqa: E501
- :return: The spec of this V1alpha3ResourceClaim. # noqa: E501
- :rtype: V1alpha3ResourceClaimSpec
+ :return: The spec of this ResourceV1ResourceClaim. # noqa: E501
+ :rtype: V1ResourceClaimSpec
"""
return self._spec
@spec.setter
def spec(self, spec):
- """Sets the spec of this V1alpha3ResourceClaim.
+ """Sets the spec of this ResourceV1ResourceClaim.
- :param spec: The spec of this V1alpha3ResourceClaim. # noqa: E501
- :type: V1alpha3ResourceClaimSpec
+ :param spec: The spec of this ResourceV1ResourceClaim. # noqa: E501
+ :type: V1ResourceClaimSpec
"""
if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501
raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501
@@ -163,21 +163,21 @@ class V1alpha3ResourceClaim(object):
@property
def status(self):
- """Gets the status of this V1alpha3ResourceClaim. # noqa: E501
+ """Gets the status of this ResourceV1ResourceClaim. # noqa: E501
- :return: The status of this V1alpha3ResourceClaim. # noqa: E501
- :rtype: V1alpha3ResourceClaimStatus
+ :return: The status of this ResourceV1ResourceClaim. # noqa: E501
+ :rtype: V1ResourceClaimStatus
"""
return self._status
@status.setter
def status(self, status):
- """Sets the status of this V1alpha3ResourceClaim.
+ """Sets the status of this ResourceV1ResourceClaim.
- :param status: The status of this V1alpha3ResourceClaim. # noqa: E501
- :type: V1alpha3ResourceClaimStatus
+ :param status: The status of this ResourceV1ResourceClaim. # noqa: E501
+ :type: V1ResourceClaimStatus
"""
self._status = status
@@ -216,14 +216,14 @@ class V1alpha3ResourceClaim(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceClaim):
+ if not isinstance(other, ResourceV1ResourceClaim):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceClaim):
+ if not isinstance(other, ResourceV1ResourceClaim):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/storage_v1_token_request.py b/contrib/python/kubernetes/kubernetes/client/models/storage_v1_token_request.py
index a01de4f3265..506b3204e72 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/storage_v1_token_request.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/storage_v1_token_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_affinity.py b/contrib/python/kubernetes/kubernetes/client/models/v1_affinity.py
index fd2c8cc3d07..e3fd1a950b5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_affinity.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_affinity.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_aggregation_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_aggregation_rule.py
index 3a62103499a..bc9baa166c4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_aggregation_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_aggregation_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_allocated_device_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_allocated_device_status.py
index d82eff91729..39566554cdf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_allocated_device_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_allocated_device_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3AllocatedDeviceStatus(object):
+class V1AllocatedDeviceStatus(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -37,8 +37,9 @@ class V1alpha3AllocatedDeviceStatus(object):
'data': 'object',
'device': 'str',
'driver': 'str',
- 'network_data': 'V1alpha3NetworkDeviceData',
- 'pool': 'str'
+ 'network_data': 'V1NetworkDeviceData',
+ 'pool': 'str',
+ 'share_id': 'str'
}
attribute_map = {
@@ -47,11 +48,12 @@ class V1alpha3AllocatedDeviceStatus(object):
'device': 'device',
'driver': 'driver',
'network_data': 'networkData',
- 'pool': 'pool'
+ 'pool': 'pool',
+ 'share_id': 'shareID'
}
- def __init__(self, conditions=None, data=None, device=None, driver=None, network_data=None, pool=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3AllocatedDeviceStatus - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, conditions=None, data=None, device=None, driver=None, network_data=None, pool=None, share_id=None, local_vars_configuration=None): # noqa: E501
+ """V1AllocatedDeviceStatus - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -62,6 +64,7 @@ class V1alpha3AllocatedDeviceStatus(object):
self._driver = None
self._network_data = None
self._pool = None
+ self._share_id = None
self.discriminator = None
if conditions is not None:
@@ -73,25 +76,27 @@ class V1alpha3AllocatedDeviceStatus(object):
if network_data is not None:
self.network_data = network_data
self.pool = pool
+ if share_id is not None:
+ self.share_id = share_id
@property
def conditions(self):
- """Gets the conditions of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ """Gets the conditions of this V1AllocatedDeviceStatus. # noqa: E501
Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True. Must not contain more than 8 entries. # noqa: E501
- :return: The conditions of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :return: The conditions of this V1AllocatedDeviceStatus. # noqa: E501
:rtype: list[V1Condition]
"""
return self._conditions
@conditions.setter
def conditions(self, conditions):
- """Sets the conditions of this V1alpha3AllocatedDeviceStatus.
+ """Sets the conditions of this V1AllocatedDeviceStatus.
Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True. Must not contain more than 8 entries. # noqa: E501
- :param conditions: The conditions of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :param conditions: The conditions of this V1AllocatedDeviceStatus. # noqa: E501
:type: list[V1Condition]
"""
@@ -99,22 +104,22 @@ class V1alpha3AllocatedDeviceStatus(object):
@property
def data(self):
- """Gets the data of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ """Gets the data of this V1AllocatedDeviceStatus. # noqa: E501
Data contains arbitrary driver-specific data. The length of the raw data must be smaller or equal to 10 Ki. # noqa: E501
- :return: The data of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :return: The data of this V1AllocatedDeviceStatus. # noqa: E501
:rtype: object
"""
return self._data
@data.setter
def data(self, data):
- """Sets the data of this V1alpha3AllocatedDeviceStatus.
+ """Sets the data of this V1AllocatedDeviceStatus.
Data contains arbitrary driver-specific data. The length of the raw data must be smaller or equal to 10 Ki. # noqa: E501
- :param data: The data of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :param data: The data of this V1AllocatedDeviceStatus. # noqa: E501
:type: object
"""
@@ -122,22 +127,22 @@ class V1alpha3AllocatedDeviceStatus(object):
@property
def device(self):
- """Gets the device of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ """Gets the device of this V1AllocatedDeviceStatus. # noqa: E501
Device references one device instance via its name in the driver's resource pool. It must be a DNS label. # noqa: E501
- :return: The device of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :return: The device of this V1AllocatedDeviceStatus. # noqa: E501
:rtype: str
"""
return self._device
@device.setter
def device(self, device):
- """Sets the device of this V1alpha3AllocatedDeviceStatus.
+ """Sets the device of this V1AllocatedDeviceStatus.
Device references one device instance via its name in the driver's resource pool. It must be a DNS label. # noqa: E501
- :param device: The device of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :param device: The device of this V1AllocatedDeviceStatus. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and device is None: # noqa: E501
@@ -147,22 +152,22 @@ class V1alpha3AllocatedDeviceStatus(object):
@property
def driver(self):
- """Gets the driver of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ """Gets the driver of this V1AllocatedDeviceStatus. # noqa: E501
Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. # noqa: E501
- :return: The driver of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :return: The driver of this V1AllocatedDeviceStatus. # noqa: E501
:rtype: str
"""
return self._driver
@driver.setter
def driver(self, driver):
- """Sets the driver of this V1alpha3AllocatedDeviceStatus.
+ """Sets the driver of this V1AllocatedDeviceStatus.
Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. # noqa: E501
- :param driver: The driver of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :param driver: The driver of this V1AllocatedDeviceStatus. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and driver is None: # noqa: E501
@@ -172,43 +177,43 @@ class V1alpha3AllocatedDeviceStatus(object):
@property
def network_data(self):
- """Gets the network_data of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ """Gets the network_data of this V1AllocatedDeviceStatus. # noqa: E501
- :return: The network_data of this V1alpha3AllocatedDeviceStatus. # noqa: E501
- :rtype: V1alpha3NetworkDeviceData
+ :return: The network_data of this V1AllocatedDeviceStatus. # noqa: E501
+ :rtype: V1NetworkDeviceData
"""
return self._network_data
@network_data.setter
def network_data(self, network_data):
- """Sets the network_data of this V1alpha3AllocatedDeviceStatus.
+ """Sets the network_data of this V1AllocatedDeviceStatus.
- :param network_data: The network_data of this V1alpha3AllocatedDeviceStatus. # noqa: E501
- :type: V1alpha3NetworkDeviceData
+ :param network_data: The network_data of this V1AllocatedDeviceStatus. # noqa: E501
+ :type: V1NetworkDeviceData
"""
self._network_data = network_data
@property
def pool(self):
- """Gets the pool of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ """Gets the pool of this V1AllocatedDeviceStatus. # noqa: E501
This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. # noqa: E501
- :return: The pool of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :return: The pool of this V1AllocatedDeviceStatus. # noqa: E501
:rtype: str
"""
return self._pool
@pool.setter
def pool(self, pool):
- """Sets the pool of this V1alpha3AllocatedDeviceStatus.
+ """Sets the pool of this V1AllocatedDeviceStatus.
This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. # noqa: E501
- :param pool: The pool of this V1alpha3AllocatedDeviceStatus. # noqa: E501
+ :param pool: The pool of this V1AllocatedDeviceStatus. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and pool is None: # noqa: E501
@@ -216,6 +221,29 @@ class V1alpha3AllocatedDeviceStatus(object):
self._pool = pool
+ @property
+ def share_id(self):
+ """Gets the share_id of this V1AllocatedDeviceStatus. # noqa: E501
+
+ ShareID uniquely identifies an individual allocation share of the device. # noqa: E501
+
+ :return: The share_id of this V1AllocatedDeviceStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._share_id
+
+ @share_id.setter
+ def share_id(self, share_id):
+ """Sets the share_id of this V1AllocatedDeviceStatus.
+
+ ShareID uniquely identifies an individual allocation share of the device. # noqa: E501
+
+ :param share_id: The share_id of this V1AllocatedDeviceStatus. # noqa: E501
+ :type: str
+ """
+
+ self._share_id = share_id
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
@@ -250,14 +278,14 @@ class V1alpha3AllocatedDeviceStatus(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3AllocatedDeviceStatus):
+ if not isinstance(other, V1AllocatedDeviceStatus):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3AllocatedDeviceStatus):
+ if not isinstance(other, V1AllocatedDeviceStatus):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1_allocation_result.py
index 68314a17d69..db371fc40d7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_allocation_result.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3AllocationResult(object):
+class V1AllocationResult(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,67 +33,95 @@ class V1alpha3AllocationResult(object):
and the value is json key in definition.
"""
openapi_types = {
- 'devices': 'V1alpha3DeviceAllocationResult',
+ 'allocation_timestamp': 'datetime',
+ 'devices': 'V1DeviceAllocationResult',
'node_selector': 'V1NodeSelector'
}
attribute_map = {
+ 'allocation_timestamp': 'allocationTimestamp',
'devices': 'devices',
'node_selector': 'nodeSelector'
}
- def __init__(self, devices=None, node_selector=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3AllocationResult - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, allocation_timestamp=None, devices=None, node_selector=None, local_vars_configuration=None): # noqa: E501
+ """V1AllocationResult - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._allocation_timestamp = None
self._devices = None
self._node_selector = None
self.discriminator = None
+ if allocation_timestamp is not None:
+ self.allocation_timestamp = allocation_timestamp
if devices is not None:
self.devices = devices
if node_selector is not None:
self.node_selector = node_selector
@property
+ def allocation_timestamp(self):
+ """Gets the allocation_timestamp of this V1AllocationResult. # noqa: E501
+
+ AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E501
+
+ :return: The allocation_timestamp of this V1AllocationResult. # noqa: E501
+ :rtype: datetime
+ """
+ return self._allocation_timestamp
+
+ @allocation_timestamp.setter
+ def allocation_timestamp(self, allocation_timestamp):
+ """Sets the allocation_timestamp of this V1AllocationResult.
+
+ AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E501
+
+ :param allocation_timestamp: The allocation_timestamp of this V1AllocationResult. # noqa: E501
+ :type: datetime
+ """
+
+ self._allocation_timestamp = allocation_timestamp
+
+ @property
def devices(self):
- """Gets the devices of this V1alpha3AllocationResult. # noqa: E501
+ """Gets the devices of this V1AllocationResult. # noqa: E501
- :return: The devices of this V1alpha3AllocationResult. # noqa: E501
- :rtype: V1alpha3DeviceAllocationResult
+ :return: The devices of this V1AllocationResult. # noqa: E501
+ :rtype: V1DeviceAllocationResult
"""
return self._devices
@devices.setter
def devices(self, devices):
- """Sets the devices of this V1alpha3AllocationResult.
+ """Sets the devices of this V1AllocationResult.
- :param devices: The devices of this V1alpha3AllocationResult. # noqa: E501
- :type: V1alpha3DeviceAllocationResult
+ :param devices: The devices of this V1AllocationResult. # noqa: E501
+ :type: V1DeviceAllocationResult
"""
self._devices = devices
@property
def node_selector(self):
- """Gets the node_selector of this V1alpha3AllocationResult. # noqa: E501
+ """Gets the node_selector of this V1AllocationResult. # noqa: E501
- :return: The node_selector of this V1alpha3AllocationResult. # noqa: E501
+ :return: The node_selector of this V1AllocationResult. # noqa: E501
:rtype: V1NodeSelector
"""
return self._node_selector
@node_selector.setter
def node_selector(self, node_selector):
- """Sets the node_selector of this V1alpha3AllocationResult.
+ """Sets the node_selector of this V1AllocationResult.
- :param node_selector: The node_selector of this V1alpha3AllocationResult. # noqa: E501
+ :param node_selector: The node_selector of this V1AllocationResult. # noqa: E501
:type: V1NodeSelector
"""
@@ -133,14 +161,14 @@ class V1alpha3AllocationResult(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3AllocationResult):
+ if not isinstance(other, V1AllocationResult):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3AllocationResult):
+ if not isinstance(other, V1AllocationResult):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_group.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_group.py
index 4df686be408..bf2e3f207c3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_group.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_group.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_group_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_group_list.py
index 3bc8db3f35a..99040c2396c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_group_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_group_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_resource.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_resource.py
index 68965456725..35cf3aa86be 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_resource.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_resource.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_resource_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_resource_list.py
index bf366b714ee..a0cc5d67c7c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_resource_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_resource_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service.py
index 52ef82feee1..21d260ee2a8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_condition.py
index 90cc7df604a..f9be1379b4a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_list.py
index f1d2cc306ff..1c22ea3d386 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_spec.py
index ea1d080a408..c47f1cc33d8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_status.py
index 80a5c1d2f9b..e4fa5e50c7f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_service_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_api_versions.py b/contrib/python/kubernetes/kubernetes/client/models/v1_api_versions.py
index 3e0ac08152b..a4028e6cdbf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_api_versions.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_api_versions.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_app_armor_profile.py b/contrib/python/kubernetes/kubernetes/client/models/v1_app_armor_profile.py
index 5d8859c703b..39a81d62234 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_app_armor_profile.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_app_armor_profile.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_attached_volume.py b/contrib/python/kubernetes/kubernetes/client/models/v1_attached_volume.py
index 695ac38191e..4d861528ce0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_attached_volume.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_attached_volume.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_audit_annotation.py b/contrib/python/kubernetes/kubernetes/client/models/v1_audit_annotation.py
index d5efa68c503..9289b060af7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_audit_annotation.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_audit_annotation.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py
index 8a7b0bfade3..dce4e8161b5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_azure_disk_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_azure_disk_volume_source.py
index 15d9320325e..af3584ba3d4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_azure_disk_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_azure_disk_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_persistent_volume_source.py
index 4bdf9420de5..972387edc37 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_volume_source.py
index 6decdda53e1..a901ff5891e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_azure_file_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_binding.py b/contrib/python/kubernetes/kubernetes/client/models/v1_binding.py
index 93e56ec06d5..c10ce20e17e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_binding.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_binding.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_bound_object_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_bound_object_reference.py
index 4c24053bb8e..db83759970d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_bound_object_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_bound_object_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_capabilities.py b/contrib/python/kubernetes/kubernetes/client/models/v1_capabilities.py
index 797457692b9..ca4e420d34e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_capabilities.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_capabilities.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_capacity_request_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_capacity_request_policy.py
new file mode 100644
index 00000000000..e0229b4ba56
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_capacity_request_policy.py
@@ -0,0 +1,176 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1CapacityRequestPolicy(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'default': 'str',
+ 'valid_range': 'V1CapacityRequestPolicyRange',
+ 'valid_values': 'list[str]'
+ }
+
+ attribute_map = {
+ 'default': 'default',
+ 'valid_range': 'validRange',
+ 'valid_values': 'validValues'
+ }
+
+ def __init__(self, default=None, valid_range=None, valid_values=None, local_vars_configuration=None): # noqa: E501
+ """V1CapacityRequestPolicy - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._default = None
+ self._valid_range = None
+ self._valid_values = None
+ self.discriminator = None
+
+ if default is not None:
+ self.default = default
+ if valid_range is not None:
+ self.valid_range = valid_range
+ if valid_values is not None:
+ self.valid_values = valid_values
+
+ @property
+ def default(self):
+ """Gets the default of this V1CapacityRequestPolicy. # noqa: E501
+
+ Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity. # noqa: E501
+
+ :return: The default of this V1CapacityRequestPolicy. # noqa: E501
+ :rtype: str
+ """
+ return self._default
+
+ @default.setter
+ def default(self, default):
+ """Sets the default of this V1CapacityRequestPolicy.
+
+ Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity. # noqa: E501
+
+ :param default: The default of this V1CapacityRequestPolicy. # noqa: E501
+ :type: str
+ """
+
+ self._default = default
+
+ @property
+ def valid_range(self):
+ """Gets the valid_range of this V1CapacityRequestPolicy. # noqa: E501
+
+
+ :return: The valid_range of this V1CapacityRequestPolicy. # noqa: E501
+ :rtype: V1CapacityRequestPolicyRange
+ """
+ return self._valid_range
+
+ @valid_range.setter
+ def valid_range(self, valid_range):
+ """Sets the valid_range of this V1CapacityRequestPolicy.
+
+
+ :param valid_range: The valid_range of this V1CapacityRequestPolicy. # noqa: E501
+ :type: V1CapacityRequestPolicyRange
+ """
+
+ self._valid_range = valid_range
+
+ @property
+ def valid_values(self):
+ """Gets the valid_values of this V1CapacityRequestPolicy. # noqa: E501
+
+ ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. # noqa: E501
+
+ :return: The valid_values of this V1CapacityRequestPolicy. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._valid_values
+
+ @valid_values.setter
+ def valid_values(self, valid_values):
+ """Sets the valid_values of this V1CapacityRequestPolicy.
+
+ ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. # noqa: E501
+
+ :param valid_values: The valid_values of this V1CapacityRequestPolicy. # noqa: E501
+ :type: list[str]
+ """
+
+ self._valid_values = valid_values
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1CapacityRequestPolicy):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1CapacityRequestPolicy):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_capacity_request_policy_range.py b/contrib/python/kubernetes/kubernetes/client/models/v1_capacity_request_policy_range.py
new file mode 100644
index 00000000000..63f9d480560
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_capacity_request_policy_range.py
@@ -0,0 +1,179 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1CapacityRequestPolicyRange(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'max': 'str',
+ 'min': 'str',
+ 'step': 'str'
+ }
+
+ attribute_map = {
+ 'max': 'max',
+ 'min': 'min',
+ 'step': 'step'
+ }
+
+ def __init__(self, max=None, min=None, step=None, local_vars_configuration=None): # noqa: E501
+ """V1CapacityRequestPolicyRange - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._max = None
+ self._min = None
+ self._step = None
+ self.discriminator = None
+
+ if max is not None:
+ self.max = max
+ self.min = min
+ if step is not None:
+ self.step = step
+
+ @property
+ def max(self):
+ """Gets the max of this V1CapacityRequestPolicyRange. # noqa: E501
+
+ Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. # noqa: E501
+
+ :return: The max of this V1CapacityRequestPolicyRange. # noqa: E501
+ :rtype: str
+ """
+ return self._max
+
+ @max.setter
+ def max(self, max):
+ """Sets the max of this V1CapacityRequestPolicyRange.
+
+ Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. # noqa: E501
+
+ :param max: The max of this V1CapacityRequestPolicyRange. # noqa: E501
+ :type: str
+ """
+
+ self._max = max
+
+ @property
+ def min(self):
+ """Gets the min of this V1CapacityRequestPolicyRange. # noqa: E501
+
+ Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. # noqa: E501
+
+ :return: The min of this V1CapacityRequestPolicyRange. # noqa: E501
+ :rtype: str
+ """
+ return self._min
+
+ @min.setter
+ def min(self, min):
+ """Sets the min of this V1CapacityRequestPolicyRange.
+
+ Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. # noqa: E501
+
+ :param min: The min of this V1CapacityRequestPolicyRange. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and min is None: # noqa: E501
+ raise ValueError("Invalid value for `min`, must not be `None`") # noqa: E501
+
+ self._min = min
+
+ @property
+ def step(self):
+ """Gets the step of this V1CapacityRequestPolicyRange. # noqa: E501
+
+ Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value. # noqa: E501
+
+ :return: The step of this V1CapacityRequestPolicyRange. # noqa: E501
+ :rtype: str
+ """
+ return self._step
+
+ @step.setter
+ def step(self, step):
+ """Sets the step of this V1CapacityRequestPolicyRange.
+
+ Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value. # noqa: E501
+
+ :param step: The step of this V1CapacityRequestPolicyRange. # noqa: E501
+ :type: str
+ """
+
+ self._step = step
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1CapacityRequestPolicyRange):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1CapacityRequestPolicyRange):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_capacity_requirements.py b/contrib/python/kubernetes/kubernetes/client/models/v1_capacity_requirements.py
new file mode 100644
index 00000000000..6d2d1d12432
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_capacity_requirements.py
@@ -0,0 +1,122 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1CapacityRequirements(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'requests': 'dict(str, str)'
+ }
+
+ attribute_map = {
+ 'requests': 'requests'
+ }
+
+ def __init__(self, requests=None, local_vars_configuration=None): # noqa: E501
+ """V1CapacityRequirements - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._requests = None
+ self.discriminator = None
+
+ if requests is not None:
+ self.requests = requests
+
+ @property
+ def requests(self):
+ """Gets the requests of this V1CapacityRequirements. # noqa: E501
+
+ Requests represent individual device resource requests for distinct resources, all of which must be provided by the device. This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[<domain>].<name>.compareTo(quantity(<request quantity>)) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. # noqa: E501
+
+ :return: The requests of this V1CapacityRequirements. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._requests
+
+ @requests.setter
+ def requests(self, requests):
+ """Sets the requests of this V1CapacityRequirements.
+
+ Requests represent individual device resource requests for distinct resources, all of which must be provided by the device. This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[<domain>].<name>.compareTo(quantity(<request quantity>)) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. # noqa: E501
+
+ :param requests: The requests of this V1CapacityRequirements. # noqa: E501
+ :type: dict(str, str)
+ """
+
+ self._requests = requests
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1CapacityRequirements):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1CapacityRequirements):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cel_device_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cel_device_selector.py
new file mode 100644
index 00000000000..4f560e3561e
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cel_device_selector.py
@@ -0,0 +1,123 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1CELDeviceSelector(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'expression': 'str'
+ }
+
+ attribute_map = {
+ 'expression': 'expression'
+ }
+
+ def __init__(self, expression=None, local_vars_configuration=None): # noqa: E501
+ """V1CELDeviceSelector - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._expression = None
+ self.discriminator = None
+
+ self.expression = expression
+
+ @property
+ def expression(self):
+ """Gets the expression of this V1CELDeviceSelector. # noqa: E501
+
+ Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
+
+ :return: The expression of this V1CELDeviceSelector. # noqa: E501
+ :rtype: str
+ """
+ return self._expression
+
+ @expression.setter
+ def expression(self, expression):
+ """Sets the expression of this V1CELDeviceSelector.
+
+ Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
+
+ :param expression: The expression of this V1CELDeviceSelector. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and expression is None: # noqa: E501
+ raise ValueError("Invalid value for `expression`, must not be `None`") # noqa: E501
+
+ self._expression = expression
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1CELDeviceSelector):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1CELDeviceSelector):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py
index b6ab2f59bec..e58ff203ad4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_volume_source.py
index a68767ec4bd..03e189bdc3a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ceph_fs_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request.py
index 0f2d92d89dd..b1f579b8568 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_condition.py
index 1ee215aff56..04075c0adf6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_list.py
index 30958cb0bf6..783f0546e3e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_spec.py
index 033e10d8cfb..967dbc32b2c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_status.py
index 8923ac5881b..f95df792fee 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_certificate_signing_request_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cinder_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cinder_persistent_volume_source.py
index 5a6945537b3..d52eafbdec6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cinder_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cinder_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cinder_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cinder_volume_source.py
index 1787f00066c..00adcb0fe8b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cinder_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cinder_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_client_ip_config.py b/contrib/python/kubernetes/kubernetes/client/models/v1_client_ip_config.py
index 77148891e4f..063eadf8736 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_client_ip_config.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_client_ip_config.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role.py
index 63e93870bbd..f1be5dc262d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding.py
index 77fd9c7aec8..4d09220638a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding_list.py
index eacfed22c15..5ed86f13707 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_binding_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_list.py
index bce77c5eef3..87ac2c5ea4b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_role_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_trust_bundle_projection.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_trust_bundle_projection.py
index 3b4006cbb91..c5fd33d6527 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_trust_bundle_projection.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cluster_trust_bundle_projection.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_component_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_component_condition.py
index 2f7c3266732..a5e37b2f7c0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_component_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_component_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_component_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_component_status.py
index 694a34989b5..1c6078f0039 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_component_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_component_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_component_status_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_component_status_list.py
index 769ac891305..c97175d9968 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_component_status_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_component_status_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_condition.py
index 226eb76853f..965d832bbc5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map.py b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map.py
index 9532f67f301..4fc1693eabf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_env_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_env_source.py
index fbe24f6b52c..82464b62228 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_env_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_env_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_key_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_key_selector.py
index 9087a9df897..2823e06e728 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_key_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_key_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_list.py
index 7e690e602a5..9c5a9cd6da8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_node_config_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_node_config_source.py
index 358cfde24aa..e5f2e107acb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_node_config_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_node_config_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_projection.py b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_projection.py
index 3ad46f2b4d6..8ed2ed20861 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_projection.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_projection.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_volume_source.py
index 1f4fb52e745..c679238160c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_config_map_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container.py
index 4b90e8c9ee4..627bcf8a0e5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -47,6 +47,7 @@ class V1Container(object):
'resize_policy': 'list[V1ContainerResizePolicy]',
'resources': 'V1ResourceRequirements',
'restart_policy': 'str',
+ 'restart_policy_rules': 'list[V1ContainerRestartRule]',
'security_context': 'V1SecurityContext',
'startup_probe': 'V1Probe',
'stdin': 'bool',
@@ -74,6 +75,7 @@ class V1Container(object):
'resize_policy': 'resizePolicy',
'resources': 'resources',
'restart_policy': 'restartPolicy',
+ 'restart_policy_rules': 'restartPolicyRules',
'security_context': 'securityContext',
'startup_probe': 'startupProbe',
'stdin': 'stdin',
@@ -86,7 +88,7 @@ class V1Container(object):
'working_dir': 'workingDir'
}
- def __init__(self, args=None, command=None, env=None, env_from=None, image=None, image_pull_policy=None, lifecycle=None, liveness_probe=None, name=None, ports=None, readiness_probe=None, resize_policy=None, resources=None, restart_policy=None, security_context=None, startup_probe=None, stdin=None, stdin_once=None, termination_message_path=None, termination_message_policy=None, tty=None, volume_devices=None, volume_mounts=None, working_dir=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, args=None, command=None, env=None, env_from=None, image=None, image_pull_policy=None, lifecycle=None, liveness_probe=None, name=None, ports=None, readiness_probe=None, resize_policy=None, resources=None, restart_policy=None, restart_policy_rules=None, security_context=None, startup_probe=None, stdin=None, stdin_once=None, termination_message_path=None, termination_message_policy=None, tty=None, volume_devices=None, volume_mounts=None, working_dir=None, local_vars_configuration=None): # noqa: E501
"""V1Container - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -106,6 +108,7 @@ class V1Container(object):
self._resize_policy = None
self._resources = None
self._restart_policy = None
+ self._restart_policy_rules = None
self._security_context = None
self._startup_probe = None
self._stdin = None
@@ -145,6 +148,8 @@ class V1Container(object):
self.resources = resources
if restart_policy is not None:
self.restart_policy = restart_policy
+ if restart_policy_rules is not None:
+ self.restart_policy_rules = restart_policy_rules
if security_context is not None:
self.security_context = security_context
if startup_probe is not None:
@@ -239,7 +244,7 @@ class V1Container(object):
def env_from(self):
"""Gets the env_from of this V1Container. # noqa: E501
- List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501
+ List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501
:return: The env_from of this V1Container. # noqa: E501
:rtype: list[V1EnvFromSource]
@@ -250,7 +255,7 @@ class V1Container(object):
def env_from(self, env_from):
"""Sets the env_from of this V1Container.
- List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501
+ List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501
:param env_from: The env_from of this V1Container. # noqa: E501
:type: list[V1EnvFromSource]
@@ -463,7 +468,7 @@ class V1Container(object):
def restart_policy(self):
"""Gets the restart_policy of this V1Container. # noqa: E501
- RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. # noqa: E501
+ RestartPolicy defines the restart behavior of individual containers in a pod. This overrides the pod-level restart policy. When this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Additionally, setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. # noqa: E501
:return: The restart_policy of this V1Container. # noqa: E501
:rtype: str
@@ -474,7 +479,7 @@ class V1Container(object):
def restart_policy(self, restart_policy):
"""Sets the restart_policy of this V1Container.
- RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. # noqa: E501
+ RestartPolicy defines the restart behavior of individual containers in a pod. This overrides the pod-level restart policy. When this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Additionally, setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. # noqa: E501
:param restart_policy: The restart_policy of this V1Container. # noqa: E501
:type: str
@@ -483,6 +488,29 @@ class V1Container(object):
self._restart_policy = restart_policy
@property
+ def restart_policy_rules(self):
+ """Gets the restart_policy_rules of this V1Container. # noqa: E501
+
+ Represents a list of rules to be checked to determine if the container should be restarted on exit. The rules are evaluated in order. Once a rule matches a container exit condition, the remaining rules are ignored. If no rule matches the container exit condition, the Container-level restart policy determines the whether the container is restarted or not. Constraints on the rules: - At most 20 rules are allowed. - Rules can have the same action. - Identical rules are not forbidden in validations. When rules are specified, container MUST set RestartPolicy explicitly even it if matches the Pod's RestartPolicy. # noqa: E501
+
+ :return: The restart_policy_rules of this V1Container. # noqa: E501
+ :rtype: list[V1ContainerRestartRule]
+ """
+ return self._restart_policy_rules
+
+ @restart_policy_rules.setter
+ def restart_policy_rules(self, restart_policy_rules):
+ """Sets the restart_policy_rules of this V1Container.
+
+ Represents a list of rules to be checked to determine if the container should be restarted on exit. The rules are evaluated in order. Once a rule matches a container exit condition, the remaining rules are ignored. If no rule matches the container exit condition, the Container-level restart policy determines the whether the container is restarted or not. Constraints on the rules: - At most 20 rules are allowed. - Rules can have the same action. - Identical rules are not forbidden in validations. When rules are specified, container MUST set RestartPolicy explicitly even it if matches the Pod's RestartPolicy. # noqa: E501
+
+ :param restart_policy_rules: The restart_policy_rules of this V1Container. # noqa: E501
+ :type: list[V1ContainerRestartRule]
+ """
+
+ self._restart_policy_rules = restart_policy_rules
+
+ @property
def security_context(self):
"""Gets the security_context of this V1Container. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_extended_resource_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_extended_resource_request.py
new file mode 100644
index 00000000000..6eae2f728b7
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_extended_resource_request.py
@@ -0,0 +1,181 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ContainerExtendedResourceRequest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'container_name': 'str',
+ 'request_name': 'str',
+ 'resource_name': 'str'
+ }
+
+ attribute_map = {
+ 'container_name': 'containerName',
+ 'request_name': 'requestName',
+ 'resource_name': 'resourceName'
+ }
+
+ def __init__(self, container_name=None, request_name=None, resource_name=None, local_vars_configuration=None): # noqa: E501
+ """V1ContainerExtendedResourceRequest - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._container_name = None
+ self._request_name = None
+ self._resource_name = None
+ self.discriminator = None
+
+ self.container_name = container_name
+ self.request_name = request_name
+ self.resource_name = resource_name
+
+ @property
+ def container_name(self):
+ """Gets the container_name of this V1ContainerExtendedResourceRequest. # noqa: E501
+
+ The name of the container requesting resources. # noqa: E501
+
+ :return: The container_name of this V1ContainerExtendedResourceRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._container_name
+
+ @container_name.setter
+ def container_name(self, container_name):
+ """Sets the container_name of this V1ContainerExtendedResourceRequest.
+
+ The name of the container requesting resources. # noqa: E501
+
+ :param container_name: The container_name of this V1ContainerExtendedResourceRequest. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and container_name is None: # noqa: E501
+ raise ValueError("Invalid value for `container_name`, must not be `None`") # noqa: E501
+
+ self._container_name = container_name
+
+ @property
+ def request_name(self):
+ """Gets the request_name of this V1ContainerExtendedResourceRequest. # noqa: E501
+
+ The name of the request in the special ResourceClaim which corresponds to the extended resource. # noqa: E501
+
+ :return: The request_name of this V1ContainerExtendedResourceRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._request_name
+
+ @request_name.setter
+ def request_name(self, request_name):
+ """Sets the request_name of this V1ContainerExtendedResourceRequest.
+
+ The name of the request in the special ResourceClaim which corresponds to the extended resource. # noqa: E501
+
+ :param request_name: The request_name of this V1ContainerExtendedResourceRequest. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and request_name is None: # noqa: E501
+ raise ValueError("Invalid value for `request_name`, must not be `None`") # noqa: E501
+
+ self._request_name = request_name
+
+ @property
+ def resource_name(self):
+ """Gets the resource_name of this V1ContainerExtendedResourceRequest. # noqa: E501
+
+ The name of the extended resource in that container which gets backed by DRA. # noqa: E501
+
+ :return: The resource_name of this V1ContainerExtendedResourceRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._resource_name
+
+ @resource_name.setter
+ def resource_name(self, resource_name):
+ """Sets the resource_name of this V1ContainerExtendedResourceRequest.
+
+ The name of the extended resource in that container which gets backed by DRA. # noqa: E501
+
+ :param resource_name: The resource_name of this V1ContainerExtendedResourceRequest. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and resource_name is None: # noqa: E501
+ raise ValueError("Invalid value for `resource_name`, must not be `None`") # noqa: E501
+
+ self._resource_name = resource_name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1ContainerExtendedResourceRequest):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1ContainerExtendedResourceRequest):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_image.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_image.py
index 064c73dd26d..c3db0c74fc1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container_image.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_image.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_port.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_port.py
index 384c88b414f..aba2c957510 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container_port.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_port.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_resize_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_resize_policy.py
index c23ffa2cbbb..a40aeda627a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container_resize_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_resize_policy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_restart_rule.py
index 15d0c8300cd..174cd86d85d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_restart_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3Device(object):
+class V1ContainerRestartRule(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,74 +33,74 @@ class V1alpha3Device(object):
and the value is json key in definition.
"""
openapi_types = {
- 'basic': 'V1alpha3BasicDevice',
- 'name': 'str'
+ 'action': 'str',
+ 'exit_codes': 'V1ContainerRestartRuleOnExitCodes'
}
attribute_map = {
- 'basic': 'basic',
- 'name': 'name'
+ 'action': 'action',
+ 'exit_codes': 'exitCodes'
}
- def __init__(self, basic=None, name=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3Device - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, action=None, exit_codes=None, local_vars_configuration=None): # noqa: E501
+ """V1ContainerRestartRule - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
- self._basic = None
- self._name = None
+ self._action = None
+ self._exit_codes = None
self.discriminator = None
- if basic is not None:
- self.basic = basic
- self.name = name
+ self.action = action
+ if exit_codes is not None:
+ self.exit_codes = exit_codes
@property
- def basic(self):
- """Gets the basic of this V1alpha3Device. # noqa: E501
+ def action(self):
+ """Gets the action of this V1ContainerRestartRule. # noqa: E501
+ Specifies the action taken on a container exit if the requirements are satisfied. The only possible value is \"Restart\" to restart the container. # noqa: E501
- :return: The basic of this V1alpha3Device. # noqa: E501
- :rtype: V1alpha3BasicDevice
+ :return: The action of this V1ContainerRestartRule. # noqa: E501
+ :rtype: str
"""
- return self._basic
+ return self._action
- @basic.setter
- def basic(self, basic):
- """Sets the basic of this V1alpha3Device.
+ @action.setter
+ def action(self, action):
+ """Sets the action of this V1ContainerRestartRule.
+ Specifies the action taken on a container exit if the requirements are satisfied. The only possible value is \"Restart\" to restart the container. # noqa: E501
- :param basic: The basic of this V1alpha3Device. # noqa: E501
- :type: V1alpha3BasicDevice
+ :param action: The action of this V1ContainerRestartRule. # noqa: E501
+ :type: str
"""
+ if self.local_vars_configuration.client_side_validation and action is None: # noqa: E501
+ raise ValueError("Invalid value for `action`, must not be `None`") # noqa: E501
- self._basic = basic
+ self._action = action
@property
- def name(self):
- """Gets the name of this V1alpha3Device. # noqa: E501
+ def exit_codes(self):
+ """Gets the exit_codes of this V1ContainerRestartRule. # noqa: E501
- Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label. # noqa: E501
- :return: The name of this V1alpha3Device. # noqa: E501
- :rtype: str
+ :return: The exit_codes of this V1ContainerRestartRule. # noqa: E501
+ :rtype: V1ContainerRestartRuleOnExitCodes
"""
- return self._name
+ return self._exit_codes
- @name.setter
- def name(self, name):
- """Sets the name of this V1alpha3Device.
+ @exit_codes.setter
+ def exit_codes(self, exit_codes):
+ """Sets the exit_codes of this V1ContainerRestartRule.
- Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label. # noqa: E501
- :param name: The name of this V1alpha3Device. # noqa: E501
- :type: str
+ :param exit_codes: The exit_codes of this V1ContainerRestartRule. # noqa: E501
+ :type: V1ContainerRestartRuleOnExitCodes
"""
- if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
- raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
- self._name = name
+ self._exit_codes = exit_codes
def to_dict(self):
"""Returns the model properties as a dict"""
@@ -136,14 +136,14 @@ class V1alpha3Device(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3Device):
+ if not isinstance(other, V1ContainerRestartRule):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3Device):
+ if not isinstance(other, V1ContainerRestartRule):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py
new file mode 100644
index 00000000000..341a8a04e27
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py
@@ -0,0 +1,151 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ContainerRestartRuleOnExitCodes(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'operator': 'str',
+ 'values': 'list[int]'
+ }
+
+ attribute_map = {
+ 'operator': 'operator',
+ 'values': 'values'
+ }
+
+ def __init__(self, operator=None, values=None, local_vars_configuration=None): # noqa: E501
+ """V1ContainerRestartRuleOnExitCodes - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._operator = None
+ self._values = None
+ self.discriminator = None
+
+ self.operator = operator
+ if values is not None:
+ self.values = values
+
+ @property
+ def operator(self):
+ """Gets the operator of this V1ContainerRestartRuleOnExitCodes. # noqa: E501
+
+ Represents the relationship between the container exit code(s) and the specified values. Possible values are: - In: the requirement is satisfied if the container exit code is in the set of specified values. - NotIn: the requirement is satisfied if the container exit code is not in the set of specified values. # noqa: E501
+
+ :return: The operator of this V1ContainerRestartRuleOnExitCodes. # noqa: E501
+ :rtype: str
+ """
+ return self._operator
+
+ @operator.setter
+ def operator(self, operator):
+ """Sets the operator of this V1ContainerRestartRuleOnExitCodes.
+
+ Represents the relationship between the container exit code(s) and the specified values. Possible values are: - In: the requirement is satisfied if the container exit code is in the set of specified values. - NotIn: the requirement is satisfied if the container exit code is not in the set of specified values. # noqa: E501
+
+ :param operator: The operator of this V1ContainerRestartRuleOnExitCodes. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and operator is None: # noqa: E501
+ raise ValueError("Invalid value for `operator`, must not be `None`") # noqa: E501
+
+ self._operator = operator
+
+ @property
+ def values(self):
+ """Gets the values of this V1ContainerRestartRuleOnExitCodes. # noqa: E501
+
+ Specifies the set of values to check for container exit codes. At most 255 elements are allowed. # noqa: E501
+
+ :return: The values of this V1ContainerRestartRuleOnExitCodes. # noqa: E501
+ :rtype: list[int]
+ """
+ return self._values
+
+ @values.setter
+ def values(self, values):
+ """Sets the values of this V1ContainerRestartRuleOnExitCodes.
+
+ Specifies the set of values to check for container exit codes. At most 255 elements are allowed. # noqa: E501
+
+ :param values: The values of this V1ContainerRestartRuleOnExitCodes. # noqa: E501
+ :type: list[int]
+ """
+
+ self._values = values
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1ContainerRestartRuleOnExitCodes):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1ContainerRestartRuleOnExitCodes):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_state.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_state.py
index 0552659ab65..ead4f7b92ea 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container_state.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_state.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_running.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_running.py
index 39776202d3a..382d0b21d82 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_running.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_running.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_terminated.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_terminated.py
index 1c21d8f33f6..a69ca222bc9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_terminated.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_terminated.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_waiting.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_waiting.py
index 3d824d0bd78..016d5079481 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_waiting.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_state_waiting.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_status.py
index c75863107dc..d66ca3824f9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container_user.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container_user.py
index 1c8fddf1b95..62a132cf102 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_container_user.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_container_user.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision.py b/contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision.py
index 617e94e64d9..1492bf6bac8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision_list.py
index 3e186c4eaf8..eaba37b5d2f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_controller_revision_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_counter.py b/contrib/python/kubernetes/kubernetes/client/models/v1_counter.py
index 4c4a1f03e18..69277a265c7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_counter.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_counter.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3Counter(object):
+class V1Counter(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -41,7 +41,7 @@ class V1alpha3Counter(object):
}
def __init__(self, value=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3Counter - a model defined in OpenAPI""" # noqa: E501
+ """V1Counter - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -53,22 +53,22 @@ class V1alpha3Counter(object):
@property
def value(self):
- """Gets the value of this V1alpha3Counter. # noqa: E501
+ """Gets the value of this V1Counter. # noqa: E501
Value defines how much of a certain device counter is available. # noqa: E501
- :return: The value of this V1alpha3Counter. # noqa: E501
+ :return: The value of this V1Counter. # noqa: E501
:rtype: str
"""
return self._value
@value.setter
def value(self, value):
- """Sets the value of this V1alpha3Counter.
+ """Sets the value of this V1Counter.
Value defines how much of a certain device counter is available. # noqa: E501
- :param value: The value of this V1alpha3Counter. # noqa: E501
+ :param value: The value of this V1Counter. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501
@@ -110,14 +110,14 @@ class V1alpha3Counter(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3Counter):
+ if not isinstance(other, V1Counter):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3Counter):
+ if not isinstance(other, V1Counter):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_counter_set.py b/contrib/python/kubernetes/kubernetes/client/models/v1_counter_set.py
index 143a9b9c06f..7866b0a7590 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_counter_set.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_counter_set.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3CounterSet(object):
+class V1CounterSet(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,7 +33,7 @@ class V1alpha3CounterSet(object):
and the value is json key in definition.
"""
openapi_types = {
- 'counters': 'dict(str, V1alpha3Counter)',
+ 'counters': 'dict(str, V1Counter)',
'name': 'str'
}
@@ -43,7 +43,7 @@ class V1alpha3CounterSet(object):
}
def __init__(self, counters=None, name=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3CounterSet - a model defined in OpenAPI""" # noqa: E501
+ """V1CounterSet - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -57,23 +57,23 @@ class V1alpha3CounterSet(object):
@property
def counters(self):
- """Gets the counters of this V1alpha3CounterSet. # noqa: E501
+ """Gets the counters of this V1CounterSet. # noqa: E501
- Counters defines the counters that will be consumed by the device. The name of each counter must be unique in that set and must be a DNS label. To ensure this uniqueness, capacities defined by the vendor must be listed without the driver name as domain prefix in their name. All others must be listed with their domain prefix. The maximum number of counters is 32. # noqa: E501
+ Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label. The maximum number of counters in all sets is 32. # noqa: E501
- :return: The counters of this V1alpha3CounterSet. # noqa: E501
- :rtype: dict(str, V1alpha3Counter)
+ :return: The counters of this V1CounterSet. # noqa: E501
+ :rtype: dict(str, V1Counter)
"""
return self._counters
@counters.setter
def counters(self, counters):
- """Sets the counters of this V1alpha3CounterSet.
+ """Sets the counters of this V1CounterSet.
- Counters defines the counters that will be consumed by the device. The name of each counter must be unique in that set and must be a DNS label. To ensure this uniqueness, capacities defined by the vendor must be listed without the driver name as domain prefix in their name. All others must be listed with their domain prefix. The maximum number of counters is 32. # noqa: E501
+ Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label. The maximum number of counters in all sets is 32. # noqa: E501
- :param counters: The counters of this V1alpha3CounterSet. # noqa: E501
- :type: dict(str, V1alpha3Counter)
+ :param counters: The counters of this V1CounterSet. # noqa: E501
+ :type: dict(str, V1Counter)
"""
if self.local_vars_configuration.client_side_validation and counters is None: # noqa: E501
raise ValueError("Invalid value for `counters`, must not be `None`") # noqa: E501
@@ -82,22 +82,22 @@ class V1alpha3CounterSet(object):
@property
def name(self):
- """Gets the name of this V1alpha3CounterSet. # noqa: E501
+ """Gets the name of this V1CounterSet. # noqa: E501
- CounterSet is the name of the set from which the counters defined will be consumed. # noqa: E501
+ Name defines the name of the counter set. It must be a DNS label. # noqa: E501
- :return: The name of this V1alpha3CounterSet. # noqa: E501
+ :return: The name of this V1CounterSet. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
- """Sets the name of this V1alpha3CounterSet.
+ """Sets the name of this V1CounterSet.
- CounterSet is the name of the set from which the counters defined will be consumed. # noqa: E501
+ Name defines the name of the counter set. It must be a DNS label. # noqa: E501
- :param name: The name of this V1alpha3CounterSet. # noqa: E501
+ :param name: The name of this V1CounterSet. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
@@ -139,14 +139,14 @@ class V1alpha3CounterSet(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3CounterSet):
+ if not isinstance(other, V1CounterSet):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3CounterSet):
+ if not isinstance(other, V1CounterSet):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job.py
index 66efc4ec1c2..44bff7fe979 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_list.py
index f62f7f8110b..70caf8ee601 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_spec.py
index 227695d547f..1a466d85ac3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_status.py
index 02f75ac643d..8486aaf90a4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cron_job_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_cross_version_object_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_cross_version_object_reference.py
index 8b3c95463c1..5bdf1f0a336 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_cross_version_object_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_cross_version_object_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver.py
index 1a9a1ae0bd2..644c51ddc6c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_list.py
index 6aafce560d5..6d0301b267f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_spec.py
index ce94cd43483..1239b3664e2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_driver_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -96,7 +96,7 @@ class V1CSIDriverSpec(object):
def attach_required(self):
"""Gets the attach_required of this V1CSIDriverSpec. # noqa: E501
- attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. This field is immutable. # noqa: E501
+ attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. This field is immutable. # noqa: E501
:return: The attach_required of this V1CSIDriverSpec. # noqa: E501
:rtype: bool
@@ -107,7 +107,7 @@ class V1CSIDriverSpec(object):
def attach_required(self, attach_required):
"""Sets the attach_required of this V1CSIDriverSpec.
- attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. This field is immutable. # noqa: E501
+ attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. This field is immutable. # noqa: E501
:param attach_required: The attach_required of this V1CSIDriverSpec. # noqa: E501
:type: bool
@@ -142,7 +142,7 @@ class V1CSIDriverSpec(object):
def node_allocatable_update_period_seconds(self):
"""Gets the node_allocatable_update_period_seconds of this V1CSIDriverSpec. # noqa: E501
- nodeAllocatableUpdatePeriodSeconds specifies the interval between periodic updates of the CSINode allocatable capacity for this driver. When set, both periodic updates and updates triggered by capacity-related failures are enabled. If not set, no updates occur (neither periodic nor upon detecting capacity-related failures), and the allocatable.count remains static. The minimum allowed value for this field is 10 seconds. This is an alpha feature and requires the MutableCSINodeAllocatableCount feature gate to be enabled. This field is mutable. # noqa: E501
+ nodeAllocatableUpdatePeriodSeconds specifies the interval between periodic updates of the CSINode allocatable capacity for this driver. When set, both periodic updates and updates triggered by capacity-related failures are enabled. If not set, no updates occur (neither periodic nor upon detecting capacity-related failures), and the allocatable.count remains static. The minimum allowed value for this field is 10 seconds. This is a beta feature and requires the MutableCSINodeAllocatableCount feature gate to be enabled. This field is mutable. # noqa: E501
:return: The node_allocatable_update_period_seconds of this V1CSIDriverSpec. # noqa: E501
:rtype: int
@@ -153,7 +153,7 @@ class V1CSIDriverSpec(object):
def node_allocatable_update_period_seconds(self, node_allocatable_update_period_seconds):
"""Sets the node_allocatable_update_period_seconds of this V1CSIDriverSpec.
- nodeAllocatableUpdatePeriodSeconds specifies the interval between periodic updates of the CSINode allocatable capacity for this driver. When set, both periodic updates and updates triggered by capacity-related failures are enabled. If not set, no updates occur (neither periodic nor upon detecting capacity-related failures), and the allocatable.count remains static. The minimum allowed value for this field is 10 seconds. This is an alpha feature and requires the MutableCSINodeAllocatableCount feature gate to be enabled. This field is mutable. # noqa: E501
+ nodeAllocatableUpdatePeriodSeconds specifies the interval between periodic updates of the CSINode allocatable capacity for this driver. When set, both periodic updates and updates triggered by capacity-related failures are enabled. If not set, no updates occur (neither periodic nor upon detecting capacity-related failures), and the allocatable.count remains static. The minimum allowed value for this field is 10 seconds. This is a beta feature and requires the MutableCSINodeAllocatableCount feature gate to be enabled. This field is mutable. # noqa: E501
:param node_allocatable_update_period_seconds: The node_allocatable_update_period_seconds of this V1CSIDriverSpec. # noqa: E501
:type: int
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node.py
index fba381f805b..ea04497ac64 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_driver.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_driver.py
index 25ed8b050e8..4619301a6ee 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_driver.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_driver.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_list.py
index 4a020d24ba9..307b5efa5aa 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_spec.py
index 90ba00a8630..e9aab87a16f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_node_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_persistent_volume_source.py
index 3c0c0ba3b84..6a58efaafd5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity.py
index b6461ddce34..b3438c73028 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity_list.py
index da7261b1074..70742fe71a2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_storage_capacity_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_volume_source.py
index c14fc155c78..b32c3b54c08 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_csi_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_csi_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_column_definition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_column_definition.py
index 2a6eff31c1e..134d7568d5b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_column_definition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_column_definition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_conversion.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_conversion.py
index 6975d2c8477..88083cd19ad 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_conversion.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_conversion.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition.py
index 84e3c2ecf72..c34b5f0e907 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_condition.py
index b3e31695551..f80c1115c5e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_list.py
index 55565e29995..e8eef888e21 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_names.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_names.py
index d580b8e019c..faf0c856a22 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_names.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_names.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_spec.py
index 1574d872a3b..ef2ca292853 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_status.py
index 0a14052b568..c83ff7c3feb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_version.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_version.py
index 0651b329a46..55c8eaff30d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_version.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_definition_version.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresource_scale.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresource_scale.py
index 239c9a74583..97efd8ff989 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresource_scale.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresource_scale.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresources.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresources.py
index 0c9b5bcd0af..f7fc628777a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresources.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_subresources.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_validation.py b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_validation.py
index 365dfbc348e..f11a7a7f932 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_validation.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_custom_resource_validation.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_endpoint.py b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_endpoint.py
index 98fe08d6e0a..9f3ab31cc10 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_endpoint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_endpoint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set.py b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set.py
index 6c5df53b37a..3d13c27b85b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_condition.py
index 694e628d815..a46994adb79 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_list.py
index 8447d344af6..c7c5270c2b7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_spec.py
index 583e6c4a20c..abdad44a6b1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_status.py
index 3801375abbf..a9b11980a75 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_update_strategy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_update_strategy.py
index d286d980480..90721495823 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_update_strategy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_daemon_set_update_strategy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_delete_options.py b/contrib/python/kubernetes/kubernetes/client/models/v1_delete_options.py
index 8bec1cfede0..2f4200062ce 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_delete_options.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_delete_options.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment.py b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment.py
index 394ef641180..a5189b910cf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_condition.py
index a50dd01efa7..ace525cc14d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_list.py
index 4ac2249b296..690c77deb16 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_spec.py
index 27ad72fa3d2..97d2af00fbf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_status.py
index bf72b772c5b..fe63200386b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_strategy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_strategy.py
index 9793060b940..438e334c34d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_strategy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_deployment_strategy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_device.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device.py
new file mode 100644
index 00000000000..0572cc69370
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device.py
@@ -0,0 +1,429 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1Device(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'all_nodes': 'bool',
+ 'allow_multiple_allocations': 'bool',
+ 'attributes': 'dict(str, V1DeviceAttribute)',
+ 'binding_conditions': 'list[str]',
+ 'binding_failure_conditions': 'list[str]',
+ 'binds_to_node': 'bool',
+ 'capacity': 'dict(str, V1DeviceCapacity)',
+ 'consumes_counters': 'list[V1DeviceCounterConsumption]',
+ 'name': 'str',
+ 'node_name': 'str',
+ 'node_selector': 'V1NodeSelector',
+ 'taints': 'list[V1DeviceTaint]'
+ }
+
+ attribute_map = {
+ 'all_nodes': 'allNodes',
+ 'allow_multiple_allocations': 'allowMultipleAllocations',
+ 'attributes': 'attributes',
+ 'binding_conditions': 'bindingConditions',
+ 'binding_failure_conditions': 'bindingFailureConditions',
+ 'binds_to_node': 'bindsToNode',
+ 'capacity': 'capacity',
+ 'consumes_counters': 'consumesCounters',
+ 'name': 'name',
+ 'node_name': 'nodeName',
+ 'node_selector': 'nodeSelector',
+ 'taints': 'taints'
+ }
+
+ def __init__(self, all_nodes=None, allow_multiple_allocations=None, attributes=None, binding_conditions=None, binding_failure_conditions=None, binds_to_node=None, capacity=None, consumes_counters=None, name=None, node_name=None, node_selector=None, taints=None, local_vars_configuration=None): # noqa: E501
+ """V1Device - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._all_nodes = None
+ self._allow_multiple_allocations = None
+ self._attributes = None
+ self._binding_conditions = None
+ self._binding_failure_conditions = None
+ self._binds_to_node = None
+ self._capacity = None
+ self._consumes_counters = None
+ self._name = None
+ self._node_name = None
+ self._node_selector = None
+ self._taints = None
+ self.discriminator = None
+
+ if all_nodes is not None:
+ self.all_nodes = all_nodes
+ if allow_multiple_allocations is not None:
+ self.allow_multiple_allocations = allow_multiple_allocations
+ if attributes is not None:
+ self.attributes = attributes
+ if binding_conditions is not None:
+ self.binding_conditions = binding_conditions
+ if binding_failure_conditions is not None:
+ self.binding_failure_conditions = binding_failure_conditions
+ if binds_to_node is not None:
+ self.binds_to_node = binds_to_node
+ if capacity is not None:
+ self.capacity = capacity
+ if consumes_counters is not None:
+ self.consumes_counters = consumes_counters
+ self.name = name
+ if node_name is not None:
+ self.node_name = node_name
+ if node_selector is not None:
+ self.node_selector = node_selector
+ if taints is not None:
+ self.taints = taints
+
+ @property
+ def all_nodes(self):
+ """Gets the all_nodes of this V1Device. # noqa: E501
+
+ AllNodes indicates that all nodes have access to the device. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501
+
+ :return: The all_nodes of this V1Device. # noqa: E501
+ :rtype: bool
+ """
+ return self._all_nodes
+
+ @all_nodes.setter
+ def all_nodes(self, all_nodes):
+ """Sets the all_nodes of this V1Device.
+
+ AllNodes indicates that all nodes have access to the device. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501
+
+ :param all_nodes: The all_nodes of this V1Device. # noqa: E501
+ :type: bool
+ """
+
+ self._all_nodes = all_nodes
+
+ @property
+ def allow_multiple_allocations(self):
+ """Gets the allow_multiple_allocations of this V1Device. # noqa: E501
+
+ AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. # noqa: E501
+
+ :return: The allow_multiple_allocations of this V1Device. # noqa: E501
+ :rtype: bool
+ """
+ return self._allow_multiple_allocations
+
+ @allow_multiple_allocations.setter
+ def allow_multiple_allocations(self, allow_multiple_allocations):
+ """Sets the allow_multiple_allocations of this V1Device.
+
+ AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. # noqa: E501
+
+ :param allow_multiple_allocations: The allow_multiple_allocations of this V1Device. # noqa: E501
+ :type: bool
+ """
+
+ self._allow_multiple_allocations = allow_multiple_allocations
+
+ @property
+ def attributes(self):
+ """Gets the attributes of this V1Device. # noqa: E501
+
+ Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501
+
+ :return: The attributes of this V1Device. # noqa: E501
+ :rtype: dict(str, V1DeviceAttribute)
+ """
+ return self._attributes
+
+ @attributes.setter
+ def attributes(self, attributes):
+ """Sets the attributes of this V1Device.
+
+ Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501
+
+ :param attributes: The attributes of this V1Device. # noqa: E501
+ :type: dict(str, V1DeviceAttribute)
+ """
+
+ self._attributes = attributes
+
+ @property
+ def binding_conditions(self):
+ """Gets the binding_conditions of this V1Device. # noqa: E501
+
+ BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_conditions of this V1Device. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_conditions
+
+ @binding_conditions.setter
+ def binding_conditions(self, binding_conditions):
+ """Sets the binding_conditions of this V1Device.
+
+ BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_conditions: The binding_conditions of this V1Device. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_conditions = binding_conditions
+
+ @property
+ def binding_failure_conditions(self):
+ """Gets the binding_failure_conditions of this V1Device. # noqa: E501
+
+ BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is set to \"True\", a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_failure_conditions of this V1Device. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_failure_conditions
+
+ @binding_failure_conditions.setter
+ def binding_failure_conditions(self, binding_failure_conditions):
+ """Sets the binding_failure_conditions of this V1Device.
+
+ BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is set to \"True\", a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_failure_conditions: The binding_failure_conditions of this V1Device. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_failure_conditions = binding_failure_conditions
+
+ @property
+ def binds_to_node(self):
+ """Gets the binds_to_node of this V1Device. # noqa: E501
+
+ BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binds_to_node of this V1Device. # noqa: E501
+ :rtype: bool
+ """
+ return self._binds_to_node
+
+ @binds_to_node.setter
+ def binds_to_node(self, binds_to_node):
+ """Sets the binds_to_node of this V1Device.
+
+ BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binds_to_node: The binds_to_node of this V1Device. # noqa: E501
+ :type: bool
+ """
+
+ self._binds_to_node = binds_to_node
+
+ @property
+ def capacity(self):
+ """Gets the capacity of this V1Device. # noqa: E501
+
+ Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501
+
+ :return: The capacity of this V1Device. # noqa: E501
+ :rtype: dict(str, V1DeviceCapacity)
+ """
+ return self._capacity
+
+ @capacity.setter
+ def capacity(self, capacity):
+ """Sets the capacity of this V1Device.
+
+ Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501
+
+ :param capacity: The capacity of this V1Device. # noqa: E501
+ :type: dict(str, V1DeviceCapacity)
+ """
+
+ self._capacity = capacity
+
+ @property
+ def consumes_counters(self):
+ """Gets the consumes_counters of this V1Device. # noqa: E501
+
+ ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets. There can only be a single entry per counterSet. The total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each). # noqa: E501
+
+ :return: The consumes_counters of this V1Device. # noqa: E501
+ :rtype: list[V1DeviceCounterConsumption]
+ """
+ return self._consumes_counters
+
+ @consumes_counters.setter
+ def consumes_counters(self, consumes_counters):
+ """Sets the consumes_counters of this V1Device.
+
+ ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets. There can only be a single entry per counterSet. The total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each). # noqa: E501
+
+ :param consumes_counters: The consumes_counters of this V1Device. # noqa: E501
+ :type: list[V1DeviceCounterConsumption]
+ """
+
+ self._consumes_counters = consumes_counters
+
+ @property
+ def name(self):
+ """Gets the name of this V1Device. # noqa: E501
+
+ Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label. # noqa: E501
+
+ :return: The name of this V1Device. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this V1Device.
+
+ Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label. # noqa: E501
+
+ :param name: The name of this V1Device. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
+ raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
+
+ self._name = name
+
+ @property
+ def node_name(self):
+ """Gets the node_name of this V1Device. # noqa: E501
+
+ NodeName identifies the node where the device is available. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501
+
+ :return: The node_name of this V1Device. # noqa: E501
+ :rtype: str
+ """
+ return self._node_name
+
+ @node_name.setter
+ def node_name(self, node_name):
+ """Sets the node_name of this V1Device.
+
+ NodeName identifies the node where the device is available. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501
+
+ :param node_name: The node_name of this V1Device. # noqa: E501
+ :type: str
+ """
+
+ self._node_name = node_name
+
+ @property
+ def node_selector(self):
+ """Gets the node_selector of this V1Device. # noqa: E501
+
+
+ :return: The node_selector of this V1Device. # noqa: E501
+ :rtype: V1NodeSelector
+ """
+ return self._node_selector
+
+ @node_selector.setter
+ def node_selector(self, node_selector):
+ """Sets the node_selector of this V1Device.
+
+
+ :param node_selector: The node_selector of this V1Device. # noqa: E501
+ :type: V1NodeSelector
+ """
+
+ self._node_selector = node_selector
+
+ @property
+ def taints(self):
+ """Gets the taints of this V1Device. # noqa: E501
+
+ If specified, these are the driver-defined taints. The maximum number of taints is 4. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
+
+ :return: The taints of this V1Device. # noqa: E501
+ :rtype: list[V1DeviceTaint]
+ """
+ return self._taints
+
+ @taints.setter
+ def taints(self, taints):
+ """Sets the taints of this V1Device.
+
+ If specified, these are the driver-defined taints. The maximum number of taints is 4. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
+
+ :param taints: The taints of this V1Device. # noqa: E501
+ :type: list[V1DeviceTaint]
+ """
+
+ self._taints = taints
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1Device):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1Device):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_allocation_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_allocation_configuration.py
index 4fa7345fe2d..39977c79cc7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_allocation_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_allocation_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceAllocationConfiguration(object):
+class V1DeviceAllocationConfiguration(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,7 +33,7 @@ class V1alpha3DeviceAllocationConfiguration(object):
and the value is json key in definition.
"""
openapi_types = {
- 'opaque': 'V1alpha3OpaqueDeviceConfiguration',
+ 'opaque': 'V1OpaqueDeviceConfiguration',
'requests': 'list[str]',
'source': 'str'
}
@@ -45,7 +45,7 @@ class V1alpha3DeviceAllocationConfiguration(object):
}
def __init__(self, opaque=None, requests=None, source=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceAllocationConfiguration - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceAllocationConfiguration - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -63,43 +63,43 @@ class V1alpha3DeviceAllocationConfiguration(object):
@property
def opaque(self):
- """Gets the opaque of this V1alpha3DeviceAllocationConfiguration. # noqa: E501
+ """Gets the opaque of this V1DeviceAllocationConfiguration. # noqa: E501
- :return: The opaque of this V1alpha3DeviceAllocationConfiguration. # noqa: E501
- :rtype: V1alpha3OpaqueDeviceConfiguration
+ :return: The opaque of this V1DeviceAllocationConfiguration. # noqa: E501
+ :rtype: V1OpaqueDeviceConfiguration
"""
return self._opaque
@opaque.setter
def opaque(self, opaque):
- """Sets the opaque of this V1alpha3DeviceAllocationConfiguration.
+ """Sets the opaque of this V1DeviceAllocationConfiguration.
- :param opaque: The opaque of this V1alpha3DeviceAllocationConfiguration. # noqa: E501
- :type: V1alpha3OpaqueDeviceConfiguration
+ :param opaque: The opaque of this V1DeviceAllocationConfiguration. # noqa: E501
+ :type: V1OpaqueDeviceConfiguration
"""
self._opaque = opaque
@property
def requests(self):
- """Gets the requests of this V1alpha3DeviceAllocationConfiguration. # noqa: E501
+ """Gets the requests of this V1DeviceAllocationConfiguration. # noqa: E501
Requests lists the names of requests where the configuration applies. If empty, its applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the configuration applies to all subrequests. # noqa: E501
- :return: The requests of this V1alpha3DeviceAllocationConfiguration. # noqa: E501
+ :return: The requests of this V1DeviceAllocationConfiguration. # noqa: E501
:rtype: list[str]
"""
return self._requests
@requests.setter
def requests(self, requests):
- """Sets the requests of this V1alpha3DeviceAllocationConfiguration.
+ """Sets the requests of this V1DeviceAllocationConfiguration.
Requests lists the names of requests where the configuration applies. If empty, its applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the configuration applies to all subrequests. # noqa: E501
- :param requests: The requests of this V1alpha3DeviceAllocationConfiguration. # noqa: E501
+ :param requests: The requests of this V1DeviceAllocationConfiguration. # noqa: E501
:type: list[str]
"""
@@ -107,22 +107,22 @@ class V1alpha3DeviceAllocationConfiguration(object):
@property
def source(self):
- """Gets the source of this V1alpha3DeviceAllocationConfiguration. # noqa: E501
+ """Gets the source of this V1DeviceAllocationConfiguration. # noqa: E501
Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim. # noqa: E501
- :return: The source of this V1alpha3DeviceAllocationConfiguration. # noqa: E501
+ :return: The source of this V1DeviceAllocationConfiguration. # noqa: E501
:rtype: str
"""
return self._source
@source.setter
def source(self, source):
- """Sets the source of this V1alpha3DeviceAllocationConfiguration.
+ """Sets the source of this V1DeviceAllocationConfiguration.
Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim. # noqa: E501
- :param source: The source of this V1alpha3DeviceAllocationConfiguration. # noqa: E501
+ :param source: The source of this V1DeviceAllocationConfiguration. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and source is None: # noqa: E501
@@ -164,14 +164,14 @@ class V1alpha3DeviceAllocationConfiguration(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceAllocationConfiguration):
+ if not isinstance(other, V1DeviceAllocationConfiguration):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceAllocationConfiguration):
+ if not isinstance(other, V1DeviceAllocationConfiguration):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_allocation_result.py
index 77d98ed200b..0296674a9c6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_allocation_result.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceAllocationResult(object):
+class V1DeviceAllocationResult(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,8 +33,8 @@ class V1alpha3DeviceAllocationResult(object):
and the value is json key in definition.
"""
openapi_types = {
- 'config': 'list[V1alpha3DeviceAllocationConfiguration]',
- 'results': 'list[V1alpha3DeviceRequestAllocationResult]'
+ 'config': 'list[V1DeviceAllocationConfiguration]',
+ 'results': 'list[V1DeviceRequestAllocationResult]'
}
attribute_map = {
@@ -43,7 +43,7 @@ class V1alpha3DeviceAllocationResult(object):
}
def __init__(self, config=None, results=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceAllocationResult - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceAllocationResult - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -59,46 +59,46 @@ class V1alpha3DeviceAllocationResult(object):
@property
def config(self):
- """Gets the config of this V1alpha3DeviceAllocationResult. # noqa: E501
+ """Gets the config of this V1DeviceAllocationResult. # noqa: E501
This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag. This includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters. # noqa: E501
- :return: The config of this V1alpha3DeviceAllocationResult. # noqa: E501
- :rtype: list[V1alpha3DeviceAllocationConfiguration]
+ :return: The config of this V1DeviceAllocationResult. # noqa: E501
+ :rtype: list[V1DeviceAllocationConfiguration]
"""
return self._config
@config.setter
def config(self, config):
- """Sets the config of this V1alpha3DeviceAllocationResult.
+ """Sets the config of this V1DeviceAllocationResult.
This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag. This includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters. # noqa: E501
- :param config: The config of this V1alpha3DeviceAllocationResult. # noqa: E501
- :type: list[V1alpha3DeviceAllocationConfiguration]
+ :param config: The config of this V1DeviceAllocationResult. # noqa: E501
+ :type: list[V1DeviceAllocationConfiguration]
"""
self._config = config
@property
def results(self):
- """Gets the results of this V1alpha3DeviceAllocationResult. # noqa: E501
+ """Gets the results of this V1DeviceAllocationResult. # noqa: E501
Results lists all allocated devices. # noqa: E501
- :return: The results of this V1alpha3DeviceAllocationResult. # noqa: E501
- :rtype: list[V1alpha3DeviceRequestAllocationResult]
+ :return: The results of this V1DeviceAllocationResult. # noqa: E501
+ :rtype: list[V1DeviceRequestAllocationResult]
"""
return self._results
@results.setter
def results(self, results):
- """Sets the results of this V1alpha3DeviceAllocationResult.
+ """Sets the results of this V1DeviceAllocationResult.
Results lists all allocated devices. # noqa: E501
- :param results: The results of this V1alpha3DeviceAllocationResult. # noqa: E501
- :type: list[V1alpha3DeviceRequestAllocationResult]
+ :param results: The results of this V1DeviceAllocationResult. # noqa: E501
+ :type: list[V1DeviceRequestAllocationResult]
"""
self._results = results
@@ -137,14 +137,14 @@ class V1alpha3DeviceAllocationResult(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceAllocationResult):
+ if not isinstance(other, V1DeviceAllocationResult):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceAllocationResult):
+ if not isinstance(other, V1DeviceAllocationResult):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_attribute.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_attribute.py
index 7551a821954..1f5701c9bd0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_attribute.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_attribute.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceAttribute(object):
+class V1DeviceAttribute(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -47,7 +47,7 @@ class V1alpha3DeviceAttribute(object):
}
def __init__(self, bool=None, int=None, string=None, version=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceAttribute - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceAttribute - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -69,22 +69,22 @@ class V1alpha3DeviceAttribute(object):
@property
def bool(self):
- """Gets the bool of this V1alpha3DeviceAttribute. # noqa: E501
+ """Gets the bool of this V1DeviceAttribute. # noqa: E501
BoolValue is a true/false value. # noqa: E501
- :return: The bool of this V1alpha3DeviceAttribute. # noqa: E501
+ :return: The bool of this V1DeviceAttribute. # noqa: E501
:rtype: bool
"""
return self._bool
@bool.setter
def bool(self, bool):
- """Sets the bool of this V1alpha3DeviceAttribute.
+ """Sets the bool of this V1DeviceAttribute.
BoolValue is a true/false value. # noqa: E501
- :param bool: The bool of this V1alpha3DeviceAttribute. # noqa: E501
+ :param bool: The bool of this V1DeviceAttribute. # noqa: E501
:type: bool
"""
@@ -92,22 +92,22 @@ class V1alpha3DeviceAttribute(object):
@property
def int(self):
- """Gets the int of this V1alpha3DeviceAttribute. # noqa: E501
+ """Gets the int of this V1DeviceAttribute. # noqa: E501
IntValue is a number. # noqa: E501
- :return: The int of this V1alpha3DeviceAttribute. # noqa: E501
+ :return: The int of this V1DeviceAttribute. # noqa: E501
:rtype: int
"""
return self._int
@int.setter
def int(self, int):
- """Sets the int of this V1alpha3DeviceAttribute.
+ """Sets the int of this V1DeviceAttribute.
IntValue is a number. # noqa: E501
- :param int: The int of this V1alpha3DeviceAttribute. # noqa: E501
+ :param int: The int of this V1DeviceAttribute. # noqa: E501
:type: int
"""
@@ -115,22 +115,22 @@ class V1alpha3DeviceAttribute(object):
@property
def string(self):
- """Gets the string of this V1alpha3DeviceAttribute. # noqa: E501
+ """Gets the string of this V1DeviceAttribute. # noqa: E501
StringValue is a string. Must not be longer than 64 characters. # noqa: E501
- :return: The string of this V1alpha3DeviceAttribute. # noqa: E501
+ :return: The string of this V1DeviceAttribute. # noqa: E501
:rtype: str
"""
return self._string
@string.setter
def string(self, string):
- """Sets the string of this V1alpha3DeviceAttribute.
+ """Sets the string of this V1DeviceAttribute.
StringValue is a string. Must not be longer than 64 characters. # noqa: E501
- :param string: The string of this V1alpha3DeviceAttribute. # noqa: E501
+ :param string: The string of this V1DeviceAttribute. # noqa: E501
:type: str
"""
@@ -138,22 +138,22 @@ class V1alpha3DeviceAttribute(object):
@property
def version(self):
- """Gets the version of this V1alpha3DeviceAttribute. # noqa: E501
+ """Gets the version of this V1DeviceAttribute. # noqa: E501
VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters. # noqa: E501
- :return: The version of this V1alpha3DeviceAttribute. # noqa: E501
+ :return: The version of this V1DeviceAttribute. # noqa: E501
:rtype: str
"""
return self._version
@version.setter
def version(self, version):
- """Sets the version of this V1alpha3DeviceAttribute.
+ """Sets the version of this V1DeviceAttribute.
VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters. # noqa: E501
- :param version: The version of this V1alpha3DeviceAttribute. # noqa: E501
+ :param version: The version of this V1DeviceAttribute. # noqa: E501
:type: str
"""
@@ -193,14 +193,14 @@ class V1alpha3DeviceAttribute(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceAttribute):
+ if not isinstance(other, V1DeviceAttribute):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceAttribute):
+ if not isinstance(other, V1DeviceAttribute):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_device_capacity.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_capacity.py
new file mode 100644
index 00000000000..ed46a090722
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_capacity.py
@@ -0,0 +1,149 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1DeviceCapacity(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'request_policy': 'V1CapacityRequestPolicy',
+ 'value': 'str'
+ }
+
+ attribute_map = {
+ 'request_policy': 'requestPolicy',
+ 'value': 'value'
+ }
+
+ def __init__(self, request_policy=None, value=None, local_vars_configuration=None): # noqa: E501
+ """V1DeviceCapacity - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._request_policy = None
+ self._value = None
+ self.discriminator = None
+
+ if request_policy is not None:
+ self.request_policy = request_policy
+ self.value = value
+
+ @property
+ def request_policy(self):
+ """Gets the request_policy of this V1DeviceCapacity. # noqa: E501
+
+
+ :return: The request_policy of this V1DeviceCapacity. # noqa: E501
+ :rtype: V1CapacityRequestPolicy
+ """
+ return self._request_policy
+
+ @request_policy.setter
+ def request_policy(self, request_policy):
+ """Sets the request_policy of this V1DeviceCapacity.
+
+
+ :param request_policy: The request_policy of this V1DeviceCapacity. # noqa: E501
+ :type: V1CapacityRequestPolicy
+ """
+
+ self._request_policy = request_policy
+
+ @property
+ def value(self):
+ """Gets the value of this V1DeviceCapacity. # noqa: E501
+
+ Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value. # noqa: E501
+
+ :return: The value of this V1DeviceCapacity. # noqa: E501
+ :rtype: str
+ """
+ return self._value
+
+ @value.setter
+ def value(self, value):
+ """Sets the value of this V1DeviceCapacity.
+
+ Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value. # noqa: E501
+
+ :param value: The value of this V1DeviceCapacity. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501
+ raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501
+
+ self._value = value
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1DeviceCapacity):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1DeviceCapacity):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_claim.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_claim.py
index 81f5dac16f7..542c611d671 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_claim.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceClaim(object):
+class V1DeviceClaim(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,9 +33,9 @@ class V1alpha3DeviceClaim(object):
and the value is json key in definition.
"""
openapi_types = {
- 'config': 'list[V1alpha3DeviceClaimConfiguration]',
- 'constraints': 'list[V1alpha3DeviceConstraint]',
- 'requests': 'list[V1alpha3DeviceRequest]'
+ 'config': 'list[V1DeviceClaimConfiguration]',
+ 'constraints': 'list[V1DeviceConstraint]',
+ 'requests': 'list[V1DeviceRequest]'
}
attribute_map = {
@@ -45,7 +45,7 @@ class V1alpha3DeviceClaim(object):
}
def __init__(self, config=None, constraints=None, requests=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceClaim - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceClaim - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -64,69 +64,69 @@ class V1alpha3DeviceClaim(object):
@property
def config(self):
- """Gets the config of this V1alpha3DeviceClaim. # noqa: E501
+ """Gets the config of this V1DeviceClaim. # noqa: E501
This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim. # noqa: E501
- :return: The config of this V1alpha3DeviceClaim. # noqa: E501
- :rtype: list[V1alpha3DeviceClaimConfiguration]
+ :return: The config of this V1DeviceClaim. # noqa: E501
+ :rtype: list[V1DeviceClaimConfiguration]
"""
return self._config
@config.setter
def config(self, config):
- """Sets the config of this V1alpha3DeviceClaim.
+ """Sets the config of this V1DeviceClaim.
This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim. # noqa: E501
- :param config: The config of this V1alpha3DeviceClaim. # noqa: E501
- :type: list[V1alpha3DeviceClaimConfiguration]
+ :param config: The config of this V1DeviceClaim. # noqa: E501
+ :type: list[V1DeviceClaimConfiguration]
"""
self._config = config
@property
def constraints(self):
- """Gets the constraints of this V1alpha3DeviceClaim. # noqa: E501
+ """Gets the constraints of this V1DeviceClaim. # noqa: E501
These constraints must be satisfied by the set of devices that get allocated for the claim. # noqa: E501
- :return: The constraints of this V1alpha3DeviceClaim. # noqa: E501
- :rtype: list[V1alpha3DeviceConstraint]
+ :return: The constraints of this V1DeviceClaim. # noqa: E501
+ :rtype: list[V1DeviceConstraint]
"""
return self._constraints
@constraints.setter
def constraints(self, constraints):
- """Sets the constraints of this V1alpha3DeviceClaim.
+ """Sets the constraints of this V1DeviceClaim.
These constraints must be satisfied by the set of devices that get allocated for the claim. # noqa: E501
- :param constraints: The constraints of this V1alpha3DeviceClaim. # noqa: E501
- :type: list[V1alpha3DeviceConstraint]
+ :param constraints: The constraints of this V1DeviceClaim. # noqa: E501
+ :type: list[V1DeviceConstraint]
"""
self._constraints = constraints
@property
def requests(self):
- """Gets the requests of this V1alpha3DeviceClaim. # noqa: E501
+ """Gets the requests of this V1DeviceClaim. # noqa: E501
Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated. # noqa: E501
- :return: The requests of this V1alpha3DeviceClaim. # noqa: E501
- :rtype: list[V1alpha3DeviceRequest]
+ :return: The requests of this V1DeviceClaim. # noqa: E501
+ :rtype: list[V1DeviceRequest]
"""
return self._requests
@requests.setter
def requests(self, requests):
- """Sets the requests of this V1alpha3DeviceClaim.
+ """Sets the requests of this V1DeviceClaim.
Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated. # noqa: E501
- :param requests: The requests of this V1alpha3DeviceClaim. # noqa: E501
- :type: list[V1alpha3DeviceRequest]
+ :param requests: The requests of this V1DeviceClaim. # noqa: E501
+ :type: list[V1DeviceRequest]
"""
self._requests = requests
@@ -165,14 +165,14 @@ class V1alpha3DeviceClaim(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceClaim):
+ if not isinstance(other, V1DeviceClaim):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceClaim):
+ if not isinstance(other, V1DeviceClaim):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_claim_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_claim_configuration.py
index d8e81d282e1..7d1622384fc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_claim_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_claim_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceClaimConfiguration(object):
+class V1DeviceClaimConfiguration(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,7 +33,7 @@ class V1alpha3DeviceClaimConfiguration(object):
and the value is json key in definition.
"""
openapi_types = {
- 'opaque': 'V1alpha3OpaqueDeviceConfiguration',
+ 'opaque': 'V1OpaqueDeviceConfiguration',
'requests': 'list[str]'
}
@@ -43,7 +43,7 @@ class V1alpha3DeviceClaimConfiguration(object):
}
def __init__(self, opaque=None, requests=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceClaimConfiguration - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceClaimConfiguration - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -59,43 +59,43 @@ class V1alpha3DeviceClaimConfiguration(object):
@property
def opaque(self):
- """Gets the opaque of this V1alpha3DeviceClaimConfiguration. # noqa: E501
+ """Gets the opaque of this V1DeviceClaimConfiguration. # noqa: E501
- :return: The opaque of this V1alpha3DeviceClaimConfiguration. # noqa: E501
- :rtype: V1alpha3OpaqueDeviceConfiguration
+ :return: The opaque of this V1DeviceClaimConfiguration. # noqa: E501
+ :rtype: V1OpaqueDeviceConfiguration
"""
return self._opaque
@opaque.setter
def opaque(self, opaque):
- """Sets the opaque of this V1alpha3DeviceClaimConfiguration.
+ """Sets the opaque of this V1DeviceClaimConfiguration.
- :param opaque: The opaque of this V1alpha3DeviceClaimConfiguration. # noqa: E501
- :type: V1alpha3OpaqueDeviceConfiguration
+ :param opaque: The opaque of this V1DeviceClaimConfiguration. # noqa: E501
+ :type: V1OpaqueDeviceConfiguration
"""
self._opaque = opaque
@property
def requests(self):
- """Gets the requests of this V1alpha3DeviceClaimConfiguration. # noqa: E501
+ """Gets the requests of this V1DeviceClaimConfiguration. # noqa: E501
Requests lists the names of requests where the configuration applies. If empty, it applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the configuration applies to all subrequests. # noqa: E501
- :return: The requests of this V1alpha3DeviceClaimConfiguration. # noqa: E501
+ :return: The requests of this V1DeviceClaimConfiguration. # noqa: E501
:rtype: list[str]
"""
return self._requests
@requests.setter
def requests(self, requests):
- """Sets the requests of this V1alpha3DeviceClaimConfiguration.
+ """Sets the requests of this V1DeviceClaimConfiguration.
Requests lists the names of requests where the configuration applies. If empty, it applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the configuration applies to all subrequests. # noqa: E501
- :param requests: The requests of this V1alpha3DeviceClaimConfiguration. # noqa: E501
+ :param requests: The requests of this V1DeviceClaimConfiguration. # noqa: E501
:type: list[str]
"""
@@ -135,14 +135,14 @@ class V1alpha3DeviceClaimConfiguration(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceClaimConfiguration):
+ if not isinstance(other, V1DeviceClaimConfiguration):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceClaimConfiguration):
+ if not isinstance(other, V1DeviceClaimConfiguration):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_slice.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_class.py
index a157521eb08..f1c37fdffa7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_slice.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_class.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceSlice(object):
+class V1DeviceClass(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -36,7 +36,7 @@ class V1alpha3ResourceSlice(object):
'api_version': 'str',
'kind': 'str',
'metadata': 'V1ObjectMeta',
- 'spec': 'V1alpha3ResourceSliceSpec'
+ 'spec': 'V1DeviceClassSpec'
}
attribute_map = {
@@ -47,7 +47,7 @@ class V1alpha3ResourceSlice(object):
}
def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceSlice - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceClass - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +68,22 @@ class V1alpha3ResourceSlice(object):
@property
def api_version(self):
- """Gets the api_version of this V1alpha3ResourceSlice. # noqa: E501
+ """Gets the api_version of this V1DeviceClass. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1alpha3ResourceSlice. # noqa: E501
+ :return: The api_version of this V1DeviceClass. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1alpha3ResourceSlice.
+ """Sets the api_version of this V1DeviceClass.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1alpha3ResourceSlice. # noqa: E501
+ :param api_version: The api_version of this V1DeviceClass. # noqa: E501
:type: str
"""
@@ -91,22 +91,22 @@ class V1alpha3ResourceSlice(object):
@property
def kind(self):
- """Gets the kind of this V1alpha3ResourceSlice. # noqa: E501
+ """Gets the kind of this V1DeviceClass. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1alpha3ResourceSlice. # noqa: E501
+ :return: The kind of this V1DeviceClass. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1alpha3ResourceSlice.
+ """Sets the kind of this V1DeviceClass.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1alpha3ResourceSlice. # noqa: E501
+ :param kind: The kind of this V1DeviceClass. # noqa: E501
:type: str
"""
@@ -114,20 +114,20 @@ class V1alpha3ResourceSlice(object):
@property
def metadata(self):
- """Gets the metadata of this V1alpha3ResourceSlice. # noqa: E501
+ """Gets the metadata of this V1DeviceClass. # noqa: E501
- :return: The metadata of this V1alpha3ResourceSlice. # noqa: E501
+ :return: The metadata of this V1DeviceClass. # noqa: E501
:rtype: V1ObjectMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1alpha3ResourceSlice.
+ """Sets the metadata of this V1DeviceClass.
- :param metadata: The metadata of this V1alpha3ResourceSlice. # noqa: E501
+ :param metadata: The metadata of this V1DeviceClass. # noqa: E501
:type: V1ObjectMeta
"""
@@ -135,21 +135,21 @@ class V1alpha3ResourceSlice(object):
@property
def spec(self):
- """Gets the spec of this V1alpha3ResourceSlice. # noqa: E501
+ """Gets the spec of this V1DeviceClass. # noqa: E501
- :return: The spec of this V1alpha3ResourceSlice. # noqa: E501
- :rtype: V1alpha3ResourceSliceSpec
+ :return: The spec of this V1DeviceClass. # noqa: E501
+ :rtype: V1DeviceClassSpec
"""
return self._spec
@spec.setter
def spec(self, spec):
- """Sets the spec of this V1alpha3ResourceSlice.
+ """Sets the spec of this V1DeviceClass.
- :param spec: The spec of this V1alpha3ResourceSlice. # noqa: E501
- :type: V1alpha3ResourceSliceSpec
+ :param spec: The spec of this V1DeviceClass. # noqa: E501
+ :type: V1DeviceClassSpec
"""
if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501
raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501
@@ -190,14 +190,14 @@ class V1alpha3ResourceSlice(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceSlice):
+ if not isinstance(other, V1DeviceClass):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceSlice):
+ if not isinstance(other, V1DeviceClass):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_class_configuration.py
index 221e0a8ba8f..f2ca5b7cd49 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_class_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceClassConfiguration(object):
+class V1DeviceClassConfiguration(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,7 +33,7 @@ class V1alpha3DeviceClassConfiguration(object):
and the value is json key in definition.
"""
openapi_types = {
- 'opaque': 'V1alpha3OpaqueDeviceConfiguration'
+ 'opaque': 'V1OpaqueDeviceConfiguration'
}
attribute_map = {
@@ -41,7 +41,7 @@ class V1alpha3DeviceClassConfiguration(object):
}
def __init__(self, opaque=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceClassConfiguration - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceClassConfiguration - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -54,21 +54,21 @@ class V1alpha3DeviceClassConfiguration(object):
@property
def opaque(self):
- """Gets the opaque of this V1alpha3DeviceClassConfiguration. # noqa: E501
+ """Gets the opaque of this V1DeviceClassConfiguration. # noqa: E501
- :return: The opaque of this V1alpha3DeviceClassConfiguration. # noqa: E501
- :rtype: V1alpha3OpaqueDeviceConfiguration
+ :return: The opaque of this V1DeviceClassConfiguration. # noqa: E501
+ :rtype: V1OpaqueDeviceConfiguration
"""
return self._opaque
@opaque.setter
def opaque(self, opaque):
- """Sets the opaque of this V1alpha3DeviceClassConfiguration.
+ """Sets the opaque of this V1DeviceClassConfiguration.
- :param opaque: The opaque of this V1alpha3DeviceClassConfiguration. # noqa: E501
- :type: V1alpha3OpaqueDeviceConfiguration
+ :param opaque: The opaque of this V1DeviceClassConfiguration. # noqa: E501
+ :type: V1OpaqueDeviceConfiguration
"""
self._opaque = opaque
@@ -107,14 +107,14 @@ class V1alpha3DeviceClassConfiguration(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceClassConfiguration):
+ if not isinstance(other, V1DeviceClassConfiguration):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceClassConfiguration):
+ if not isinstance(other, V1DeviceClassConfiguration):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_class_list.py
index 6b0b98483b9..25e79a8f509 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_class_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceClassList(object):
+class V1DeviceClassList(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,7 +34,7 @@ class V1alpha3DeviceClassList(object):
"""
openapi_types = {
'api_version': 'str',
- 'items': 'list[V1alpha3DeviceClass]',
+ 'items': 'list[V1DeviceClass]',
'kind': 'str',
'metadata': 'V1ListMeta'
}
@@ -47,7 +47,7 @@ class V1alpha3DeviceClassList(object):
}
def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceClassList - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceClassList - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +68,22 @@ class V1alpha3DeviceClassList(object):
@property
def api_version(self):
- """Gets the api_version of this V1alpha3DeviceClassList. # noqa: E501
+ """Gets the api_version of this V1DeviceClassList. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1alpha3DeviceClassList. # noqa: E501
+ :return: The api_version of this V1DeviceClassList. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1alpha3DeviceClassList.
+ """Sets the api_version of this V1DeviceClassList.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1alpha3DeviceClassList. # noqa: E501
+ :param api_version: The api_version of this V1DeviceClassList. # noqa: E501
:type: str
"""
@@ -91,23 +91,23 @@ class V1alpha3DeviceClassList(object):
@property
def items(self):
- """Gets the items of this V1alpha3DeviceClassList. # noqa: E501
+ """Gets the items of this V1DeviceClassList. # noqa: E501
Items is the list of resource classes. # noqa: E501
- :return: The items of this V1alpha3DeviceClassList. # noqa: E501
- :rtype: list[V1alpha3DeviceClass]
+ :return: The items of this V1DeviceClassList. # noqa: E501
+ :rtype: list[V1DeviceClass]
"""
return self._items
@items.setter
def items(self, items):
- """Sets the items of this V1alpha3DeviceClassList.
+ """Sets the items of this V1DeviceClassList.
Items is the list of resource classes. # noqa: E501
- :param items: The items of this V1alpha3DeviceClassList. # noqa: E501
- :type: list[V1alpha3DeviceClass]
+ :param items: The items of this V1DeviceClassList. # noqa: E501
+ :type: list[V1DeviceClass]
"""
if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501
raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501
@@ -116,22 +116,22 @@ class V1alpha3DeviceClassList(object):
@property
def kind(self):
- """Gets the kind of this V1alpha3DeviceClassList. # noqa: E501
+ """Gets the kind of this V1DeviceClassList. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1alpha3DeviceClassList. # noqa: E501
+ :return: The kind of this V1DeviceClassList. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1alpha3DeviceClassList.
+ """Sets the kind of this V1DeviceClassList.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1alpha3DeviceClassList. # noqa: E501
+ :param kind: The kind of this V1DeviceClassList. # noqa: E501
:type: str
"""
@@ -139,20 +139,20 @@ class V1alpha3DeviceClassList(object):
@property
def metadata(self):
- """Gets the metadata of this V1alpha3DeviceClassList. # noqa: E501
+ """Gets the metadata of this V1DeviceClassList. # noqa: E501
- :return: The metadata of this V1alpha3DeviceClassList. # noqa: E501
+ :return: The metadata of this V1DeviceClassList. # noqa: E501
:rtype: V1ListMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1alpha3DeviceClassList.
+ """Sets the metadata of this V1DeviceClassList.
- :param metadata: The metadata of this V1alpha3DeviceClassList. # noqa: E501
+ :param metadata: The metadata of this V1DeviceClassList. # noqa: E501
:type: V1ListMeta
"""
@@ -192,14 +192,14 @@ class V1alpha3DeviceClassList(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceClassList):
+ if not isinstance(other, V1DeviceClassList):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceClassList):
+ if not isinstance(other, V1DeviceClassList):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_class_spec.py
index fb370946292..6a565b97acf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_class_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceClassSpec(object):
+class V1DeviceClassSpec(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,72 +33,100 @@ class V1alpha3DeviceClassSpec(object):
and the value is json key in definition.
"""
openapi_types = {
- 'config': 'list[V1alpha3DeviceClassConfiguration]',
- 'selectors': 'list[V1alpha3DeviceSelector]'
+ 'config': 'list[V1DeviceClassConfiguration]',
+ 'extended_resource_name': 'str',
+ 'selectors': 'list[V1DeviceSelector]'
}
attribute_map = {
'config': 'config',
+ 'extended_resource_name': 'extendedResourceName',
'selectors': 'selectors'
}
- def __init__(self, config=None, selectors=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceClassSpec - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, config=None, extended_resource_name=None, selectors=None, local_vars_configuration=None): # noqa: E501
+ """V1DeviceClassSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._config = None
+ self._extended_resource_name = None
self._selectors = None
self.discriminator = None
if config is not None:
self.config = config
+ if extended_resource_name is not None:
+ self.extended_resource_name = extended_resource_name
if selectors is not None:
self.selectors = selectors
@property
def config(self):
- """Gets the config of this V1alpha3DeviceClassSpec. # noqa: E501
+ """Gets the config of this V1DeviceClassSpec. # noqa: E501
Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. They are passed to the driver, but are not considered while allocating the claim. # noqa: E501
- :return: The config of this V1alpha3DeviceClassSpec. # noqa: E501
- :rtype: list[V1alpha3DeviceClassConfiguration]
+ :return: The config of this V1DeviceClassSpec. # noqa: E501
+ :rtype: list[V1DeviceClassConfiguration]
"""
return self._config
@config.setter
def config(self, config):
- """Sets the config of this V1alpha3DeviceClassSpec.
+ """Sets the config of this V1DeviceClassSpec.
Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. They are passed to the driver, but are not considered while allocating the claim. # noqa: E501
- :param config: The config of this V1alpha3DeviceClassSpec. # noqa: E501
- :type: list[V1alpha3DeviceClassConfiguration]
+ :param config: The config of this V1DeviceClassSpec. # noqa: E501
+ :type: list[V1DeviceClassConfiguration]
"""
self._config = config
@property
+ def extended_resource_name(self):
+ """Gets the extended_resource_name of this V1DeviceClassSpec. # noqa: E501
+
+ ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E501
+
+ :return: The extended_resource_name of this V1DeviceClassSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._extended_resource_name
+
+ @extended_resource_name.setter
+ def extended_resource_name(self, extended_resource_name):
+ """Sets the extended_resource_name of this V1DeviceClassSpec.
+
+ ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E501
+
+ :param extended_resource_name: The extended_resource_name of this V1DeviceClassSpec. # noqa: E501
+ :type: str
+ """
+
+ self._extended_resource_name = extended_resource_name
+
+ @property
def selectors(self):
- """Gets the selectors of this V1alpha3DeviceClassSpec. # noqa: E501
+ """Gets the selectors of this V1DeviceClassSpec. # noqa: E501
Each selector must be satisfied by a device which is claimed via this class. # noqa: E501
- :return: The selectors of this V1alpha3DeviceClassSpec. # noqa: E501
- :rtype: list[V1alpha3DeviceSelector]
+ :return: The selectors of this V1DeviceClassSpec. # noqa: E501
+ :rtype: list[V1DeviceSelector]
"""
return self._selectors
@selectors.setter
def selectors(self, selectors):
- """Sets the selectors of this V1alpha3DeviceClassSpec.
+ """Sets the selectors of this V1DeviceClassSpec.
Each selector must be satisfied by a device which is claimed via this class. # noqa: E501
- :param selectors: The selectors of this V1alpha3DeviceClassSpec. # noqa: E501
- :type: list[V1alpha3DeviceSelector]
+ :param selectors: The selectors of this V1DeviceClassSpec. # noqa: E501
+ :type: list[V1DeviceSelector]
"""
self._selectors = selectors
@@ -137,14 +165,14 @@ class V1alpha3DeviceClassSpec(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceClassSpec):
+ if not isinstance(other, V1DeviceClassSpec):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceClassSpec):
+ if not isinstance(other, V1DeviceClassSpec):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_constraint.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_constraint.py
index 46fd71a00e4..6f84dc3fc38 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_constraint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_constraint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceConstraint(object):
+class V1DeviceConstraint(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,48 +33,76 @@ class V1alpha3DeviceConstraint(object):
and the value is json key in definition.
"""
openapi_types = {
+ 'distinct_attribute': 'str',
'match_attribute': 'str',
'requests': 'list[str]'
}
attribute_map = {
+ 'distinct_attribute': 'distinctAttribute',
'match_attribute': 'matchAttribute',
'requests': 'requests'
}
- def __init__(self, match_attribute=None, requests=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceConstraint - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, distinct_attribute=None, match_attribute=None, requests=None, local_vars_configuration=None): # noqa: E501
+ """V1DeviceConstraint - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._distinct_attribute = None
self._match_attribute = None
self._requests = None
self.discriminator = None
+ if distinct_attribute is not None:
+ self.distinct_attribute = distinct_attribute
if match_attribute is not None:
self.match_attribute = match_attribute
if requests is not None:
self.requests = requests
@property
+ def distinct_attribute(self):
+ """Gets the distinct_attribute of this V1DeviceConstraint. # noqa: E501
+
+ DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices. This acts as the inverse of MatchAttribute. This constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation. This is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs. # noqa: E501
+
+ :return: The distinct_attribute of this V1DeviceConstraint. # noqa: E501
+ :rtype: str
+ """
+ return self._distinct_attribute
+
+ @distinct_attribute.setter
+ def distinct_attribute(self, distinct_attribute):
+ """Sets the distinct_attribute of this V1DeviceConstraint.
+
+ DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices. This acts as the inverse of MatchAttribute. This constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation. This is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs. # noqa: E501
+
+ :param distinct_attribute: The distinct_attribute of this V1DeviceConstraint. # noqa: E501
+ :type: str
+ """
+
+ self._distinct_attribute = distinct_attribute
+
+ @property
def match_attribute(self):
- """Gets the match_attribute of this V1alpha3DeviceConstraint. # noqa: E501
+ """Gets the match_attribute of this V1DeviceConstraint. # noqa: E501
MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices. For example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen. Must include the domain qualifier. # noqa: E501
- :return: The match_attribute of this V1alpha3DeviceConstraint. # noqa: E501
+ :return: The match_attribute of this V1DeviceConstraint. # noqa: E501
:rtype: str
"""
return self._match_attribute
@match_attribute.setter
def match_attribute(self, match_attribute):
- """Sets the match_attribute of this V1alpha3DeviceConstraint.
+ """Sets the match_attribute of this V1DeviceConstraint.
MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices. For example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen. Must include the domain qualifier. # noqa: E501
- :param match_attribute: The match_attribute of this V1alpha3DeviceConstraint. # noqa: E501
+ :param match_attribute: The match_attribute of this V1DeviceConstraint. # noqa: E501
:type: str
"""
@@ -82,22 +110,22 @@ class V1alpha3DeviceConstraint(object):
@property
def requests(self):
- """Gets the requests of this V1alpha3DeviceConstraint. # noqa: E501
+ """Gets the requests of this V1DeviceConstraint. # noqa: E501
Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim. References to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the constraint applies to all subrequests. # noqa: E501
- :return: The requests of this V1alpha3DeviceConstraint. # noqa: E501
+ :return: The requests of this V1DeviceConstraint. # noqa: E501
:rtype: list[str]
"""
return self._requests
@requests.setter
def requests(self, requests):
- """Sets the requests of this V1alpha3DeviceConstraint.
+ """Sets the requests of this V1DeviceConstraint.
Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim. References to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the constraint applies to all subrequests. # noqa: E501
- :param requests: The requests of this V1alpha3DeviceConstraint. # noqa: E501
+ :param requests: The requests of this V1DeviceConstraint. # noqa: E501
:type: list[str]
"""
@@ -137,14 +165,14 @@ class V1alpha3DeviceConstraint(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceConstraint):
+ if not isinstance(other, V1DeviceConstraint):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceConstraint):
+ if not isinstance(other, V1DeviceConstraint):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_counter_consumption.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_counter_consumption.py
index 4ee5c2b8005..2d9ae202746 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_counter_consumption.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_counter_consumption.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceCounterConsumption(object):
+class V1DeviceCounterConsumption(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,7 +34,7 @@ class V1alpha3DeviceCounterConsumption(object):
"""
openapi_types = {
'counter_set': 'str',
- 'counters': 'dict(str, V1alpha3Counter)'
+ 'counters': 'dict(str, V1Counter)'
}
attribute_map = {
@@ -43,7 +43,7 @@ class V1alpha3DeviceCounterConsumption(object):
}
def __init__(self, counter_set=None, counters=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceCounterConsumption - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceCounterConsumption - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -57,22 +57,22 @@ class V1alpha3DeviceCounterConsumption(object):
@property
def counter_set(self):
- """Gets the counter_set of this V1alpha3DeviceCounterConsumption. # noqa: E501
+ """Gets the counter_set of this V1DeviceCounterConsumption. # noqa: E501
- CounterSet defines the set from which the counters defined will be consumed. # noqa: E501
+ CounterSet is the name of the set from which the counters defined will be consumed. # noqa: E501
- :return: The counter_set of this V1alpha3DeviceCounterConsumption. # noqa: E501
+ :return: The counter_set of this V1DeviceCounterConsumption. # noqa: E501
:rtype: str
"""
return self._counter_set
@counter_set.setter
def counter_set(self, counter_set):
- """Sets the counter_set of this V1alpha3DeviceCounterConsumption.
+ """Sets the counter_set of this V1DeviceCounterConsumption.
- CounterSet defines the set from which the counters defined will be consumed. # noqa: E501
+ CounterSet is the name of the set from which the counters defined will be consumed. # noqa: E501
- :param counter_set: The counter_set of this V1alpha3DeviceCounterConsumption. # noqa: E501
+ :param counter_set: The counter_set of this V1DeviceCounterConsumption. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and counter_set is None: # noqa: E501
@@ -82,23 +82,23 @@ class V1alpha3DeviceCounterConsumption(object):
@property
def counters(self):
- """Gets the counters of this V1alpha3DeviceCounterConsumption. # noqa: E501
+ """Gets the counters of this V1DeviceCounterConsumption. # noqa: E501
- Counters defines the Counter that will be consumed by the device. The maximum number counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each). # noqa: E501
+ Counters defines the counters that will be consumed by the device. The maximum number counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each). # noqa: E501
- :return: The counters of this V1alpha3DeviceCounterConsumption. # noqa: E501
- :rtype: dict(str, V1alpha3Counter)
+ :return: The counters of this V1DeviceCounterConsumption. # noqa: E501
+ :rtype: dict(str, V1Counter)
"""
return self._counters
@counters.setter
def counters(self, counters):
- """Sets the counters of this V1alpha3DeviceCounterConsumption.
+ """Sets the counters of this V1DeviceCounterConsumption.
- Counters defines the Counter that will be consumed by the device. The maximum number counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each). # noqa: E501
+ Counters defines the counters that will be consumed by the device. The maximum number counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each). # noqa: E501
- :param counters: The counters of this V1alpha3DeviceCounterConsumption. # noqa: E501
- :type: dict(str, V1alpha3Counter)
+ :param counters: The counters of this V1DeviceCounterConsumption. # noqa: E501
+ :type: dict(str, V1Counter)
"""
if self.local_vars_configuration.client_side_validation and counters is None: # noqa: E501
raise ValueError("Invalid value for `counters`, must not be `None`") # noqa: E501
@@ -139,14 +139,14 @@ class V1alpha3DeviceCounterConsumption(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceCounterConsumption):
+ if not isinstance(other, V1DeviceCounterConsumption):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceCounterConsumption):
+ if not isinstance(other, V1DeviceCounterConsumption):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_device_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_request.py
new file mode 100644
index 00000000000..be01eec4db0
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_request.py
@@ -0,0 +1,177 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1DeviceRequest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'exactly': 'V1ExactDeviceRequest',
+ 'first_available': 'list[V1DeviceSubRequest]',
+ 'name': 'str'
+ }
+
+ attribute_map = {
+ 'exactly': 'exactly',
+ 'first_available': 'firstAvailable',
+ 'name': 'name'
+ }
+
+ def __init__(self, exactly=None, first_available=None, name=None, local_vars_configuration=None): # noqa: E501
+ """V1DeviceRequest - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._exactly = None
+ self._first_available = None
+ self._name = None
+ self.discriminator = None
+
+ if exactly is not None:
+ self.exactly = exactly
+ if first_available is not None:
+ self.first_available = first_available
+ self.name = name
+
+ @property
+ def exactly(self):
+ """Gets the exactly of this V1DeviceRequest. # noqa: E501
+
+
+ :return: The exactly of this V1DeviceRequest. # noqa: E501
+ :rtype: V1ExactDeviceRequest
+ """
+ return self._exactly
+
+ @exactly.setter
+ def exactly(self, exactly):
+ """Sets the exactly of this V1DeviceRequest.
+
+
+ :param exactly: The exactly of this V1DeviceRequest. # noqa: E501
+ :type: V1ExactDeviceRequest
+ """
+
+ self._exactly = exactly
+
+ @property
+ def first_available(self):
+ """Gets the first_available of this V1DeviceRequest. # noqa: E501
+
+ FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one can not be used. DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later. # noqa: E501
+
+ :return: The first_available of this V1DeviceRequest. # noqa: E501
+ :rtype: list[V1DeviceSubRequest]
+ """
+ return self._first_available
+
+ @first_available.setter
+ def first_available(self, first_available):
+ """Sets the first_available of this V1DeviceRequest.
+
+ FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one can not be used. DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later. # noqa: E501
+
+ :param first_available: The first_available of this V1DeviceRequest. # noqa: E501
+ :type: list[V1DeviceSubRequest]
+ """
+
+ self._first_available = first_available
+
+ @property
+ def name(self):
+ """Gets the name of this V1DeviceRequest. # noqa: E501
+
+ Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. References using the name in the DeviceRequest will uniquely identify a request when the Exactly field is set. When the FirstAvailable field is set, a reference to the name of the DeviceRequest will match whatever subrequest is chosen by the scheduler. Must be a DNS label. # noqa: E501
+
+ :return: The name of this V1DeviceRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this V1DeviceRequest.
+
+ Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. References using the name in the DeviceRequest will uniquely identify a request when the Exactly field is set. When the FirstAvailable field is set, a reference to the name of the DeviceRequest will match whatever subrequest is chosen by the scheduler. Must be a DNS label. # noqa: E501
+
+ :param name: The name of this V1DeviceRequest. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
+ raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
+
+ self._name = name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1DeviceRequest):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1DeviceRequest):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_request_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_request_allocation_result.py
index 582bbbd9e8d..7c3f111fbcf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_request_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_request_allocation_result.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceRequestAllocationResult(object):
+class V1DeviceRequestAllocationResult(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,86 +34,175 @@ class V1alpha3DeviceRequestAllocationResult(object):
"""
openapi_types = {
'admin_access': 'bool',
+ 'binding_conditions': 'list[str]',
+ 'binding_failure_conditions': 'list[str]',
+ 'consumed_capacity': 'dict(str, str)',
'device': 'str',
'driver': 'str',
'pool': 'str',
'request': 'str',
- 'tolerations': 'list[V1alpha3DeviceToleration]'
+ 'share_id': 'str',
+ 'tolerations': 'list[V1DeviceToleration]'
}
attribute_map = {
'admin_access': 'adminAccess',
+ 'binding_conditions': 'bindingConditions',
+ 'binding_failure_conditions': 'bindingFailureConditions',
+ 'consumed_capacity': 'consumedCapacity',
'device': 'device',
'driver': 'driver',
'pool': 'pool',
'request': 'request',
+ 'share_id': 'shareID',
'tolerations': 'tolerations'
}
- def __init__(self, admin_access=None, device=None, driver=None, pool=None, request=None, tolerations=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceRequestAllocationResult - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, admin_access=None, binding_conditions=None, binding_failure_conditions=None, consumed_capacity=None, device=None, driver=None, pool=None, request=None, share_id=None, tolerations=None, local_vars_configuration=None): # noqa: E501
+ """V1DeviceRequestAllocationResult - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._admin_access = None
+ self._binding_conditions = None
+ self._binding_failure_conditions = None
+ self._consumed_capacity = None
self._device = None
self._driver = None
self._pool = None
self._request = None
+ self._share_id = None
self._tolerations = None
self.discriminator = None
if admin_access is not None:
self.admin_access = admin_access
+ if binding_conditions is not None:
+ self.binding_conditions = binding_conditions
+ if binding_failure_conditions is not None:
+ self.binding_failure_conditions = binding_failure_conditions
+ if consumed_capacity is not None:
+ self.consumed_capacity = consumed_capacity
self.device = device
self.driver = driver
self.pool = pool
self.request = request
+ if share_id is not None:
+ self.share_id = share_id
if tolerations is not None:
self.tolerations = tolerations
@property
def admin_access(self):
- """Gets the admin_access of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ """Gets the admin_access of this V1DeviceRequestAllocationResult. # noqa: E501
AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. # noqa: E501
- :return: The admin_access of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :return: The admin_access of this V1DeviceRequestAllocationResult. # noqa: E501
:rtype: bool
"""
return self._admin_access
@admin_access.setter
def admin_access(self, admin_access):
- """Sets the admin_access of this V1alpha3DeviceRequestAllocationResult.
+ """Sets the admin_access of this V1DeviceRequestAllocationResult.
AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. # noqa: E501
- :param admin_access: The admin_access of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :param admin_access: The admin_access of this V1DeviceRequestAllocationResult. # noqa: E501
:type: bool
"""
self._admin_access = admin_access
@property
+ def binding_conditions(self):
+ """Gets the binding_conditions of this V1DeviceRequestAllocationResult. # noqa: E501
+
+ BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_conditions of this V1DeviceRequestAllocationResult. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_conditions
+
+ @binding_conditions.setter
+ def binding_conditions(self, binding_conditions):
+ """Sets the binding_conditions of this V1DeviceRequestAllocationResult.
+
+ BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_conditions: The binding_conditions of this V1DeviceRequestAllocationResult. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_conditions = binding_conditions
+
+ @property
+ def binding_failure_conditions(self):
+ """Gets the binding_failure_conditions of this V1DeviceRequestAllocationResult. # noqa: E501
+
+ BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_failure_conditions of this V1DeviceRequestAllocationResult. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_failure_conditions
+
+ @binding_failure_conditions.setter
+ def binding_failure_conditions(self, binding_failure_conditions):
+ """Sets the binding_failure_conditions of this V1DeviceRequestAllocationResult.
+
+ BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_failure_conditions: The binding_failure_conditions of this V1DeviceRequestAllocationResult. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_failure_conditions = binding_failure_conditions
+
+ @property
+ def consumed_capacity(self):
+ """Gets the consumed_capacity of this V1DeviceRequestAllocationResult. # noqa: E501
+
+ ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). The total consumed capacity for each device must not exceed the DeviceCapacity's Value. This field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero. # noqa: E501
+
+ :return: The consumed_capacity of this V1DeviceRequestAllocationResult. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._consumed_capacity
+
+ @consumed_capacity.setter
+ def consumed_capacity(self, consumed_capacity):
+ """Sets the consumed_capacity of this V1DeviceRequestAllocationResult.
+
+ ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). The total consumed capacity for each device must not exceed the DeviceCapacity's Value. This field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero. # noqa: E501
+
+ :param consumed_capacity: The consumed_capacity of this V1DeviceRequestAllocationResult. # noqa: E501
+ :type: dict(str, str)
+ """
+
+ self._consumed_capacity = consumed_capacity
+
+ @property
def device(self):
- """Gets the device of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ """Gets the device of this V1DeviceRequestAllocationResult. # noqa: E501
Device references one device instance via its name in the driver's resource pool. It must be a DNS label. # noqa: E501
- :return: The device of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :return: The device of this V1DeviceRequestAllocationResult. # noqa: E501
:rtype: str
"""
return self._device
@device.setter
def device(self, device):
- """Sets the device of this V1alpha3DeviceRequestAllocationResult.
+ """Sets the device of this V1DeviceRequestAllocationResult.
Device references one device instance via its name in the driver's resource pool. It must be a DNS label. # noqa: E501
- :param device: The device of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :param device: The device of this V1DeviceRequestAllocationResult. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and device is None: # noqa: E501
@@ -123,22 +212,22 @@ class V1alpha3DeviceRequestAllocationResult(object):
@property
def driver(self):
- """Gets the driver of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ """Gets the driver of this V1DeviceRequestAllocationResult. # noqa: E501
Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. # noqa: E501
- :return: The driver of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :return: The driver of this V1DeviceRequestAllocationResult. # noqa: E501
:rtype: str
"""
return self._driver
@driver.setter
def driver(self, driver):
- """Sets the driver of this V1alpha3DeviceRequestAllocationResult.
+ """Sets the driver of this V1DeviceRequestAllocationResult.
Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. # noqa: E501
- :param driver: The driver of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :param driver: The driver of this V1DeviceRequestAllocationResult. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and driver is None: # noqa: E501
@@ -148,22 +237,22 @@ class V1alpha3DeviceRequestAllocationResult(object):
@property
def pool(self):
- """Gets the pool of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ """Gets the pool of this V1DeviceRequestAllocationResult. # noqa: E501
This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. # noqa: E501
- :return: The pool of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :return: The pool of this V1DeviceRequestAllocationResult. # noqa: E501
:rtype: str
"""
return self._pool
@pool.setter
def pool(self, pool):
- """Sets the pool of this V1alpha3DeviceRequestAllocationResult.
+ """Sets the pool of this V1DeviceRequestAllocationResult.
This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. # noqa: E501
- :param pool: The pool of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :param pool: The pool of this V1DeviceRequestAllocationResult. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and pool is None: # noqa: E501
@@ -173,22 +262,22 @@ class V1alpha3DeviceRequestAllocationResult(object):
@property
def request(self):
- """Gets the request of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ """Gets the request of this V1DeviceRequestAllocationResult. # noqa: E501
Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format <main request>/<subrequest>. Multiple devices may have been allocated per request. # noqa: E501
- :return: The request of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :return: The request of this V1DeviceRequestAllocationResult. # noqa: E501
:rtype: str
"""
return self._request
@request.setter
def request(self, request):
- """Sets the request of this V1alpha3DeviceRequestAllocationResult.
+ """Sets the request of this V1DeviceRequestAllocationResult.
Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format <main request>/<subrequest>. Multiple devices may have been allocated per request. # noqa: E501
- :param request: The request of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ :param request: The request of this V1DeviceRequestAllocationResult. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and request is None: # noqa: E501
@@ -197,24 +286,47 @@ class V1alpha3DeviceRequestAllocationResult(object):
self._request = request
@property
+ def share_id(self):
+ """Gets the share_id of this V1DeviceRequestAllocationResult. # noqa: E501
+
+ ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device. # noqa: E501
+
+ :return: The share_id of this V1DeviceRequestAllocationResult. # noqa: E501
+ :rtype: str
+ """
+ return self._share_id
+
+ @share_id.setter
+ def share_id(self, share_id):
+ """Sets the share_id of this V1DeviceRequestAllocationResult.
+
+ ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device. # noqa: E501
+
+ :param share_id: The share_id of this V1DeviceRequestAllocationResult. # noqa: E501
+ :type: str
+ """
+
+ self._share_id = share_id
+
+ @property
def tolerations(self):
- """Gets the tolerations of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
+ """Gets the tolerations of this V1DeviceRequestAllocationResult. # noqa: E501
A copy of all tolerations specified in the request at the time when the device got allocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
- :return: The tolerations of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
- :rtype: list[V1alpha3DeviceToleration]
+ :return: The tolerations of this V1DeviceRequestAllocationResult. # noqa: E501
+ :rtype: list[V1DeviceToleration]
"""
return self._tolerations
@tolerations.setter
def tolerations(self, tolerations):
- """Sets the tolerations of this V1alpha3DeviceRequestAllocationResult.
+ """Sets the tolerations of this V1DeviceRequestAllocationResult.
A copy of all tolerations specified in the request at the time when the device got allocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
- :param tolerations: The tolerations of this V1alpha3DeviceRequestAllocationResult. # noqa: E501
- :type: list[V1alpha3DeviceToleration]
+ :param tolerations: The tolerations of this V1DeviceRequestAllocationResult. # noqa: E501
+ :type: list[V1DeviceToleration]
"""
self._tolerations = tolerations
@@ -253,14 +365,14 @@ class V1alpha3DeviceRequestAllocationResult(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceRequestAllocationResult):
+ if not isinstance(other, V1DeviceRequestAllocationResult):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceRequestAllocationResult):
+ if not isinstance(other, V1DeviceRequestAllocationResult):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_type_checking.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_selector.py
index 55b71e73017..f404483b342 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_type_checking.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1beta1TypeChecking(object):
+class V1DeviceSelector(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,47 +33,45 @@ class V1beta1TypeChecking(object):
and the value is json key in definition.
"""
openapi_types = {
- 'expression_warnings': 'list[V1beta1ExpressionWarning]'
+ 'cel': 'V1CELDeviceSelector'
}
attribute_map = {
- 'expression_warnings': 'expressionWarnings'
+ 'cel': 'cel'
}
- def __init__(self, expression_warnings=None, local_vars_configuration=None): # noqa: E501
- """V1beta1TypeChecking - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, cel=None, local_vars_configuration=None): # noqa: E501
+ """V1DeviceSelector - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
- self._expression_warnings = None
+ self._cel = None
self.discriminator = None
- if expression_warnings is not None:
- self.expression_warnings = expression_warnings
+ if cel is not None:
+ self.cel = cel
@property
- def expression_warnings(self):
- """Gets the expression_warnings of this V1beta1TypeChecking. # noqa: E501
+ def cel(self):
+ """Gets the cel of this V1DeviceSelector. # noqa: E501
- The type checking warnings for each expression. # noqa: E501
- :return: The expression_warnings of this V1beta1TypeChecking. # noqa: E501
- :rtype: list[V1beta1ExpressionWarning]
+ :return: The cel of this V1DeviceSelector. # noqa: E501
+ :rtype: V1CELDeviceSelector
"""
- return self._expression_warnings
+ return self._cel
- @expression_warnings.setter
- def expression_warnings(self, expression_warnings):
- """Sets the expression_warnings of this V1beta1TypeChecking.
+ @cel.setter
+ def cel(self, cel):
+ """Sets the cel of this V1DeviceSelector.
- The type checking warnings for each expression. # noqa: E501
- :param expression_warnings: The expression_warnings of this V1beta1TypeChecking. # noqa: E501
- :type: list[V1beta1ExpressionWarning]
+ :param cel: The cel of this V1DeviceSelector. # noqa: E501
+ :type: V1CELDeviceSelector
"""
- self._expression_warnings = expression_warnings
+ self._cel = cel
def to_dict(self):
"""Returns the model properties as a dict"""
@@ -109,14 +107,14 @@ class V1beta1TypeChecking(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1beta1TypeChecking):
+ if not isinstance(other, V1DeviceSelector):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1TypeChecking):
+ if not isinstance(other, V1DeviceSelector):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_sub_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_sub_request.py
index 9c8c1ced947..2d22f81ba2c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_sub_request.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_sub_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceSubRequest(object):
+class V1DeviceSubRequest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,15 +34,17 @@ class V1alpha3DeviceSubRequest(object):
"""
openapi_types = {
'allocation_mode': 'str',
+ 'capacity': 'V1CapacityRequirements',
'count': 'int',
'device_class_name': 'str',
'name': 'str',
- 'selectors': 'list[V1alpha3DeviceSelector]',
- 'tolerations': 'list[V1alpha3DeviceToleration]'
+ 'selectors': 'list[V1DeviceSelector]',
+ 'tolerations': 'list[V1DeviceToleration]'
}
attribute_map = {
'allocation_mode': 'allocationMode',
+ 'capacity': 'capacity',
'count': 'count',
'device_class_name': 'deviceClassName',
'name': 'name',
@@ -50,13 +52,14 @@ class V1alpha3DeviceSubRequest(object):
'tolerations': 'tolerations'
}
- def __init__(self, allocation_mode=None, count=None, device_class_name=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceSubRequest - a model defined in OpenAPI""" # noqa: E501
+ def __init__(self, allocation_mode=None, capacity=None, count=None, device_class_name=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
+ """V1DeviceSubRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._allocation_mode = None
+ self._capacity = None
self._count = None
self._device_class_name = None
self._name = None
@@ -66,6 +69,8 @@ class V1alpha3DeviceSubRequest(object):
if allocation_mode is not None:
self.allocation_mode = allocation_mode
+ if capacity is not None:
+ self.capacity = capacity
if count is not None:
self.count = count
self.device_class_name = device_class_name
@@ -77,45 +82,66 @@ class V1alpha3DeviceSubRequest(object):
@property
def allocation_mode(self):
- """Gets the allocation_mode of this V1alpha3DeviceSubRequest. # noqa: E501
+ """Gets the allocation_mode of this V1DeviceSubRequest. # noqa: E501
- AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This request is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501
+ AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This subrequest is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501
- :return: The allocation_mode of this V1alpha3DeviceSubRequest. # noqa: E501
+ :return: The allocation_mode of this V1DeviceSubRequest. # noqa: E501
:rtype: str
"""
return self._allocation_mode
@allocation_mode.setter
def allocation_mode(self, allocation_mode):
- """Sets the allocation_mode of this V1alpha3DeviceSubRequest.
+ """Sets the allocation_mode of this V1DeviceSubRequest.
- AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This request is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501
+ AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This subrequest is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501
- :param allocation_mode: The allocation_mode of this V1alpha3DeviceSubRequest. # noqa: E501
+ :param allocation_mode: The allocation_mode of this V1DeviceSubRequest. # noqa: E501
:type: str
"""
self._allocation_mode = allocation_mode
@property
+ def capacity(self):
+ """Gets the capacity of this V1DeviceSubRequest. # noqa: E501
+
+
+ :return: The capacity of this V1DeviceSubRequest. # noqa: E501
+ :rtype: V1CapacityRequirements
+ """
+ return self._capacity
+
+ @capacity.setter
+ def capacity(self, capacity):
+ """Sets the capacity of this V1DeviceSubRequest.
+
+
+ :param capacity: The capacity of this V1DeviceSubRequest. # noqa: E501
+ :type: V1CapacityRequirements
+ """
+
+ self._capacity = capacity
+
+ @property
def count(self):
- """Gets the count of this V1alpha3DeviceSubRequest. # noqa: E501
+ """Gets the count of this V1DeviceSubRequest. # noqa: E501
Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. # noqa: E501
- :return: The count of this V1alpha3DeviceSubRequest. # noqa: E501
+ :return: The count of this V1DeviceSubRequest. # noqa: E501
:rtype: int
"""
return self._count
@count.setter
def count(self, count):
- """Sets the count of this V1alpha3DeviceSubRequest.
+ """Sets the count of this V1DeviceSubRequest.
Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. # noqa: E501
- :param count: The count of this V1alpha3DeviceSubRequest. # noqa: E501
+ :param count: The count of this V1DeviceSubRequest. # noqa: E501
:type: int
"""
@@ -123,22 +149,22 @@ class V1alpha3DeviceSubRequest(object):
@property
def device_class_name(self):
- """Gets the device_class_name of this V1alpha3DeviceSubRequest. # noqa: E501
+ """Gets the device_class_name of this V1DeviceSubRequest. # noqa: E501
DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this subrequest. A class is required. Which classes are available depends on the cluster. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. # noqa: E501
- :return: The device_class_name of this V1alpha3DeviceSubRequest. # noqa: E501
+ :return: The device_class_name of this V1DeviceSubRequest. # noqa: E501
:rtype: str
"""
return self._device_class_name
@device_class_name.setter
def device_class_name(self, device_class_name):
- """Sets the device_class_name of this V1alpha3DeviceSubRequest.
+ """Sets the device_class_name of this V1DeviceSubRequest.
DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this subrequest. A class is required. Which classes are available depends on the cluster. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. # noqa: E501
- :param device_class_name: The device_class_name of this V1alpha3DeviceSubRequest. # noqa: E501
+ :param device_class_name: The device_class_name of this V1DeviceSubRequest. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and device_class_name is None: # noqa: E501
@@ -148,22 +174,22 @@ class V1alpha3DeviceSubRequest(object):
@property
def name(self):
- """Gets the name of this V1alpha3DeviceSubRequest. # noqa: E501
+ """Gets the name of this V1DeviceSubRequest. # noqa: E501
Name can be used to reference this subrequest in the list of constraints or the list of configurations for the claim. References must use the format <main request>/<subrequest>. Must be a DNS label. # noqa: E501
- :return: The name of this V1alpha3DeviceSubRequest. # noqa: E501
+ :return: The name of this V1DeviceSubRequest. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
- """Sets the name of this V1alpha3DeviceSubRequest.
+ """Sets the name of this V1DeviceSubRequest.
Name can be used to reference this subrequest in the list of constraints or the list of configurations for the claim. References must use the format <main request>/<subrequest>. Must be a DNS label. # noqa: E501
- :param name: The name of this V1alpha3DeviceSubRequest. # noqa: E501
+ :param name: The name of this V1DeviceSubRequest. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
@@ -173,46 +199,46 @@ class V1alpha3DeviceSubRequest(object):
@property
def selectors(self):
- """Gets the selectors of this V1alpha3DeviceSubRequest. # noqa: E501
+ """Gets the selectors of this V1DeviceSubRequest. # noqa: E501
- Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered. # noqa: E501
+ Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered. # noqa: E501
- :return: The selectors of this V1alpha3DeviceSubRequest. # noqa: E501
- :rtype: list[V1alpha3DeviceSelector]
+ :return: The selectors of this V1DeviceSubRequest. # noqa: E501
+ :rtype: list[V1DeviceSelector]
"""
return self._selectors
@selectors.setter
def selectors(self, selectors):
- """Sets the selectors of this V1alpha3DeviceSubRequest.
+ """Sets the selectors of this V1DeviceSubRequest.
- Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered. # noqa: E501
+ Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered. # noqa: E501
- :param selectors: The selectors of this V1alpha3DeviceSubRequest. # noqa: E501
- :type: list[V1alpha3DeviceSelector]
+ :param selectors: The selectors of this V1DeviceSubRequest. # noqa: E501
+ :type: list[V1DeviceSelector]
"""
self._selectors = selectors
@property
def tolerations(self):
- """Gets the tolerations of this V1alpha3DeviceSubRequest. # noqa: E501
+ """Gets the tolerations of this V1DeviceSubRequest. # noqa: E501
If specified, the request's tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
- :return: The tolerations of this V1alpha3DeviceSubRequest. # noqa: E501
- :rtype: list[V1alpha3DeviceToleration]
+ :return: The tolerations of this V1DeviceSubRequest. # noqa: E501
+ :rtype: list[V1DeviceToleration]
"""
return self._tolerations
@tolerations.setter
def tolerations(self, tolerations):
- """Sets the tolerations of this V1alpha3DeviceSubRequest.
+ """Sets the tolerations of this V1DeviceSubRequest.
If specified, the request's tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
- :param tolerations: The tolerations of this V1alpha3DeviceSubRequest. # noqa: E501
- :type: list[V1alpha3DeviceToleration]
+ :param tolerations: The tolerations of this V1DeviceSubRequest. # noqa: E501
+ :type: list[V1DeviceToleration]
"""
self._tolerations = tolerations
@@ -251,14 +277,14 @@ class V1alpha3DeviceSubRequest(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceSubRequest):
+ if not isinstance(other, V1DeviceSubRequest):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceSubRequest):
+ if not isinstance(other, V1DeviceSubRequest):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_device_taint.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_taint.py
new file mode 100644
index 00000000000..969f1f8f41e
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_taint.py
@@ -0,0 +1,208 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1DeviceTaint(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'effect': 'str',
+ 'key': 'str',
+ 'time_added': 'datetime',
+ 'value': 'str'
+ }
+
+ attribute_map = {
+ 'effect': 'effect',
+ 'key': 'key',
+ 'time_added': 'timeAdded',
+ 'value': 'value'
+ }
+
+ def __init__(self, effect=None, key=None, time_added=None, value=None, local_vars_configuration=None): # noqa: E501
+ """V1DeviceTaint - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._effect = None
+ self._key = None
+ self._time_added = None
+ self._value = None
+ self.discriminator = None
+
+ self.effect = effect
+ self.key = key
+ if time_added is not None:
+ self.time_added = time_added
+ if value is not None:
+ self.value = value
+
+ @property
+ def effect(self):
+ """Gets the effect of this V1DeviceTaint. # noqa: E501
+
+ The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. # noqa: E501
+
+ :return: The effect of this V1DeviceTaint. # noqa: E501
+ :rtype: str
+ """
+ return self._effect
+
+ @effect.setter
+ def effect(self, effect):
+ """Sets the effect of this V1DeviceTaint.
+
+ The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. # noqa: E501
+
+ :param effect: The effect of this V1DeviceTaint. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and effect is None: # noqa: E501
+ raise ValueError("Invalid value for `effect`, must not be `None`") # noqa: E501
+
+ self._effect = effect
+
+ @property
+ def key(self):
+ """Gets the key of this V1DeviceTaint. # noqa: E501
+
+ The taint key to be applied to a device. Must be a label name. # noqa: E501
+
+ :return: The key of this V1DeviceTaint. # noqa: E501
+ :rtype: str
+ """
+ return self._key
+
+ @key.setter
+ def key(self, key):
+ """Sets the key of this V1DeviceTaint.
+
+ The taint key to be applied to a device. Must be a label name. # noqa: E501
+
+ :param key: The key of this V1DeviceTaint. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501
+ raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501
+
+ self._key = key
+
+ @property
+ def time_added(self):
+ """Gets the time_added of this V1DeviceTaint. # noqa: E501
+
+ TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set. # noqa: E501
+
+ :return: The time_added of this V1DeviceTaint. # noqa: E501
+ :rtype: datetime
+ """
+ return self._time_added
+
+ @time_added.setter
+ def time_added(self, time_added):
+ """Sets the time_added of this V1DeviceTaint.
+
+ TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set. # noqa: E501
+
+ :param time_added: The time_added of this V1DeviceTaint. # noqa: E501
+ :type: datetime
+ """
+
+ self._time_added = time_added
+
+ @property
+ def value(self):
+ """Gets the value of this V1DeviceTaint. # noqa: E501
+
+ The taint value corresponding to the taint key. Must be a label value. # noqa: E501
+
+ :return: The value of this V1DeviceTaint. # noqa: E501
+ :rtype: str
+ """
+ return self._value
+
+ @value.setter
+ def value(self, value):
+ """Sets the value of this V1DeviceTaint.
+
+ The taint value corresponding to the taint key. Must be a label value. # noqa: E501
+
+ :param value: The value of this V1DeviceTaint. # noqa: E501
+ :type: str
+ """
+
+ self._value = value
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1DeviceTaint):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1DeviceTaint):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_toleration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_device_toleration.py
index 9d8803f8ca6..468d168e251 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_toleration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_device_toleration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceToleration(object):
+class V1DeviceToleration(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -49,7 +49,7 @@ class V1alpha3DeviceToleration(object):
}
def __init__(self, effect=None, key=None, operator=None, toleration_seconds=None, value=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceToleration - a model defined in OpenAPI""" # noqa: E501
+ """V1DeviceToleration - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -74,22 +74,22 @@ class V1alpha3DeviceToleration(object):
@property
def effect(self):
- """Gets the effect of this V1alpha3DeviceToleration. # noqa: E501
+ """Gets the effect of this V1DeviceToleration. # noqa: E501
Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute. # noqa: E501
- :return: The effect of this V1alpha3DeviceToleration. # noqa: E501
+ :return: The effect of this V1DeviceToleration. # noqa: E501
:rtype: str
"""
return self._effect
@effect.setter
def effect(self, effect):
- """Sets the effect of this V1alpha3DeviceToleration.
+ """Sets the effect of this V1DeviceToleration.
Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute. # noqa: E501
- :param effect: The effect of this V1alpha3DeviceToleration. # noqa: E501
+ :param effect: The effect of this V1DeviceToleration. # noqa: E501
:type: str
"""
@@ -97,22 +97,22 @@ class V1alpha3DeviceToleration(object):
@property
def key(self):
- """Gets the key of this V1alpha3DeviceToleration. # noqa: E501
+ """Gets the key of this V1DeviceToleration. # noqa: E501
Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name. # noqa: E501
- :return: The key of this V1alpha3DeviceToleration. # noqa: E501
+ :return: The key of this V1DeviceToleration. # noqa: E501
:rtype: str
"""
return self._key
@key.setter
def key(self, key):
- """Sets the key of this V1alpha3DeviceToleration.
+ """Sets the key of this V1DeviceToleration.
Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name. # noqa: E501
- :param key: The key of this V1alpha3DeviceToleration. # noqa: E501
+ :param key: The key of this V1DeviceToleration. # noqa: E501
:type: str
"""
@@ -120,22 +120,22 @@ class V1alpha3DeviceToleration(object):
@property
def operator(self):
- """Gets the operator of this V1alpha3DeviceToleration. # noqa: E501
+ """Gets the operator of this V1DeviceToleration. # noqa: E501
Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category. # noqa: E501
- :return: The operator of this V1alpha3DeviceToleration. # noqa: E501
+ :return: The operator of this V1DeviceToleration. # noqa: E501
:rtype: str
"""
return self._operator
@operator.setter
def operator(self, operator):
- """Sets the operator of this V1alpha3DeviceToleration.
+ """Sets the operator of this V1DeviceToleration.
Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category. # noqa: E501
- :param operator: The operator of this V1alpha3DeviceToleration. # noqa: E501
+ :param operator: The operator of this V1DeviceToleration. # noqa: E501
:type: str
"""
@@ -143,22 +143,22 @@ class V1alpha3DeviceToleration(object):
@property
def toleration_seconds(self):
- """Gets the toleration_seconds of this V1alpha3DeviceToleration. # noqa: E501
+ """Gets the toleration_seconds of this V1DeviceToleration. # noqa: E501
TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>. # noqa: E501
- :return: The toleration_seconds of this V1alpha3DeviceToleration. # noqa: E501
+ :return: The toleration_seconds of this V1DeviceToleration. # noqa: E501
:rtype: int
"""
return self._toleration_seconds
@toleration_seconds.setter
def toleration_seconds(self, toleration_seconds):
- """Sets the toleration_seconds of this V1alpha3DeviceToleration.
+ """Sets the toleration_seconds of this V1DeviceToleration.
TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>. # noqa: E501
- :param toleration_seconds: The toleration_seconds of this V1alpha3DeviceToleration. # noqa: E501
+ :param toleration_seconds: The toleration_seconds of this V1DeviceToleration. # noqa: E501
:type: int
"""
@@ -166,22 +166,22 @@ class V1alpha3DeviceToleration(object):
@property
def value(self):
- """Gets the value of this V1alpha3DeviceToleration. # noqa: E501
+ """Gets the value of this V1DeviceToleration. # noqa: E501
Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value. # noqa: E501
- :return: The value of this V1alpha3DeviceToleration. # noqa: E501
+ :return: The value of this V1DeviceToleration. # noqa: E501
:rtype: str
"""
return self._value
@value.setter
def value(self, value):
- """Sets the value of this V1alpha3DeviceToleration.
+ """Sets the value of this V1DeviceToleration.
Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value. # noqa: E501
- :param value: The value of this V1alpha3DeviceToleration. # noqa: E501
+ :param value: The value of this V1DeviceToleration. # noqa: E501
:type: str
"""
@@ -221,14 +221,14 @@ class V1alpha3DeviceToleration(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceToleration):
+ if not isinstance(other, V1DeviceToleration):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceToleration):
+ if not isinstance(other, V1DeviceToleration):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_projection.py b/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_projection.py
index d87a2007f77..776c8d45f7c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_projection.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_projection.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_file.py b/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_file.py
index 7ea7c854b83..c613fb044dd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_file.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_file.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_source.py
index 04a480e2a12..96ed9d3808b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_downward_api_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_empty_dir_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_empty_dir_volume_source.py
index 8800fb94bde..160d27ec271 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_empty_dir_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_empty_dir_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint.py b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint.py
index a06a08c3142..4bceaa8fcfb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_address.py b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_address.py
index 222e36b5a67..599bf9ab501 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_address.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_address.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_conditions.py b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_conditions.py
index 6fa95ea357b..9b6792c93df 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_conditions.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_conditions.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_hints.py b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_hints.py
index d26f0efa0fa..308febe9707 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_hints.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_hints.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice.py b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice.py
index d52e5e5bbf7..dfca3e85bb6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice_list.py
index 652378462b4..47c2089cbd1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_slice_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_subset.py b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_subset.py
index a27ff3a758f..6f13a3f7dbb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_subset.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoint_subset.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoints.py b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoints.py
index 8ed2c4e350d..565c7d566e1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoints.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoints.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoints_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoints_list.py
index af4cf76cc70..5a5f15ad563 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_endpoints_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_endpoints_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_env_from_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_env_from_source.py
index 4df30f6fa50..fe012ebd09a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_env_from_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_env_from_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -87,7 +87,7 @@ class V1EnvFromSource(object):
def prefix(self):
"""Gets the prefix of this V1EnvFromSource. # noqa: E501
- Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. # noqa: E501
+ Optional text to prepend to the name of each environment variable. May consist of any printable ASCII characters except '='. # noqa: E501
:return: The prefix of this V1EnvFromSource. # noqa: E501
:rtype: str
@@ -98,7 +98,7 @@ class V1EnvFromSource(object):
def prefix(self, prefix):
"""Sets the prefix of this V1EnvFromSource.
- Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. # noqa: E501
+ Optional text to prepend to the name of each environment variable. May consist of any printable ASCII characters except '='. # noqa: E501
:param prefix: The prefix of this V1EnvFromSource. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_env_var.py b/contrib/python/kubernetes/kubernetes/client/models/v1_env_var.py
index 42868789945..ec1330a1245 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_env_var.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_env_var.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -65,7 +65,7 @@ class V1EnvVar(object):
def name(self):
"""Gets the name of this V1EnvVar. # noqa: E501
- Name of the environment variable. Must be a C_IDENTIFIER. # noqa: E501
+ Name of the environment variable. May consist of any printable ASCII characters except '='. # noqa: E501
:return: The name of this V1EnvVar. # noqa: E501
:rtype: str
@@ -76,7 +76,7 @@ class V1EnvVar(object):
def name(self, name):
"""Sets the name of this V1EnvVar.
- Name of the environment variable. Must be a C_IDENTIFIER. # noqa: E501
+ Name of the environment variable. May consist of any printable ASCII characters except '='. # noqa: E501
:param name: The name of this V1EnvVar. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_env_var_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_env_var_source.py
index 014e5f93a14..75a1f2f127a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_env_var_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_env_var_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -35,6 +35,7 @@ class V1EnvVarSource(object):
openapi_types = {
'config_map_key_ref': 'V1ConfigMapKeySelector',
'field_ref': 'V1ObjectFieldSelector',
+ 'file_key_ref': 'V1FileKeySelector',
'resource_field_ref': 'V1ResourceFieldSelector',
'secret_key_ref': 'V1SecretKeySelector'
}
@@ -42,11 +43,12 @@ class V1EnvVarSource(object):
attribute_map = {
'config_map_key_ref': 'configMapKeyRef',
'field_ref': 'fieldRef',
+ 'file_key_ref': 'fileKeyRef',
'resource_field_ref': 'resourceFieldRef',
'secret_key_ref': 'secretKeyRef'
}
- def __init__(self, config_map_key_ref=None, field_ref=None, resource_field_ref=None, secret_key_ref=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, config_map_key_ref=None, field_ref=None, file_key_ref=None, resource_field_ref=None, secret_key_ref=None, local_vars_configuration=None): # noqa: E501
"""V1EnvVarSource - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -54,6 +56,7 @@ class V1EnvVarSource(object):
self._config_map_key_ref = None
self._field_ref = None
+ self._file_key_ref = None
self._resource_field_ref = None
self._secret_key_ref = None
self.discriminator = None
@@ -62,6 +65,8 @@ class V1EnvVarSource(object):
self.config_map_key_ref = config_map_key_ref
if field_ref is not None:
self.field_ref = field_ref
+ if file_key_ref is not None:
+ self.file_key_ref = file_key_ref
if resource_field_ref is not None:
self.resource_field_ref = resource_field_ref
if secret_key_ref is not None:
@@ -110,6 +115,27 @@ class V1EnvVarSource(object):
self._field_ref = field_ref
@property
+ def file_key_ref(self):
+ """Gets the file_key_ref of this V1EnvVarSource. # noqa: E501
+
+
+ :return: The file_key_ref of this V1EnvVarSource. # noqa: E501
+ :rtype: V1FileKeySelector
+ """
+ return self._file_key_ref
+
+ @file_key_ref.setter
+ def file_key_ref(self, file_key_ref):
+ """Sets the file_key_ref of this V1EnvVarSource.
+
+
+ :param file_key_ref: The file_key_ref of this V1EnvVarSource. # noqa: E501
+ :type: V1FileKeySelector
+ """
+
+ self._file_key_ref = file_key_ref
+
+ @property
def resource_field_ref(self):
"""Gets the resource_field_ref of this V1EnvVarSource. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_container.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_container.py
index 954816b3d9e..204e83d9925 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_container.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_container.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -47,6 +47,7 @@ class V1EphemeralContainer(object):
'resize_policy': 'list[V1ContainerResizePolicy]',
'resources': 'V1ResourceRequirements',
'restart_policy': 'str',
+ 'restart_policy_rules': 'list[V1ContainerRestartRule]',
'security_context': 'V1SecurityContext',
'startup_probe': 'V1Probe',
'stdin': 'bool',
@@ -75,6 +76,7 @@ class V1EphemeralContainer(object):
'resize_policy': 'resizePolicy',
'resources': 'resources',
'restart_policy': 'restartPolicy',
+ 'restart_policy_rules': 'restartPolicyRules',
'security_context': 'securityContext',
'startup_probe': 'startupProbe',
'stdin': 'stdin',
@@ -88,7 +90,7 @@ class V1EphemeralContainer(object):
'working_dir': 'workingDir'
}
- def __init__(self, args=None, command=None, env=None, env_from=None, image=None, image_pull_policy=None, lifecycle=None, liveness_probe=None, name=None, ports=None, readiness_probe=None, resize_policy=None, resources=None, restart_policy=None, security_context=None, startup_probe=None, stdin=None, stdin_once=None, target_container_name=None, termination_message_path=None, termination_message_policy=None, tty=None, volume_devices=None, volume_mounts=None, working_dir=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, args=None, command=None, env=None, env_from=None, image=None, image_pull_policy=None, lifecycle=None, liveness_probe=None, name=None, ports=None, readiness_probe=None, resize_policy=None, resources=None, restart_policy=None, restart_policy_rules=None, security_context=None, startup_probe=None, stdin=None, stdin_once=None, target_container_name=None, termination_message_path=None, termination_message_policy=None, tty=None, volume_devices=None, volume_mounts=None, working_dir=None, local_vars_configuration=None): # noqa: E501
"""V1EphemeralContainer - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -108,6 +110,7 @@ class V1EphemeralContainer(object):
self._resize_policy = None
self._resources = None
self._restart_policy = None
+ self._restart_policy_rules = None
self._security_context = None
self._startup_probe = None
self._stdin = None
@@ -148,6 +151,8 @@ class V1EphemeralContainer(object):
self.resources = resources
if restart_policy is not None:
self.restart_policy = restart_policy
+ if restart_policy_rules is not None:
+ self.restart_policy_rules = restart_policy_rules
if security_context is not None:
self.security_context = security_context
if startup_probe is not None:
@@ -244,7 +249,7 @@ class V1EphemeralContainer(object):
def env_from(self):
"""Gets the env_from of this V1EphemeralContainer. # noqa: E501
- List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501
+ List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501
:return: The env_from of this V1EphemeralContainer. # noqa: E501
:rtype: list[V1EnvFromSource]
@@ -255,7 +260,7 @@ class V1EphemeralContainer(object):
def env_from(self, env_from):
"""Sets the env_from of this V1EphemeralContainer.
- List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501
+ List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501
:param env_from: The env_from of this V1EphemeralContainer. # noqa: E501
:type: list[V1EnvFromSource]
@@ -468,7 +473,7 @@ class V1EphemeralContainer(object):
def restart_policy(self):
"""Gets the restart_policy of this V1EphemeralContainer. # noqa: E501
- Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers. # noqa: E501
+ Restart policy for the container to manage the restart behavior of each container within a pod. You cannot set this field on ephemeral containers. # noqa: E501
:return: The restart_policy of this V1EphemeralContainer. # noqa: E501
:rtype: str
@@ -479,7 +484,7 @@ class V1EphemeralContainer(object):
def restart_policy(self, restart_policy):
"""Sets the restart_policy of this V1EphemeralContainer.
- Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers. # noqa: E501
+ Restart policy for the container to manage the restart behavior of each container within a pod. You cannot set this field on ephemeral containers. # noqa: E501
:param restart_policy: The restart_policy of this V1EphemeralContainer. # noqa: E501
:type: str
@@ -488,6 +493,29 @@ class V1EphemeralContainer(object):
self._restart_policy = restart_policy
@property
+ def restart_policy_rules(self):
+ """Gets the restart_policy_rules of this V1EphemeralContainer. # noqa: E501
+
+ Represents a list of rules to be checked to determine if the container should be restarted on exit. You cannot set this field on ephemeral containers. # noqa: E501
+
+ :return: The restart_policy_rules of this V1EphemeralContainer. # noqa: E501
+ :rtype: list[V1ContainerRestartRule]
+ """
+ return self._restart_policy_rules
+
+ @restart_policy_rules.setter
+ def restart_policy_rules(self, restart_policy_rules):
+ """Sets the restart_policy_rules of this V1EphemeralContainer.
+
+ Represents a list of rules to be checked to determine if the container should be restarted on exit. You cannot set this field on ephemeral containers. # noqa: E501
+
+ :param restart_policy_rules: The restart_policy_rules of this V1EphemeralContainer. # noqa: E501
+ :type: list[V1ContainerRestartRule]
+ """
+
+ self._restart_policy_rules = restart_policy_rules
+
+ @property
def security_context(self):
"""Gets the security_context of this V1EphemeralContainer. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_volume_source.py
index 3003f1c2b81..432621f6d03 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_event_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_event_source.py
index a4d6ea50d69..065e9a04552 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_event_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_event_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_eviction.py b/contrib/python/kubernetes/kubernetes/client/models/v1_eviction.py
index 2f7b9531b60..a36f4b14b20 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_eviction.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_eviction.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_exact_device_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1_exact_device_request.py
new file mode 100644
index 00000000000..5888860f8fd
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_exact_device_request.py
@@ -0,0 +1,289 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ExactDeviceRequest(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'admin_access': 'bool',
+ 'allocation_mode': 'str',
+ 'capacity': 'V1CapacityRequirements',
+ 'count': 'int',
+ 'device_class_name': 'str',
+ 'selectors': 'list[V1DeviceSelector]',
+ 'tolerations': 'list[V1DeviceToleration]'
+ }
+
+ attribute_map = {
+ 'admin_access': 'adminAccess',
+ 'allocation_mode': 'allocationMode',
+ 'capacity': 'capacity',
+ 'count': 'count',
+ 'device_class_name': 'deviceClassName',
+ 'selectors': 'selectors',
+ 'tolerations': 'tolerations'
+ }
+
+ def __init__(self, admin_access=None, allocation_mode=None, capacity=None, count=None, device_class_name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
+ """V1ExactDeviceRequest - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._admin_access = None
+ self._allocation_mode = None
+ self._capacity = None
+ self._count = None
+ self._device_class_name = None
+ self._selectors = None
+ self._tolerations = None
+ self.discriminator = None
+
+ if admin_access is not None:
+ self.admin_access = admin_access
+ if allocation_mode is not None:
+ self.allocation_mode = allocation_mode
+ if capacity is not None:
+ self.capacity = capacity
+ if count is not None:
+ self.count = count
+ self.device_class_name = device_class_name
+ if selectors is not None:
+ self.selectors = selectors
+ if tolerations is not None:
+ self.tolerations = tolerations
+
+ @property
+ def admin_access(self):
+ """Gets the admin_access of this V1ExactDeviceRequest. # noqa: E501
+
+ AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. # noqa: E501
+
+ :return: The admin_access of this V1ExactDeviceRequest. # noqa: E501
+ :rtype: bool
+ """
+ return self._admin_access
+
+ @admin_access.setter
+ def admin_access(self, admin_access):
+ """Sets the admin_access of this V1ExactDeviceRequest.
+
+ AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. # noqa: E501
+
+ :param admin_access: The admin_access of this V1ExactDeviceRequest. # noqa: E501
+ :type: bool
+ """
+
+ self._admin_access = admin_access
+
+ @property
+ def allocation_mode(self):
+ """Gets the allocation_mode of this V1ExactDeviceRequest. # noqa: E501
+
+ AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This request is for all of the matching devices in a pool. At least one device must exist on the node for the allocation to succeed. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501
+
+ :return: The allocation_mode of this V1ExactDeviceRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._allocation_mode
+
+ @allocation_mode.setter
+ def allocation_mode(self, allocation_mode):
+ """Sets the allocation_mode of this V1ExactDeviceRequest.
+
+ AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This request is for all of the matching devices in a pool. At least one device must exist on the node for the allocation to succeed. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501
+
+ :param allocation_mode: The allocation_mode of this V1ExactDeviceRequest. # noqa: E501
+ :type: str
+ """
+
+ self._allocation_mode = allocation_mode
+
+ @property
+ def capacity(self):
+ """Gets the capacity of this V1ExactDeviceRequest. # noqa: E501
+
+
+ :return: The capacity of this V1ExactDeviceRequest. # noqa: E501
+ :rtype: V1CapacityRequirements
+ """
+ return self._capacity
+
+ @capacity.setter
+ def capacity(self, capacity):
+ """Sets the capacity of this V1ExactDeviceRequest.
+
+
+ :param capacity: The capacity of this V1ExactDeviceRequest. # noqa: E501
+ :type: V1CapacityRequirements
+ """
+
+ self._capacity = capacity
+
+ @property
+ def count(self):
+ """Gets the count of this V1ExactDeviceRequest. # noqa: E501
+
+ Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. # noqa: E501
+
+ :return: The count of this V1ExactDeviceRequest. # noqa: E501
+ :rtype: int
+ """
+ return self._count
+
+ @count.setter
+ def count(self, count):
+ """Sets the count of this V1ExactDeviceRequest.
+
+ Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. # noqa: E501
+
+ :param count: The count of this V1ExactDeviceRequest. # noqa: E501
+ :type: int
+ """
+
+ self._count = count
+
+ @property
+ def device_class_name(self):
+ """Gets the device_class_name of this V1ExactDeviceRequest. # noqa: E501
+
+ DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request. A DeviceClassName is required. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. # noqa: E501
+
+ :return: The device_class_name of this V1ExactDeviceRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._device_class_name
+
+ @device_class_name.setter
+ def device_class_name(self, device_class_name):
+ """Sets the device_class_name of this V1ExactDeviceRequest.
+
+ DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request. A DeviceClassName is required. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. # noqa: E501
+
+ :param device_class_name: The device_class_name of this V1ExactDeviceRequest. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and device_class_name is None: # noqa: E501
+ raise ValueError("Invalid value for `device_class_name`, must not be `None`") # noqa: E501
+
+ self._device_class_name = device_class_name
+
+ @property
+ def selectors(self):
+ """Gets the selectors of this V1ExactDeviceRequest. # noqa: E501
+
+ Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered. # noqa: E501
+
+ :return: The selectors of this V1ExactDeviceRequest. # noqa: E501
+ :rtype: list[V1DeviceSelector]
+ """
+ return self._selectors
+
+ @selectors.setter
+ def selectors(self, selectors):
+ """Sets the selectors of this V1ExactDeviceRequest.
+
+ Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered. # noqa: E501
+
+ :param selectors: The selectors of this V1ExactDeviceRequest. # noqa: E501
+ :type: list[V1DeviceSelector]
+ """
+
+ self._selectors = selectors
+
+ @property
+ def tolerations(self):
+ """Gets the tolerations of this V1ExactDeviceRequest. # noqa: E501
+
+ If specified, the request's tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
+
+ :return: The tolerations of this V1ExactDeviceRequest. # noqa: E501
+ :rtype: list[V1DeviceToleration]
+ """
+ return self._tolerations
+
+ @tolerations.setter
+ def tolerations(self, tolerations):
+ """Sets the tolerations of this V1ExactDeviceRequest.
+
+ If specified, the request's tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
+
+ :param tolerations: The tolerations of this V1ExactDeviceRequest. # noqa: E501
+ :type: list[V1DeviceToleration]
+ """
+
+ self._tolerations = tolerations
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1ExactDeviceRequest):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1ExactDeviceRequest):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_exec_action.py b/contrib/python/kubernetes/kubernetes/client/models/v1_exec_action.py
index e3c1c76e65b..7801d7de3ec 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_exec_action.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_exec_action.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_exempt_priority_level_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_exempt_priority_level_configuration.py
index fb40310b109..37287470578 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_exempt_priority_level_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_exempt_priority_level_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_expression_warning.py b/contrib/python/kubernetes/kubernetes/client/models/v1_expression_warning.py
index 2b1733d49b4..ebfe2fa7a94 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_expression_warning.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_expression_warning.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_external_documentation.py b/contrib/python/kubernetes/kubernetes/client/models/v1_external_documentation.py
index d761e1973ce..6551bf5a071 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_external_documentation.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_external_documentation.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_fc_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_fc_volume_source.py
index 04200a4409d..d6b2ca75db2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_fc_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_fc_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_attributes.py b/contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_attributes.py
index 84afbaafbc3..a38d3da9dfc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_attributes.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_attributes.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_requirement.py b/contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_requirement.py
index 0e10f429c6c..06756f31cf4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_requirement.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_field_selector_requirement.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_file_key_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1_file_key_selector.py
new file mode 100644
index 00000000000..323c7bdbb5d
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_file_key_selector.py
@@ -0,0 +1,209 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1FileKeySelector(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'key': 'str',
+ 'optional': 'bool',
+ 'path': 'str',
+ 'volume_name': 'str'
+ }
+
+ attribute_map = {
+ 'key': 'key',
+ 'optional': 'optional',
+ 'path': 'path',
+ 'volume_name': 'volumeName'
+ }
+
+ def __init__(self, key=None, optional=None, path=None, volume_name=None, local_vars_configuration=None): # noqa: E501
+ """V1FileKeySelector - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._key = None
+ self._optional = None
+ self._path = None
+ self._volume_name = None
+ self.discriminator = None
+
+ self.key = key
+ if optional is not None:
+ self.optional = optional
+ self.path = path
+ self.volume_name = volume_name
+
+ @property
+ def key(self):
+ """Gets the key of this V1FileKeySelector. # noqa: E501
+
+ The key within the env file. An invalid key will prevent the pod from starting. The keys defined within a source may consist of any printable ASCII characters except '='. During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. # noqa: E501
+
+ :return: The key of this V1FileKeySelector. # noqa: E501
+ :rtype: str
+ """
+ return self._key
+
+ @key.setter
+ def key(self, key):
+ """Sets the key of this V1FileKeySelector.
+
+ The key within the env file. An invalid key will prevent the pod from starting. The keys defined within a source may consist of any printable ASCII characters except '='. During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. # noqa: E501
+
+ :param key: The key of this V1FileKeySelector. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501
+ raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501
+
+ self._key = key
+
+ @property
+ def optional(self):
+ """Gets the optional of this V1FileKeySelector. # noqa: E501
+
+ Specify whether the file or its key must be defined. If the file or key does not exist, then the env var is not published. If optional is set to true and the specified key does not exist, the environment variable will not be set in the Pod's containers. If optional is set to false and the specified key does not exist, an error will be returned during Pod creation. # noqa: E501
+
+ :return: The optional of this V1FileKeySelector. # noqa: E501
+ :rtype: bool
+ """
+ return self._optional
+
+ @optional.setter
+ def optional(self, optional):
+ """Sets the optional of this V1FileKeySelector.
+
+ Specify whether the file or its key must be defined. If the file or key does not exist, then the env var is not published. If optional is set to true and the specified key does not exist, the environment variable will not be set in the Pod's containers. If optional is set to false and the specified key does not exist, an error will be returned during Pod creation. # noqa: E501
+
+ :param optional: The optional of this V1FileKeySelector. # noqa: E501
+ :type: bool
+ """
+
+ self._optional = optional
+
+ @property
+ def path(self):
+ """Gets the path of this V1FileKeySelector. # noqa: E501
+
+ The path within the volume from which to select the file. Must be relative and may not contain the '..' path or start with '..'. # noqa: E501
+
+ :return: The path of this V1FileKeySelector. # noqa: E501
+ :rtype: str
+ """
+ return self._path
+
+ @path.setter
+ def path(self, path):
+ """Sets the path of this V1FileKeySelector.
+
+ The path within the volume from which to select the file. Must be relative and may not contain the '..' path or start with '..'. # noqa: E501
+
+ :param path: The path of this V1FileKeySelector. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and path is None: # noqa: E501
+ raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501
+
+ self._path = path
+
+ @property
+ def volume_name(self):
+ """Gets the volume_name of this V1FileKeySelector. # noqa: E501
+
+ The name of the volume mount containing the env file. # noqa: E501
+
+ :return: The volume_name of this V1FileKeySelector. # noqa: E501
+ :rtype: str
+ """
+ return self._volume_name
+
+ @volume_name.setter
+ def volume_name(self, volume_name):
+ """Sets the volume_name of this V1FileKeySelector.
+
+ The name of the volume mount containing the env file. # noqa: E501
+
+ :param volume_name: The volume_name of this V1FileKeySelector. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and volume_name is None: # noqa: E501
+ raise ValueError("Invalid value for `volume_name`, must not be `None`") # noqa: E501
+
+ self._volume_name = volume_name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1FileKeySelector):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1FileKeySelector):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_flex_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_flex_persistent_volume_source.py
index 6fa3db432be..a121e4a6d51 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_flex_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_flex_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_flex_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_flex_volume_source.py
index 91a7f617e4a..c7a1d0c33b7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_flex_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_flex_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_flocker_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_flocker_volume_source.py
index 8ede8b65982..38d3139524f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_flocker_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_flocker_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_distinguisher_method.py b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_distinguisher_method.py
index 3d045546246..43a5529f0f1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_distinguisher_method.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_distinguisher_method.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema.py b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema.py
index d893474bc53..ae584207662 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_condition.py
index 573ed8b8a43..8746e9d2e07 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_list.py
index 4fd31dca8c9..ab5b452bba1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_spec.py
index 1400d1248ee..8a1d6bce361 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_status.py
index da9ce9ec80b..3da97ba9a86 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_flow_schema_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_for_node.py b/contrib/python/kubernetes/kubernetes/client/models/v1_for_node.py
index 6cce66f6025..99c4d0336e8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_for_node.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_for_node.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_for_zone.py b/contrib/python/kubernetes/kubernetes/client/models/v1_for_zone.py
index f752e6d15b5..96589ae24a2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_for_zone.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_for_zone.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_gce_persistent_disk_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_gce_persistent_disk_volume_source.py
index 343885c434d..13e3defbd33 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_gce_persistent_disk_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_gce_persistent_disk_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_git_repo_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_git_repo_volume_source.py
index ddf4de6e8ed..14e7f9ec493 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_git_repo_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_git_repo_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_persistent_volume_source.py
index 9b15d2c495c..2ecdbe93f26 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_volume_source.py
index 8108a629fb5..2bf18a7400d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_glusterfs_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -64,7 +64,7 @@ class V1GlusterfsVolumeSource(object):
def endpoints(self):
"""Gets the endpoints of this V1GlusterfsVolumeSource. # noqa: E501
- endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod # noqa: E501
+ endpoints is the endpoint name that details Glusterfs topology. # noqa: E501
:return: The endpoints of this V1GlusterfsVolumeSource. # noqa: E501
:rtype: str
@@ -75,7 +75,7 @@ class V1GlusterfsVolumeSource(object):
def endpoints(self, endpoints):
"""Sets the endpoints of this V1GlusterfsVolumeSource.
- endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod # noqa: E501
+ endpoints is the endpoint name that details Glusterfs topology. # noqa: E501
:param endpoints: The endpoints of this V1GlusterfsVolumeSource. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_group_subject.py b/contrib/python/kubernetes/kubernetes/client/models/v1_group_subject.py
index 2ca56868490..ea1647f867f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_group_subject.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_group_subject.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_group_version_for_discovery.py b/contrib/python/kubernetes/kubernetes/client/models/v1_group_version_for_discovery.py
index 36dbe893659..66554106033 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_group_version_for_discovery.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_group_version_for_discovery.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_grpc_action.py b/contrib/python/kubernetes/kubernetes/client/models/v1_grpc_action.py
index 78a4e9e94ca..c07bfc74bd5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_grpc_action.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_grpc_action.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler.py b/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler.py
index e33a89022bb..db11fe3ef17 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_list.py
index 7f02258168f..930d7be0c69 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_spec.py
index a2e7763085f..12943928f84 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_status.py
index 456f1215e54..5e8d8dda71b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_horizontal_pod_autoscaler_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_host_alias.py b/contrib/python/kubernetes/kubernetes/client/models/v1_host_alias.py
index a5c19cacfdf..60dfd3dbe1e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_host_alias.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_host_alias.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_host_ip.py b/contrib/python/kubernetes/kubernetes/client/models/v1_host_ip.py
index 6250f8c979a..4adaa0713c2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_host_ip.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_host_ip.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_host_path_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_host_path_volume_source.py
index 113904d1d68..cbfdaeaeaf0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_host_path_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_host_path_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_http_get_action.py b/contrib/python/kubernetes/kubernetes/client/models/v1_http_get_action.py
index 4e896809d64..984f809b668 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_http_get_action.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_http_get_action.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_http_header.py b/contrib/python/kubernetes/kubernetes/client/models/v1_http_header.py
index ba9f38afcf2..5d08875a0e0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_http_header.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_http_header.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_path.py b/contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_path.py
index 59ed42eda6a..48aff91cb3e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_path.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_path.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_rule_value.py b/contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_rule_value.py
index d6fe4a727f0..600de038a77 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_rule_value.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_http_ingress_rule_value.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_image_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_image_volume_source.py
index da6363db3ed..cf74b4dbf4f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_image_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_image_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress.py
index a100bd27191..9757d5594dd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_backend.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_backend.py
index 9d41bdbc6e1..f14a824300c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_backend.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_backend.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class.py
index c9b0c1f7206..eb7dcf1eaf9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_list.py
index 3e842fcf159..04dd1a65506 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_parameters_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_parameters_reference.py
index 3d615cfd390..b9c4a1dbcc5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_parameters_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_parameters_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_spec.py
index ed6e54551a7..f7838c2836e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_class_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_list.py
index 88eed4e4ee3..5133b70446a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_ingress.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_ingress.py
index 7a1a28d3ce3..5f05a61f515 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_ingress.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_ingress.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_status.py
index 2862de7bcd8..7b49940829b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_load_balancer_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_port_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_port_status.py
index 40d33def1e9..12db9a1fbf8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_port_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_port_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_rule.py
index b866034634c..a20385d4978 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_service_backend.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_service_backend.py
index 90e4f9b6707..070d2a925f7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_service_backend.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_service_backend.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_spec.py
index 5d77bd72cd9..08b562accd7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_status.py
index 2cc4c94a5ef..41c9871eeea 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_tls.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_tls.py
index 3a40d1b4ab8..c09e23b5f9c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_tls.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ingress_tls.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address.py
index 08943f2b4d8..5ca132fe7a5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_list.py
index a9862597d24..12261863030 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_spec.py
index 912359c35ed..ad8ba6897a6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ip_address_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_ip_block.py b/contrib/python/kubernetes/kubernetes/client/models/v1_ip_block.py
index 5cbc02e5d8c..64f37043595 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_ip_block.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_ip_block.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_persistent_volume_source.py
index ed7dfb352fa..6368c27f7d8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_volume_source.py
index 55561b39654..7dc252fdfe3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_iscsi_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_job.py b/contrib/python/kubernetes/kubernetes/client/models/v1_job.py
index 9ab9bf909f2..0f1251d53cb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_job.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_job.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_job_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_job_condition.py
index c1ae8f2e5fb..135a2c5bd61 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_job_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_job_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_job_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_job_list.py
index 54208bc5a48..87976d1da09 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_job_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_job_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_job_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_job_spec.py
index 189887f9536..83ac0d0e481 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_job_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_job_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -153,7 +153,7 @@ class V1JobSpec(object):
def backoff_limit(self):
"""Gets the backoff_limit of this V1JobSpec. # noqa: E501
- Specifies the number of retries before marking this job failed. Defaults to 6 # noqa: E501
+ Specifies the number of retries before marking this job failed. Defaults to 6, unless backoffLimitPerIndex (only Indexed Job) is specified. When backoffLimitPerIndex is specified, backoffLimit defaults to 2147483647. # noqa: E501
:return: The backoff_limit of this V1JobSpec. # noqa: E501
:rtype: int
@@ -164,7 +164,7 @@ class V1JobSpec(object):
def backoff_limit(self, backoff_limit):
"""Sets the backoff_limit of this V1JobSpec.
- Specifies the number of retries before marking this job failed. Defaults to 6 # noqa: E501
+ Specifies the number of retries before marking this job failed. Defaults to 6, unless backoffLimitPerIndex (only Indexed Job) is specified. When backoffLimitPerIndex is specified, backoffLimit defaults to 2147483647. # noqa: E501
:param backoff_limit: The backoff_limit of this V1JobSpec. # noqa: E501
:type: int
@@ -358,7 +358,7 @@ class V1JobSpec(object):
def pod_replacement_policy(self):
"""Gets the pod_replacement_policy of this V1JobSpec. # noqa: E501
- podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods when they are terminating (has a metadata.deletionTimestamp) or failed. - Failed means to wait until a previously created Pod is fully terminated (has phase Failed or Succeeded) before creating a replacement Pod. When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default. # noqa: E501
+ podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods when they are terminating (has a metadata.deletionTimestamp) or failed. - Failed means to wait until a previously created Pod is fully terminated (has phase Failed or Succeeded) before creating a replacement Pod. When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. # noqa: E501
:return: The pod_replacement_policy of this V1JobSpec. # noqa: E501
:rtype: str
@@ -369,7 +369,7 @@ class V1JobSpec(object):
def pod_replacement_policy(self, pod_replacement_policy):
"""Sets the pod_replacement_policy of this V1JobSpec.
- podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods when they are terminating (has a metadata.deletionTimestamp) or failed. - Failed means to wait until a previously created Pod is fully terminated (has phase Failed or Succeeded) before creating a replacement Pod. When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default. # noqa: E501
+ podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods when they are terminating (has a metadata.deletionTimestamp) or failed. - Failed means to wait until a previously created Pod is fully terminated (has phase Failed or Succeeded) before creating a replacement Pod. When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. # noqa: E501
:param pod_replacement_policy: The pod_replacement_policy of this V1JobSpec. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_job_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_job_status.py
index e1d6cabc536..af72be46aba 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_job_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_job_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_job_template_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_job_template_spec.py
index ecf6fe0575d..3af1dcd790a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_job_template_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_job_template_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_json_schema_props.py b/contrib/python/kubernetes/kubernetes/client/models/v1_json_schema_props.py
index 900d1c0b061..20c0de1941a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_json_schema_props.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_json_schema_props.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_key_to_path.py b/contrib/python/kubernetes/kubernetes/client/models/v1_key_to_path.py
index e081fc4ef56..4274cc36fe7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_key_to_path.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_key_to_path.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector.py
index 6a2a5d3918b..6c11880ae90 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_attributes.py b/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_attributes.py
index 9bf0a7594ab..3fe7dde1266 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_attributes.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_attributes.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_requirement.py b/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_requirement.py
index c3c7d6615e0..de785a216db 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_requirement.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_label_selector_requirement.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_lease.py b/contrib/python/kubernetes/kubernetes/client/models/v1_lease.py
index 3c30a125934..1d8fd9316d9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_lease.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_lease.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_lease_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_lease_list.py
index 5e6bb5fb828..2bcaebe757a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_lease_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_lease_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_lease_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_lease_spec.py
index 7d623858297..7a2e3833d5a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_lease_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_lease_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle.py b/contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle.py
index 164fcb02191..ea099511f61 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle_handler.py b/contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle_handler.py
index bc6cfb64cce..5a099eb9fd1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle_handler.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_lifecycle_handler.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range.py b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range.py
index 3eb6be6351a..15b43e074ea 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_item.py b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_item.py
index df6c94b9a63..2f49e63d2f2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_item.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_item.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_list.py
index 94361103084..26073c46d4d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_spec.py
index b05901db188..b0b3abf7f36 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_range_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_response.py b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_response.py
index 67f1c4cfb80..04c09651120 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_limit_response.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_limit_response.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_limited_priority_level_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_limited_priority_level_configuration.py
index a3f3dd21678..e68efef0ed8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_limited_priority_level_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_limited_priority_level_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_linux_container_user.py b/contrib/python/kubernetes/kubernetes/client/models/v1_linux_container_user.py
index 0c15e2514ee..efa421234c0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_linux_container_user.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_linux_container_user.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_list_meta.py b/contrib/python/kubernetes/kubernetes/client/models/v1_list_meta.py
index 5bd9f324d68..3afeefa254c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_list_meta.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_list_meta.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_ingress.py b/contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_ingress.py
index f5e50aeb711..6a36f98721e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_ingress.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_ingress.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_status.py
index 5622d2bef90..9987d0089a5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_load_balancer_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_local_object_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_local_object_reference.py
index e4023cf0c6e..961a4c7a9d9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_local_object_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_local_object_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_local_subject_access_review.py b/contrib/python/kubernetes/kubernetes/client/models/v1_local_subject_access_review.py
index 2c1efb4da08..99befc078c0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_local_subject_access_review.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_local_subject_access_review.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_local_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_local_volume_source.py
index d7e20cdb703..08a3d9b2875 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_local_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_local_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_managed_fields_entry.py b/contrib/python/kubernetes/kubernetes/client/models/v1_managed_fields_entry.py
index 17532f6cb1f..f04e5258b34 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_managed_fields_entry.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_managed_fields_entry.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_match_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_match_condition.py
index 2c048562867..4e1d8b73e1d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_match_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_match_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_match_resources.py b/contrib/python/kubernetes/kubernetes/client/models/v1_match_resources.py
index 4fd99d647ee..bd04f8a16f0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_match_resources.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_match_resources.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_modify_volume_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_modify_volume_status.py
index 713cd5d2bf7..03b426b8fe9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_modify_volume_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_modify_volume_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook.py b/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook.py
index cb4b86b015b..39bb864f2d6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration.py
index f0755b874f8..dcfb60dd21a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration_list.py
index 526e8e939f9..b7b02ea7986 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_mutating_webhook_configuration_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_named_rule_with_operations.py b/contrib/python/kubernetes/kubernetes/client/models/v1_named_rule_with_operations.py
index 04f9ee1c5ec..681b2567a14 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_named_rule_with_operations.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_named_rule_with_operations.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace.py b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace.py
index cbda60af407..19f0391c896 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_condition.py
index a342914f774..16bff6963f9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_list.py
index 4c31f7a19f5..a461666a13b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_spec.py
index ab9a0d0308c..aee6bf87dc1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_status.py
index b154803fe09..0cd6741bf2f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_network_device_data.py b/contrib/python/kubernetes/kubernetes/client/models/v1_network_device_data.py
index 9f25dfae33f..65738c57a6a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_network_device_data.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_network_device_data.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3NetworkDeviceData(object):
+class V1NetworkDeviceData(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -45,7 +45,7 @@ class V1alpha3NetworkDeviceData(object):
}
def __init__(self, hardware_address=None, interface_name=None, ips=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3NetworkDeviceData - a model defined in OpenAPI""" # noqa: E501
+ """V1NetworkDeviceData - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -64,22 +64,22 @@ class V1alpha3NetworkDeviceData(object):
@property
def hardware_address(self):
- """Gets the hardware_address of this V1alpha3NetworkDeviceData. # noqa: E501
+ """Gets the hardware_address of this V1NetworkDeviceData. # noqa: E501
HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. Must not be longer than 128 characters. # noqa: E501
- :return: The hardware_address of this V1alpha3NetworkDeviceData. # noqa: E501
+ :return: The hardware_address of this V1NetworkDeviceData. # noqa: E501
:rtype: str
"""
return self._hardware_address
@hardware_address.setter
def hardware_address(self, hardware_address):
- """Sets the hardware_address of this V1alpha3NetworkDeviceData.
+ """Sets the hardware_address of this V1NetworkDeviceData.
HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. Must not be longer than 128 characters. # noqa: E501
- :param hardware_address: The hardware_address of this V1alpha3NetworkDeviceData. # noqa: E501
+ :param hardware_address: The hardware_address of this V1NetworkDeviceData. # noqa: E501
:type: str
"""
@@ -87,22 +87,22 @@ class V1alpha3NetworkDeviceData(object):
@property
def interface_name(self):
- """Gets the interface_name of this V1alpha3NetworkDeviceData. # noqa: E501
+ """Gets the interface_name of this V1NetworkDeviceData. # noqa: E501
InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod. Must not be longer than 256 characters. # noqa: E501
- :return: The interface_name of this V1alpha3NetworkDeviceData. # noqa: E501
+ :return: The interface_name of this V1NetworkDeviceData. # noqa: E501
:rtype: str
"""
return self._interface_name
@interface_name.setter
def interface_name(self, interface_name):
- """Sets the interface_name of this V1alpha3NetworkDeviceData.
+ """Sets the interface_name of this V1NetworkDeviceData.
InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod. Must not be longer than 256 characters. # noqa: E501
- :param interface_name: The interface_name of this V1alpha3NetworkDeviceData. # noqa: E501
+ :param interface_name: The interface_name of this V1NetworkDeviceData. # noqa: E501
:type: str
"""
@@ -110,22 +110,22 @@ class V1alpha3NetworkDeviceData(object):
@property
def ips(self):
- """Gets the ips of this V1alpha3NetworkDeviceData. # noqa: E501
+ """Gets the ips of this V1NetworkDeviceData. # noqa: E501
- IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6. Must not contain more than 16 entries. # noqa: E501
+ IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6. # noqa: E501
- :return: The ips of this V1alpha3NetworkDeviceData. # noqa: E501
+ :return: The ips of this V1NetworkDeviceData. # noqa: E501
:rtype: list[str]
"""
return self._ips
@ips.setter
def ips(self, ips):
- """Sets the ips of this V1alpha3NetworkDeviceData.
+ """Sets the ips of this V1NetworkDeviceData.
- IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6. Must not contain more than 16 entries. # noqa: E501
+ IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6. # noqa: E501
- :param ips: The ips of this V1alpha3NetworkDeviceData. # noqa: E501
+ :param ips: The ips of this V1NetworkDeviceData. # noqa: E501
:type: list[str]
"""
@@ -165,14 +165,14 @@ class V1alpha3NetworkDeviceData(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3NetworkDeviceData):
+ if not isinstance(other, V1NetworkDeviceData):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3NetworkDeviceData):
+ if not isinstance(other, V1NetworkDeviceData):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy.py
index f90bb0070f7..9f82593829b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_egress_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_egress_rule.py
index eda7ef1f466..09ccfeaa3e2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_egress_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_egress_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_ingress_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_ingress_rule.py
index 96dc0973a91..756ed636c69 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_ingress_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_ingress_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_list.py
index 4e302bc220d..d82d00d564c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_peer.py b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_peer.py
index d49a81360f7..9ec98614809 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_peer.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_peer.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_port.py b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_port.py
index 69a8a02ff26..24261eeb821 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_port.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_port.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_spec.py
index 404f1f4b992..bb98e26fb52 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_network_policy_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -62,7 +62,8 @@ class V1NetworkPolicySpec(object):
self.egress = egress
if ingress is not None:
self.ingress = ingress
- self.pod_selector = pod_selector
+ if pod_selector is not None:
+ self.pod_selector = pod_selector
if policy_types is not None:
self.policy_types = policy_types
@@ -130,8 +131,6 @@ class V1NetworkPolicySpec(object):
:param pod_selector: The pod_selector of this V1NetworkPolicySpec. # noqa: E501
:type: V1LabelSelector
"""
- if self.local_vars_configuration.client_side_validation and pod_selector is None: # noqa: E501
- raise ValueError("Invalid value for `pod_selector`, must not be `None`") # noqa: E501
self._pod_selector = pod_selector
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_nfs_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_nfs_volume_source.py
index 8c9ccfcbd0c..2956f771166 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_nfs_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_nfs_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node.py
index a41a077bb87..9c45b750184 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_address.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_address.py
index a5b4cdcd734..8a23135ac62 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_address.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_address.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_affinity.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_affinity.py
index 52abd5eabdc..9e622b28b33 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_affinity.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_affinity.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_condition.py
index 1da94ac87b8..f4314a0ea1e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_config_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_config_source.py
index 9f5fe3a2242..32f063305ac 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_config_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_config_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_config_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_config_status.py
index 34359d547a9..e9c56985d58 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_config_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_config_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_daemon_endpoints.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_daemon_endpoints.py
index 0b8941c3df5..01335d9c987 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_daemon_endpoints.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_daemon_endpoints.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_features.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_features.py
index 294febb2541..a585752e95a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_features.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_features.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_list.py
index 6a1df68b56f..039295a0a05 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler.py
index cdd7ec6e838..2a27296bdd6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler_features.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler_features.py
index bff5623128b..9c100225bdf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler_features.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler_features.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector.py
index 441335e6f1e..add232fcfd3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_requirement.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_requirement.py
index fe05c009335..6912b565381 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_requirement.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_requirement.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_term.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_term.py
index 71d15aa4e36..c0c48ca81c6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_term.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_selector_term.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_spec.py
index f440ab66c5d..b825df65a18 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_status.py
index 5bf9602a797..6a6813ff6b8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_swap_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_swap_status.py
index 20908eab15e..dbfd9cbafdc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_swap_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_swap_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_node_system_info.py b/contrib/python/kubernetes/kubernetes/client/models/v1_node_system_info.py
index 8aec82b3f8b..b45381fcb06 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_node_system_info.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_system_info.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_attributes.py b/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_attributes.py
index d10efbb7390..19de5c1490e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_attributes.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_attributes.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_policy_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_policy_rule.py
index 3cb6bc67651..12816761539 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_policy_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_policy_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_rule.py
index 79478d79581..257d1454851 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_non_resource_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_object_field_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1_object_field_selector.py
index f33086d6dcc..865a2852e9d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_object_field_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_object_field_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_object_meta.py b/contrib/python/kubernetes/kubernetes/client/models/v1_object_meta.py
index 90bf830de99..f511b4cc94d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_object_meta.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_object_meta.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_object_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_object_reference.py
index 337980dd4d9..758b2c9876b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_object_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_object_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_opaque_device_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_opaque_device_configuration.py
index 4022ca465e9..0f7cd4565bb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_opaque_device_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_opaque_device_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3OpaqueDeviceConfiguration(object):
+class V1OpaqueDeviceConfiguration(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -43,7 +43,7 @@ class V1alpha3OpaqueDeviceConfiguration(object):
}
def __init__(self, driver=None, parameters=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3OpaqueDeviceConfiguration - a model defined in OpenAPI""" # noqa: E501
+ """V1OpaqueDeviceConfiguration - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -57,22 +57,22 @@ class V1alpha3OpaqueDeviceConfiguration(object):
@property
def driver(self):
- """Gets the driver of this V1alpha3OpaqueDeviceConfiguration. # noqa: E501
+ """Gets the driver of this V1OpaqueDeviceConfiguration. # noqa: E501
Driver is used to determine which kubelet plugin needs to be passed these configuration parameters. An admission policy provided by the driver developer could use this to decide whether it needs to validate them. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. # noqa: E501
- :return: The driver of this V1alpha3OpaqueDeviceConfiguration. # noqa: E501
+ :return: The driver of this V1OpaqueDeviceConfiguration. # noqa: E501
:rtype: str
"""
return self._driver
@driver.setter
def driver(self, driver):
- """Sets the driver of this V1alpha3OpaqueDeviceConfiguration.
+ """Sets the driver of this V1OpaqueDeviceConfiguration.
Driver is used to determine which kubelet plugin needs to be passed these configuration parameters. An admission policy provided by the driver developer could use this to decide whether it needs to validate them. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. # noqa: E501
- :param driver: The driver of this V1alpha3OpaqueDeviceConfiguration. # noqa: E501
+ :param driver: The driver of this V1OpaqueDeviceConfiguration. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and driver is None: # noqa: E501
@@ -82,22 +82,22 @@ class V1alpha3OpaqueDeviceConfiguration(object):
@property
def parameters(self):
- """Gets the parameters of this V1alpha3OpaqueDeviceConfiguration. # noqa: E501
+ """Gets the parameters of this V1OpaqueDeviceConfiguration. # noqa: E501
Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions. The length of the raw data must be smaller or equal to 10 Ki. # noqa: E501
- :return: The parameters of this V1alpha3OpaqueDeviceConfiguration. # noqa: E501
+ :return: The parameters of this V1OpaqueDeviceConfiguration. # noqa: E501
:rtype: object
"""
return self._parameters
@parameters.setter
def parameters(self, parameters):
- """Sets the parameters of this V1alpha3OpaqueDeviceConfiguration.
+ """Sets the parameters of this V1OpaqueDeviceConfiguration.
Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions. The length of the raw data must be smaller or equal to 10 Ki. # noqa: E501
- :param parameters: The parameters of this V1alpha3OpaqueDeviceConfiguration. # noqa: E501
+ :param parameters: The parameters of this V1OpaqueDeviceConfiguration. # noqa: E501
:type: object
"""
if self.local_vars_configuration.client_side_validation and parameters is None: # noqa: E501
@@ -139,14 +139,14 @@ class V1alpha3OpaqueDeviceConfiguration(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3OpaqueDeviceConfiguration):
+ if not isinstance(other, V1OpaqueDeviceConfiguration):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3OpaqueDeviceConfiguration):
+ if not isinstance(other, V1OpaqueDeviceConfiguration):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_overhead.py b/contrib/python/kubernetes/kubernetes/client/models/v1_overhead.py
index ada4101ead1..1357b503308 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_overhead.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_overhead.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_owner_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_owner_reference.py
index 0e943ae9eea..95cd2e51acc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_owner_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_owner_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_param_kind.py b/contrib/python/kubernetes/kubernetes/client/models/v1_param_kind.py
index dab1990d165..5a89455279b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_param_kind.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_param_kind.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_param_ref.py b/contrib/python/kubernetes/kubernetes/client/models/v1_param_ref.py
index 48edb3ab54d..36ebe5f7359 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_param_ref.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_param_ref.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_parent_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_parent_reference.py
index 9988b506473..48314ea4868 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_parent_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_parent_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume.py
index d59ebf91d9d..26330c80257 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim.py
index 2ca5c141b9c..b6f5e2aef98 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_condition.py
index 62d57414689..faf57eace59 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_list.py
index 4233a118665..3b04f6d6c43 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_spec.py
index 86cbb6931fb..e87f6350100 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -226,7 +226,7 @@ class V1PersistentVolumeClaimSpec(object):
def volume_attributes_class_name(self):
"""Gets the volume_attributes_class_name of this V1PersistentVolumeClaimSpec. # noqa: E501
- volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). # noqa: E501
+ volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string or nil value indicates that no VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, this field can be reset to its previous value (including nil) to cancel the modification. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ # noqa: E501
:return: The volume_attributes_class_name of this V1PersistentVolumeClaimSpec. # noqa: E501
:rtype: str
@@ -237,7 +237,7 @@ class V1PersistentVolumeClaimSpec(object):
def volume_attributes_class_name(self, volume_attributes_class_name):
"""Sets the volume_attributes_class_name of this V1PersistentVolumeClaimSpec.
- volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). # noqa: E501
+ volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string or nil value indicates that no VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, this field can be reset to its previous value (including nil) to cancel the modification. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ # noqa: E501
:param volume_attributes_class_name: The volume_attributes_class_name of this V1PersistentVolumeClaimSpec. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_status.py
index 07287a48bd6..bf9fae84385 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -206,7 +206,7 @@ class V1PersistentVolumeClaimStatus(object):
def current_volume_attributes_class_name(self):
"""Gets the current_volume_attributes_class_name of this V1PersistentVolumeClaimStatus. # noqa: E501
- currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is a beta field and requires enabling VolumeAttributesClass feature (off by default). # noqa: E501
+ currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim # noqa: E501
:return: The current_volume_attributes_class_name of this V1PersistentVolumeClaimStatus. # noqa: E501
:rtype: str
@@ -217,7 +217,7 @@ class V1PersistentVolumeClaimStatus(object):
def current_volume_attributes_class_name(self, current_volume_attributes_class_name):
"""Sets the current_volume_attributes_class_name of this V1PersistentVolumeClaimStatus.
- currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is a beta field and requires enabling VolumeAttributesClass feature (off by default). # noqa: E501
+ currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim # noqa: E501
:param current_volume_attributes_class_name: The current_volume_attributes_class_name of this V1PersistentVolumeClaimStatus. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_template.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_template.py
index 416fbed9658..d17a7a349b3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_template.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_template.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_volume_source.py
index 18a63c1c9ea..5ba94fa7eb6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_claim_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_list.py
index dcfaad94c93..9685f56746c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_spec.py
index 731924c0415..c65968820bd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -804,7 +804,7 @@ class V1PersistentVolumeSpec(object):
def volume_attributes_class_name(self):
"""Gets the volume_attributes_class_name of this V1PersistentVolumeSpec. # noqa: E501
- Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is a beta field and requires enabling VolumeAttributesClass feature (off by default). # noqa: E501
+ Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. # noqa: E501
:return: The volume_attributes_class_name of this V1PersistentVolumeSpec. # noqa: E501
:rtype: str
@@ -815,7 +815,7 @@ class V1PersistentVolumeSpec(object):
def volume_attributes_class_name(self, volume_attributes_class_name):
"""Sets the volume_attributes_class_name of this V1PersistentVolumeSpec.
- Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is a beta field and requires enabling VolumeAttributesClass feature (off by default). # noqa: E501
+ Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. # noqa: E501
:param volume_attributes_class_name: The volume_attributes_class_name of this V1PersistentVolumeSpec. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_status.py
index 56b17651482..3fc04d54897 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_photon_persistent_disk_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_photon_persistent_disk_volume_source.py
index 77bf33c7ff0..ad7f64a9919 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_photon_persistent_disk_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_photon_persistent_disk_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod.py
index 302fdb774e5..01b75cad0df 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity.py
index a8308d8280b..5f523eeb097 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity_term.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity_term.py
index 5ca260bd841..07bc0c4108d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity_term.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_affinity_term.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_anti_affinity.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_anti_affinity.py
index 71b5309c73d..b53b9ceeaef 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_anti_affinity.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_anti_affinity.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -61,7 +61,7 @@ class V1PodAntiAffinity(object):
def preferred_during_scheduling_ignored_during_execution(self):
"""Gets the preferred_during_scheduling_ignored_during_execution of this V1PodAntiAffinity. # noqa: E501
- The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. # noqa: E501
+ The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and subtracting \"weight\" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. # noqa: E501
:return: The preferred_during_scheduling_ignored_during_execution of this V1PodAntiAffinity. # noqa: E501
:rtype: list[V1WeightedPodAffinityTerm]
@@ -72,7 +72,7 @@ class V1PodAntiAffinity(object):
def preferred_during_scheduling_ignored_during_execution(self, preferred_during_scheduling_ignored_during_execution):
"""Sets the preferred_during_scheduling_ignored_during_execution of this V1PodAntiAffinity.
- The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. # noqa: E501
+ The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and subtracting \"weight\" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. # noqa: E501
:param preferred_during_scheduling_ignored_during_execution: The preferred_during_scheduling_ignored_during_execution of this V1PodAntiAffinity. # noqa: E501
:type: list[V1WeightedPodAffinityTerm]
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_certificate_projection.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_certificate_projection.py
new file mode 100644
index 00000000000..6769611a617
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_certificate_projection.py
@@ -0,0 +1,264 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1PodCertificateProjection(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'certificate_chain_path': 'str',
+ 'credential_bundle_path': 'str',
+ 'key_path': 'str',
+ 'key_type': 'str',
+ 'max_expiration_seconds': 'int',
+ 'signer_name': 'str'
+ }
+
+ attribute_map = {
+ 'certificate_chain_path': 'certificateChainPath',
+ 'credential_bundle_path': 'credentialBundlePath',
+ 'key_path': 'keyPath',
+ 'key_type': 'keyType',
+ 'max_expiration_seconds': 'maxExpirationSeconds',
+ 'signer_name': 'signerName'
+ }
+
+ def __init__(self, certificate_chain_path=None, credential_bundle_path=None, key_path=None, key_type=None, max_expiration_seconds=None, signer_name=None, local_vars_configuration=None): # noqa: E501
+ """V1PodCertificateProjection - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._certificate_chain_path = None
+ self._credential_bundle_path = None
+ self._key_path = None
+ self._key_type = None
+ self._max_expiration_seconds = None
+ self._signer_name = None
+ self.discriminator = None
+
+ if certificate_chain_path is not None:
+ self.certificate_chain_path = certificate_chain_path
+ if credential_bundle_path is not None:
+ self.credential_bundle_path = credential_bundle_path
+ if key_path is not None:
+ self.key_path = key_path
+ self.key_type = key_type
+ if max_expiration_seconds is not None:
+ self.max_expiration_seconds = max_expiration_seconds
+ self.signer_name = signer_name
+
+ @property
+ def certificate_chain_path(self):
+ """Gets the certificate_chain_path of this V1PodCertificateProjection. # noqa: E501
+
+ Write the certificate chain at this path in the projected volume. Most applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check that the key and leaf certificate are consistent, because it is possible to read the files mid-rotation. # noqa: E501
+
+ :return: The certificate_chain_path of this V1PodCertificateProjection. # noqa: E501
+ :rtype: str
+ """
+ return self._certificate_chain_path
+
+ @certificate_chain_path.setter
+ def certificate_chain_path(self, certificate_chain_path):
+ """Sets the certificate_chain_path of this V1PodCertificateProjection.
+
+ Write the certificate chain at this path in the projected volume. Most applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check that the key and leaf certificate are consistent, because it is possible to read the files mid-rotation. # noqa: E501
+
+ :param certificate_chain_path: The certificate_chain_path of this V1PodCertificateProjection. # noqa: E501
+ :type: str
+ """
+
+ self._certificate_chain_path = certificate_chain_path
+
+ @property
+ def credential_bundle_path(self):
+ """Gets the credential_bundle_path of this V1PodCertificateProjection. # noqa: E501
+
+ Write the credential bundle at this path in the projected volume. The credential bundle is a single file that contains multiple PEM blocks. The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private key. The remaining blocks are CERTIFICATE blocks, containing the issued certificate chain from the signer (leaf and any intermediates). Using credentialBundlePath lets your Pod's application code make a single atomic read that retrieves a consistent key and certificate chain. If you project them to separate files, your application code will need to additionally check that the leaf certificate was issued to the key. # noqa: E501
+
+ :return: The credential_bundle_path of this V1PodCertificateProjection. # noqa: E501
+ :rtype: str
+ """
+ return self._credential_bundle_path
+
+ @credential_bundle_path.setter
+ def credential_bundle_path(self, credential_bundle_path):
+ """Sets the credential_bundle_path of this V1PodCertificateProjection.
+
+ Write the credential bundle at this path in the projected volume. The credential bundle is a single file that contains multiple PEM blocks. The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private key. The remaining blocks are CERTIFICATE blocks, containing the issued certificate chain from the signer (leaf and any intermediates). Using credentialBundlePath lets your Pod's application code make a single atomic read that retrieves a consistent key and certificate chain. If you project them to separate files, your application code will need to additionally check that the leaf certificate was issued to the key. # noqa: E501
+
+ :param credential_bundle_path: The credential_bundle_path of this V1PodCertificateProjection. # noqa: E501
+ :type: str
+ """
+
+ self._credential_bundle_path = credential_bundle_path
+
+ @property
+ def key_path(self):
+ """Gets the key_path of this V1PodCertificateProjection. # noqa: E501
+
+ Write the key at this path in the projected volume. Most applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check that the key and leaf certificate are consistent, because it is possible to read the files mid-rotation. # noqa: E501
+
+ :return: The key_path of this V1PodCertificateProjection. # noqa: E501
+ :rtype: str
+ """
+ return self._key_path
+
+ @key_path.setter
+ def key_path(self, key_path):
+ """Sets the key_path of this V1PodCertificateProjection.
+
+ Write the key at this path in the projected volume. Most applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check that the key and leaf certificate are consistent, because it is possible to read the files mid-rotation. # noqa: E501
+
+ :param key_path: The key_path of this V1PodCertificateProjection. # noqa: E501
+ :type: str
+ """
+
+ self._key_path = key_path
+
+ @property
+ def key_type(self):
+ """Gets the key_type of this V1PodCertificateProjection. # noqa: E501
+
+ The type of keypair Kubelet will generate for the pod. Valid values are \"RSA3072\", \"RSA4096\", \"ECDSAP256\", \"ECDSAP384\", \"ECDSAP521\", and \"ED25519\". # noqa: E501
+
+ :return: The key_type of this V1PodCertificateProjection. # noqa: E501
+ :rtype: str
+ """
+ return self._key_type
+
+ @key_type.setter
+ def key_type(self, key_type):
+ """Sets the key_type of this V1PodCertificateProjection.
+
+ The type of keypair Kubelet will generate for the pod. Valid values are \"RSA3072\", \"RSA4096\", \"ECDSAP256\", \"ECDSAP384\", \"ECDSAP521\", and \"ED25519\". # noqa: E501
+
+ :param key_type: The key_type of this V1PodCertificateProjection. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and key_type is None: # noqa: E501
+ raise ValueError("Invalid value for `key_type`, must not be `None`") # noqa: E501
+
+ self._key_type = key_type
+
+ @property
+ def max_expiration_seconds(self):
+ """Gets the max_expiration_seconds of this V1PodCertificateProjection. # noqa: E501
+
+ maxExpirationSeconds is the maximum lifetime permitted for the certificate. Kubelet copies this value verbatim into the PodCertificateRequests it generates for this projection. If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver will reject values shorter than 3600 (1 hour). The maximum allowable value is 7862400 (91 days). The signer implementation is then free to issue a certificate with any lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 seconds (1 hour). This constraint is enforced by kube-apiserver. `kubernetes.io` signers will never issue certificates with a lifetime longer than 24 hours. # noqa: E501
+
+ :return: The max_expiration_seconds of this V1PodCertificateProjection. # noqa: E501
+ :rtype: int
+ """
+ return self._max_expiration_seconds
+
+ @max_expiration_seconds.setter
+ def max_expiration_seconds(self, max_expiration_seconds):
+ """Sets the max_expiration_seconds of this V1PodCertificateProjection.
+
+ maxExpirationSeconds is the maximum lifetime permitted for the certificate. Kubelet copies this value verbatim into the PodCertificateRequests it generates for this projection. If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver will reject values shorter than 3600 (1 hour). The maximum allowable value is 7862400 (91 days). The signer implementation is then free to issue a certificate with any lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 seconds (1 hour). This constraint is enforced by kube-apiserver. `kubernetes.io` signers will never issue certificates with a lifetime longer than 24 hours. # noqa: E501
+
+ :param max_expiration_seconds: The max_expiration_seconds of this V1PodCertificateProjection. # noqa: E501
+ :type: int
+ """
+
+ self._max_expiration_seconds = max_expiration_seconds
+
+ @property
+ def signer_name(self):
+ """Gets the signer_name of this V1PodCertificateProjection. # noqa: E501
+
+ Kubelet's generated CSRs will be addressed to this signer. # noqa: E501
+
+ :return: The signer_name of this V1PodCertificateProjection. # noqa: E501
+ :rtype: str
+ """
+ return self._signer_name
+
+ @signer_name.setter
+ def signer_name(self, signer_name):
+ """Sets the signer_name of this V1PodCertificateProjection.
+
+ Kubelet's generated CSRs will be addressed to this signer. # noqa: E501
+
+ :param signer_name: The signer_name of this V1PodCertificateProjection. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and signer_name is None: # noqa: E501
+ raise ValueError("Invalid value for `signer_name`, must not be `None`") # noqa: E501
+
+ self._signer_name = signer_name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1PodCertificateProjection):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1PodCertificateProjection):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_condition.py
index df58dd580e8..a20ef66ba32 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget.py
index f4ced43577f..b1ac0f427da 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_list.py
index 1a9bfd038a6..3f41186eea1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_spec.py
index b1ccd90ef23..d320020f4e3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_status.py
index 1f4913b5430..87d83a3fa9c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_disruption_budget_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config.py
index 1de3ef23f61..9b9d78c37c2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config_option.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config_option.py
index 253861a9cfe..3df72a1b857 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config_option.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_dns_config_option.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_extended_resource_claim_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_extended_resource_claim_status.py
new file mode 100644
index 00000000000..6bddcd7a1a3
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_extended_resource_claim_status.py
@@ -0,0 +1,152 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1PodExtendedResourceClaimStatus(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'request_mappings': 'list[V1ContainerExtendedResourceRequest]',
+ 'resource_claim_name': 'str'
+ }
+
+ attribute_map = {
+ 'request_mappings': 'requestMappings',
+ 'resource_claim_name': 'resourceClaimName'
+ }
+
+ def __init__(self, request_mappings=None, resource_claim_name=None, local_vars_configuration=None): # noqa: E501
+ """V1PodExtendedResourceClaimStatus - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._request_mappings = None
+ self._resource_claim_name = None
+ self.discriminator = None
+
+ self.request_mappings = request_mappings
+ self.resource_claim_name = resource_claim_name
+
+ @property
+ def request_mappings(self):
+ """Gets the request_mappings of this V1PodExtendedResourceClaimStatus. # noqa: E501
+
+ RequestMappings identifies the mapping of <container, extended resource backed by DRA> to device request in the generated ResourceClaim. # noqa: E501
+
+ :return: The request_mappings of this V1PodExtendedResourceClaimStatus. # noqa: E501
+ :rtype: list[V1ContainerExtendedResourceRequest]
+ """
+ return self._request_mappings
+
+ @request_mappings.setter
+ def request_mappings(self, request_mappings):
+ """Sets the request_mappings of this V1PodExtendedResourceClaimStatus.
+
+ RequestMappings identifies the mapping of <container, extended resource backed by DRA> to device request in the generated ResourceClaim. # noqa: E501
+
+ :param request_mappings: The request_mappings of this V1PodExtendedResourceClaimStatus. # noqa: E501
+ :type: list[V1ContainerExtendedResourceRequest]
+ """
+ if self.local_vars_configuration.client_side_validation and request_mappings is None: # noqa: E501
+ raise ValueError("Invalid value for `request_mappings`, must not be `None`") # noqa: E501
+
+ self._request_mappings = request_mappings
+
+ @property
+ def resource_claim_name(self):
+ """Gets the resource_claim_name of this V1PodExtendedResourceClaimStatus. # noqa: E501
+
+ ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. # noqa: E501
+
+ :return: The resource_claim_name of this V1PodExtendedResourceClaimStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._resource_claim_name
+
+ @resource_claim_name.setter
+ def resource_claim_name(self, resource_claim_name):
+ """Sets the resource_claim_name of this V1PodExtendedResourceClaimStatus.
+
+ ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. # noqa: E501
+
+ :param resource_claim_name: The resource_claim_name of this V1PodExtendedResourceClaimStatus. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and resource_claim_name is None: # noqa: E501
+ raise ValueError("Invalid value for `resource_claim_name`, must not be `None`") # noqa: E501
+
+ self._resource_claim_name = resource_claim_name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1PodExtendedResourceClaimStatus):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1PodExtendedResourceClaimStatus):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy.py
index 24735a7552d..1ea0353cdd8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_exit_codes_requirement.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_exit_codes_requirement.py
index b22aad2424a..428ce095ba4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_exit_codes_requirement.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_exit_codes_requirement.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_pod_conditions_pattern.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_pod_conditions_pattern.py
index 8bff4188591..aea817918ae 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_pod_conditions_pattern.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_on_pod_conditions_pattern.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_rule.py
index dd7593afb7f..8a99a55b53e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_failure_policy_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_ip.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_ip.py
index 9527215cff2..699582fe181 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_ip.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_ip.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_list.py
index c5f5506b68a..d5784f4b0ab 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_os.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_os.py
index 79d212fc47b..aefe6cecb6a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_os.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_os.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_readiness_gate.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_readiness_gate.py
index 6d8f4b227bb..7346d676c97 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_readiness_gate.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_readiness_gate.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim.py
index 27346a5b424..5514a128caf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim_status.py
index fb2ff9c27a5..71bff73bcfa 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_resource_claim_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_scheduling_gate.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_scheduling_gate.py
index 91e65caeb53..e8802ec8fb3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_scheduling_gate.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_scheduling_gate.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_security_context.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_security_context.py
index f131057672f..0921b032276 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_security_context.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_security_context.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_spec.py
index d3af1239694..5ff6f7fe372 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -47,6 +47,7 @@ class V1PodSpec(object):
'host_pid': 'bool',
'host_users': 'bool',
'hostname': 'str',
+ 'hostname_override': 'str',
'image_pull_secrets': 'list[V1LocalObjectReference]',
'init_containers': 'list[V1Container]',
'node_name': 'str',
@@ -90,6 +91,7 @@ class V1PodSpec(object):
'host_pid': 'hostPID',
'host_users': 'hostUsers',
'hostname': 'hostname',
+ 'hostname_override': 'hostnameOverride',
'image_pull_secrets': 'imagePullSecrets',
'init_containers': 'initContainers',
'node_name': 'nodeName',
@@ -118,7 +120,7 @@ class V1PodSpec(object):
'volumes': 'volumes'
}
- def __init__(self, active_deadline_seconds=None, affinity=None, automount_service_account_token=None, containers=None, dns_config=None, dns_policy=None, enable_service_links=None, ephemeral_containers=None, host_aliases=None, host_ipc=None, host_network=None, host_pid=None, host_users=None, hostname=None, image_pull_secrets=None, init_containers=None, node_name=None, node_selector=None, os=None, overhead=None, preemption_policy=None, priority=None, priority_class_name=None, readiness_gates=None, resource_claims=None, resources=None, restart_policy=None, runtime_class_name=None, scheduler_name=None, scheduling_gates=None, security_context=None, service_account=None, service_account_name=None, set_hostname_as_fqdn=None, share_process_namespace=None, subdomain=None, termination_grace_period_seconds=None, tolerations=None, topology_spread_constraints=None, volumes=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, active_deadline_seconds=None, affinity=None, automount_service_account_token=None, containers=None, dns_config=None, dns_policy=None, enable_service_links=None, ephemeral_containers=None, host_aliases=None, host_ipc=None, host_network=None, host_pid=None, host_users=None, hostname=None, hostname_override=None, image_pull_secrets=None, init_containers=None, node_name=None, node_selector=None, os=None, overhead=None, preemption_policy=None, priority=None, priority_class_name=None, readiness_gates=None, resource_claims=None, resources=None, restart_policy=None, runtime_class_name=None, scheduler_name=None, scheduling_gates=None, security_context=None, service_account=None, service_account_name=None, set_hostname_as_fqdn=None, share_process_namespace=None, subdomain=None, termination_grace_period_seconds=None, tolerations=None, topology_spread_constraints=None, volumes=None, local_vars_configuration=None): # noqa: E501
"""V1PodSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -138,6 +140,7 @@ class V1PodSpec(object):
self._host_pid = None
self._host_users = None
self._hostname = None
+ self._hostname_override = None
self._image_pull_secrets = None
self._init_containers = None
self._node_name = None
@@ -193,6 +196,8 @@ class V1PodSpec(object):
self.host_users = host_users
if hostname is not None:
self.hostname = hostname
+ if hostname_override is not None:
+ self.hostname_override = hostname_override
if image_pull_secrets is not None:
self.image_pull_secrets = image_pull_secrets
if init_containers is not None:
@@ -478,7 +483,7 @@ class V1PodSpec(object):
def host_network(self):
"""Gets the host_network of this V1PodSpec. # noqa: E501
- Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. # noqa: E501
+ Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false. # noqa: E501
:return: The host_network of this V1PodSpec. # noqa: E501
:rtype: bool
@@ -489,7 +494,7 @@ class V1PodSpec(object):
def host_network(self, host_network):
"""Sets the host_network of this V1PodSpec.
- Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. # noqa: E501
+ Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false. # noqa: E501
:param host_network: The host_network of this V1PodSpec. # noqa: E501
:type: bool
@@ -567,6 +572,29 @@ class V1PodSpec(object):
self._hostname = hostname
@property
+ def hostname_override(self):
+ """Gets the hostname_override of this V1PodSpec. # noqa: E501
+
+ HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. This field only specifies the pod's hostname and does not affect its DNS records. When this field is set to a non-empty string: - It takes precedence over the values set in `hostname` and `subdomain`. - The Pod's hostname will be set to this value. - `setHostnameAsFQDN` must be nil or set to false. - `hostNetwork` must be set to false. This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. Requires the HostnameOverride feature gate to be enabled. # noqa: E501
+
+ :return: The hostname_override of this V1PodSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._hostname_override
+
+ @hostname_override.setter
+ def hostname_override(self, hostname_override):
+ """Sets the hostname_override of this V1PodSpec.
+
+ HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. This field only specifies the pod's hostname and does not affect its DNS records. When this field is set to a non-empty string: - It takes precedence over the values set in `hostname` and `subdomain`. - The Pod's hostname will be set to this value. - `setHostnameAsFQDN` must be nil or set to false. - `hostNetwork` must be set to false. This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. Requires the HostnameOverride feature gate to be enabled. # noqa: E501
+
+ :param hostname_override: The hostname_override of this V1PodSpec. # noqa: E501
+ :type: str
+ """
+
+ self._hostname_override = hostname_override
+
+ @property
def image_pull_secrets(self):
"""Gets the image_pull_secrets of this V1PodSpec. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_status.py
index 4430e2dfafd..1d9bf5aeb33 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -36,6 +36,7 @@ class V1PodStatus(object):
'conditions': 'list[V1PodCondition]',
'container_statuses': 'list[V1ContainerStatus]',
'ephemeral_container_statuses': 'list[V1ContainerStatus]',
+ 'extended_resource_claim_status': 'V1PodExtendedResourceClaimStatus',
'host_ip': 'str',
'host_i_ps': 'list[V1HostIP]',
'init_container_statuses': 'list[V1ContainerStatus]',
@@ -56,6 +57,7 @@ class V1PodStatus(object):
'conditions': 'conditions',
'container_statuses': 'containerStatuses',
'ephemeral_container_statuses': 'ephemeralContainerStatuses',
+ 'extended_resource_claim_status': 'extendedResourceClaimStatus',
'host_ip': 'hostIP',
'host_i_ps': 'hostIPs',
'init_container_statuses': 'initContainerStatuses',
@@ -72,7 +74,7 @@ class V1PodStatus(object):
'start_time': 'startTime'
}
- def __init__(self, conditions=None, container_statuses=None, ephemeral_container_statuses=None, host_ip=None, host_i_ps=None, init_container_statuses=None, message=None, nominated_node_name=None, observed_generation=None, phase=None, pod_ip=None, pod_i_ps=None, qos_class=None, reason=None, resize=None, resource_claim_statuses=None, start_time=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, conditions=None, container_statuses=None, ephemeral_container_statuses=None, extended_resource_claim_status=None, host_ip=None, host_i_ps=None, init_container_statuses=None, message=None, nominated_node_name=None, observed_generation=None, phase=None, pod_ip=None, pod_i_ps=None, qos_class=None, reason=None, resize=None, resource_claim_statuses=None, start_time=None, local_vars_configuration=None): # noqa: E501
"""V1PodStatus - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -81,6 +83,7 @@ class V1PodStatus(object):
self._conditions = None
self._container_statuses = None
self._ephemeral_container_statuses = None
+ self._extended_resource_claim_status = None
self._host_ip = None
self._host_i_ps = None
self._init_container_statuses = None
@@ -103,6 +106,8 @@ class V1PodStatus(object):
self.container_statuses = container_statuses
if ephemeral_container_statuses is not None:
self.ephemeral_container_statuses = ephemeral_container_statuses
+ if extended_resource_claim_status is not None:
+ self.extended_resource_claim_status = extended_resource_claim_status
if host_ip is not None:
self.host_ip = host_ip
if host_i_ps is not None:
@@ -202,6 +207,27 @@ class V1PodStatus(object):
self._ephemeral_container_statuses = ephemeral_container_statuses
@property
+ def extended_resource_claim_status(self):
+ """Gets the extended_resource_claim_status of this V1PodStatus. # noqa: E501
+
+
+ :return: The extended_resource_claim_status of this V1PodStatus. # noqa: E501
+ :rtype: V1PodExtendedResourceClaimStatus
+ """
+ return self._extended_resource_claim_status
+
+ @extended_resource_claim_status.setter
+ def extended_resource_claim_status(self, extended_resource_claim_status):
+ """Sets the extended_resource_claim_status of this V1PodStatus.
+
+
+ :param extended_resource_claim_status: The extended_resource_claim_status of this V1PodStatus. # noqa: E501
+ :type: V1PodExtendedResourceClaimStatus
+ """
+
+ self._extended_resource_claim_status = extended_resource_claim_status
+
+ @property
def host_ip(self):
"""Gets the host_ip of this V1PodStatus. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template.py
index 4589badf600..5a79513c8c4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_list.py
index e98ab25d31c..1c9c22f9006 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_spec.py
index 62457ca9726..548ea6240e2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_pod_template_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_policy_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_policy_rule.py
index acd22b65f62..0cdcce88d55 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_policy_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_policy_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_policy_rules_with_subjects.py b/contrib/python/kubernetes/kubernetes/client/models/v1_policy_rules_with_subjects.py
index ecac0a65ebd..74a68401ae5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_policy_rules_with_subjects.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_policy_rules_with_subjects.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_port_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_port_status.py
index 320d980a34e..5888f44fe63 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_port_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_port_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_portworx_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_portworx_volume_source.py
index d86ecbf68c8..3e19d142d5a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_portworx_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_portworx_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_preconditions.py b/contrib/python/kubernetes/kubernetes/client/models/v1_preconditions.py
index e30303ca2d9..52a414e3080 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_preconditions.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_preconditions.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_preferred_scheduling_term.py b/contrib/python/kubernetes/kubernetes/client/models/v1_preferred_scheduling_term.py
index fd66bb2eff5..8bf32d6316a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_preferred_scheduling_term.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_preferred_scheduling_term.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_class.py
index d6808b4d827..059bdcb4d58 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_class.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_class_list.py
index 4ceece8c780..daee5d4df44 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_class_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration.py
index d5524589027..3d9d62b3db6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_condition.py
index 6b586855c5c..6c62762548b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_list.py
index 1529ccc6c80..3a59a82d69f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_reference.py
index ea048377d49..aba241cb1b5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_spec.py
index 8d1a7bf1f35..bfe8f9dd257 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_status.py
index 38f51b9198e..2aa3598b7bd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_priority_level_configuration_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_probe.py b/contrib/python/kubernetes/kubernetes/client/models/v1_probe.py
index c71ec51ef0e..7bfddc2642c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_probe.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_probe.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_projected_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_projected_volume_source.py
index 268623cdc28..424ca2b0ae0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_projected_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_projected_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_queuing_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_queuing_configuration.py
index a5644ba58b3..784a9b6c115 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_queuing_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_queuing_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_quobyte_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_quobyte_volume_source.py
index fec13447fd3..9372359ee0d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_quobyte_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_quobyte_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_rbd_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_rbd_persistent_volume_source.py
index fee7c44076f..727da2a9325 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_rbd_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_rbd_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_rbd_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_rbd_volume_source.py
index e47f43e2903..31366b2b62a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_rbd_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_rbd_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set.py
index 91080ff54b1..e2082d810aa 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_condition.py
index ac88cabc7cc..3314048d11d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_list.py
index c6bf9bd52a0..feb0ab12605 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_spec.py
index db07c4f84db..03900d71ec7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_status.py
index 55ae0741f3d..667fb745c0c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replica_set_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller.py
index 9313e863b6f..6a1f376fec5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_condition.py
index 8a868881f38..dc802464400 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_list.py
index f909bf05c54..5d777a0d3d4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_spec.py
index 2c206087934..bc1547b4852 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_status.py
index 22c513a7320..bf13a4e9d55 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_replication_controller_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_attributes.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_attributes.py
index 5595310776e..bf8823dbbc7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_attributes.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_attributes.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_consumer_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_consumer_reference.py
index b9542799eb7..50af1ce6303 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_consumer_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_consumer_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceClaimConsumerReference(object):
+class V1ResourceClaimConsumerReference(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -47,7 +47,7 @@ class V1alpha3ResourceClaimConsumerReference(object):
}
def __init__(self, api_group=None, name=None, resource=None, uid=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceClaimConsumerReference - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceClaimConsumerReference - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -66,22 +66,22 @@ class V1alpha3ResourceClaimConsumerReference(object):
@property
def api_group(self):
- """Gets the api_group of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ """Gets the api_group of this V1ResourceClaimConsumerReference. # noqa: E501
APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources. # noqa: E501
- :return: The api_group of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ :return: The api_group of this V1ResourceClaimConsumerReference. # noqa: E501
:rtype: str
"""
return self._api_group
@api_group.setter
def api_group(self, api_group):
- """Sets the api_group of this V1alpha3ResourceClaimConsumerReference.
+ """Sets the api_group of this V1ResourceClaimConsumerReference.
APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources. # noqa: E501
- :param api_group: The api_group of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ :param api_group: The api_group of this V1ResourceClaimConsumerReference. # noqa: E501
:type: str
"""
@@ -89,22 +89,22 @@ class V1alpha3ResourceClaimConsumerReference(object):
@property
def name(self):
- """Gets the name of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ """Gets the name of this V1ResourceClaimConsumerReference. # noqa: E501
Name is the name of resource being referenced. # noqa: E501
- :return: The name of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ :return: The name of this V1ResourceClaimConsumerReference. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
- """Sets the name of this V1alpha3ResourceClaimConsumerReference.
+ """Sets the name of this V1ResourceClaimConsumerReference.
Name is the name of resource being referenced. # noqa: E501
- :param name: The name of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ :param name: The name of this V1ResourceClaimConsumerReference. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
@@ -114,22 +114,22 @@ class V1alpha3ResourceClaimConsumerReference(object):
@property
def resource(self):
- """Gets the resource of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ """Gets the resource of this V1ResourceClaimConsumerReference. # noqa: E501
Resource is the type of resource being referenced, for example \"pods\". # noqa: E501
- :return: The resource of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ :return: The resource of this V1ResourceClaimConsumerReference. # noqa: E501
:rtype: str
"""
return self._resource
@resource.setter
def resource(self, resource):
- """Sets the resource of this V1alpha3ResourceClaimConsumerReference.
+ """Sets the resource of this V1ResourceClaimConsumerReference.
Resource is the type of resource being referenced, for example \"pods\". # noqa: E501
- :param resource: The resource of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ :param resource: The resource of this V1ResourceClaimConsumerReference. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and resource is None: # noqa: E501
@@ -139,22 +139,22 @@ class V1alpha3ResourceClaimConsumerReference(object):
@property
def uid(self):
- """Gets the uid of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ """Gets the uid of this V1ResourceClaimConsumerReference. # noqa: E501
UID identifies exactly one incarnation of the resource. # noqa: E501
- :return: The uid of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ :return: The uid of this V1ResourceClaimConsumerReference. # noqa: E501
:rtype: str
"""
return self._uid
@uid.setter
def uid(self, uid):
- """Sets the uid of this V1alpha3ResourceClaimConsumerReference.
+ """Sets the uid of this V1ResourceClaimConsumerReference.
UID identifies exactly one incarnation of the resource. # noqa: E501
- :param uid: The uid of this V1alpha3ResourceClaimConsumerReference. # noqa: E501
+ :param uid: The uid of this V1ResourceClaimConsumerReference. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and uid is None: # noqa: E501
@@ -196,14 +196,14 @@ class V1alpha3ResourceClaimConsumerReference(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceClaimConsumerReference):
+ if not isinstance(other, V1ResourceClaimConsumerReference):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceClaimConsumerReference):
+ if not isinstance(other, V1ResourceClaimConsumerReference):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_list.py
index bcf05b7e156..d075edcad08 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceClaimList(object):
+class V1ResourceClaimList(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,7 +34,7 @@ class V1alpha3ResourceClaimList(object):
"""
openapi_types = {
'api_version': 'str',
- 'items': 'list[V1alpha3ResourceClaim]',
+ 'items': 'list[ResourceV1ResourceClaim]',
'kind': 'str',
'metadata': 'V1ListMeta'
}
@@ -47,7 +47,7 @@ class V1alpha3ResourceClaimList(object):
}
def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceClaimList - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceClaimList - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +68,22 @@ class V1alpha3ResourceClaimList(object):
@property
def api_version(self):
- """Gets the api_version of this V1alpha3ResourceClaimList. # noqa: E501
+ """Gets the api_version of this V1ResourceClaimList. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1alpha3ResourceClaimList. # noqa: E501
+ :return: The api_version of this V1ResourceClaimList. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1alpha3ResourceClaimList.
+ """Sets the api_version of this V1ResourceClaimList.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1alpha3ResourceClaimList. # noqa: E501
+ :param api_version: The api_version of this V1ResourceClaimList. # noqa: E501
:type: str
"""
@@ -91,23 +91,23 @@ class V1alpha3ResourceClaimList(object):
@property
def items(self):
- """Gets the items of this V1alpha3ResourceClaimList. # noqa: E501
+ """Gets the items of this V1ResourceClaimList. # noqa: E501
Items is the list of resource claims. # noqa: E501
- :return: The items of this V1alpha3ResourceClaimList. # noqa: E501
- :rtype: list[V1alpha3ResourceClaim]
+ :return: The items of this V1ResourceClaimList. # noqa: E501
+ :rtype: list[ResourceV1ResourceClaim]
"""
return self._items
@items.setter
def items(self, items):
- """Sets the items of this V1alpha3ResourceClaimList.
+ """Sets the items of this V1ResourceClaimList.
Items is the list of resource claims. # noqa: E501
- :param items: The items of this V1alpha3ResourceClaimList. # noqa: E501
- :type: list[V1alpha3ResourceClaim]
+ :param items: The items of this V1ResourceClaimList. # noqa: E501
+ :type: list[ResourceV1ResourceClaim]
"""
if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501
raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501
@@ -116,22 +116,22 @@ class V1alpha3ResourceClaimList(object):
@property
def kind(self):
- """Gets the kind of this V1alpha3ResourceClaimList. # noqa: E501
+ """Gets the kind of this V1ResourceClaimList. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1alpha3ResourceClaimList. # noqa: E501
+ :return: The kind of this V1ResourceClaimList. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1alpha3ResourceClaimList.
+ """Sets the kind of this V1ResourceClaimList.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1alpha3ResourceClaimList. # noqa: E501
+ :param kind: The kind of this V1ResourceClaimList. # noqa: E501
:type: str
"""
@@ -139,20 +139,20 @@ class V1alpha3ResourceClaimList(object):
@property
def metadata(self):
- """Gets the metadata of this V1alpha3ResourceClaimList. # noqa: E501
+ """Gets the metadata of this V1ResourceClaimList. # noqa: E501
- :return: The metadata of this V1alpha3ResourceClaimList. # noqa: E501
+ :return: The metadata of this V1ResourceClaimList. # noqa: E501
:rtype: V1ListMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1alpha3ResourceClaimList.
+ """Sets the metadata of this V1ResourceClaimList.
- :param metadata: The metadata of this V1alpha3ResourceClaimList. # noqa: E501
+ :param metadata: The metadata of this V1ResourceClaimList. # noqa: E501
:type: V1ListMeta
"""
@@ -192,14 +192,14 @@ class V1alpha3ResourceClaimList(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceClaimList):
+ if not isinstance(other, V1ResourceClaimList):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceClaimList):
+ if not isinstance(other, V1ResourceClaimList):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_spec.py
index c381f823f16..97f5e3b79fe 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceClaimSpec(object):
+class V1ResourceClaimSpec(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,7 +33,7 @@ class V1alpha3ResourceClaimSpec(object):
and the value is json key in definition.
"""
openapi_types = {
- 'devices': 'V1alpha3DeviceClaim'
+ 'devices': 'V1DeviceClaim'
}
attribute_map = {
@@ -41,7 +41,7 @@ class V1alpha3ResourceClaimSpec(object):
}
def __init__(self, devices=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceClaimSpec - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceClaimSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -54,21 +54,21 @@ class V1alpha3ResourceClaimSpec(object):
@property
def devices(self):
- """Gets the devices of this V1alpha3ResourceClaimSpec. # noqa: E501
+ """Gets the devices of this V1ResourceClaimSpec. # noqa: E501
- :return: The devices of this V1alpha3ResourceClaimSpec. # noqa: E501
- :rtype: V1alpha3DeviceClaim
+ :return: The devices of this V1ResourceClaimSpec. # noqa: E501
+ :rtype: V1DeviceClaim
"""
return self._devices
@devices.setter
def devices(self, devices):
- """Sets the devices of this V1alpha3ResourceClaimSpec.
+ """Sets the devices of this V1ResourceClaimSpec.
- :param devices: The devices of this V1alpha3ResourceClaimSpec. # noqa: E501
- :type: V1alpha3DeviceClaim
+ :param devices: The devices of this V1ResourceClaimSpec. # noqa: E501
+ :type: V1DeviceClaim
"""
self._devices = devices
@@ -107,14 +107,14 @@ class V1alpha3ResourceClaimSpec(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceClaimSpec):
+ if not isinstance(other, V1ResourceClaimSpec):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceClaimSpec):
+ if not isinstance(other, V1ResourceClaimSpec):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_status.py
index c0f8ac76d52..e9d03b08807 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceClaimStatus(object):
+class V1ResourceClaimStatus(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -33,9 +33,9 @@ class V1alpha3ResourceClaimStatus(object):
and the value is json key in definition.
"""
openapi_types = {
- 'allocation': 'V1alpha3AllocationResult',
- 'devices': 'list[V1alpha3AllocatedDeviceStatus]',
- 'reserved_for': 'list[V1alpha3ResourceClaimConsumerReference]'
+ 'allocation': 'V1AllocationResult',
+ 'devices': 'list[V1AllocatedDeviceStatus]',
+ 'reserved_for': 'list[V1ResourceClaimConsumerReference]'
}
attribute_map = {
@@ -45,7 +45,7 @@ class V1alpha3ResourceClaimStatus(object):
}
def __init__(self, allocation=None, devices=None, reserved_for=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceClaimStatus - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceClaimStatus - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -64,67 +64,67 @@ class V1alpha3ResourceClaimStatus(object):
@property
def allocation(self):
- """Gets the allocation of this V1alpha3ResourceClaimStatus. # noqa: E501
+ """Gets the allocation of this V1ResourceClaimStatus. # noqa: E501
- :return: The allocation of this V1alpha3ResourceClaimStatus. # noqa: E501
- :rtype: V1alpha3AllocationResult
+ :return: The allocation of this V1ResourceClaimStatus. # noqa: E501
+ :rtype: V1AllocationResult
"""
return self._allocation
@allocation.setter
def allocation(self, allocation):
- """Sets the allocation of this V1alpha3ResourceClaimStatus.
+ """Sets the allocation of this V1ResourceClaimStatus.
- :param allocation: The allocation of this V1alpha3ResourceClaimStatus. # noqa: E501
- :type: V1alpha3AllocationResult
+ :param allocation: The allocation of this V1ResourceClaimStatus. # noqa: E501
+ :type: V1AllocationResult
"""
self._allocation = allocation
@property
def devices(self):
- """Gets the devices of this V1alpha3ResourceClaimStatus. # noqa: E501
+ """Gets the devices of this V1ResourceClaimStatus. # noqa: E501
Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers. # noqa: E501
- :return: The devices of this V1alpha3ResourceClaimStatus. # noqa: E501
- :rtype: list[V1alpha3AllocatedDeviceStatus]
+ :return: The devices of this V1ResourceClaimStatus. # noqa: E501
+ :rtype: list[V1AllocatedDeviceStatus]
"""
return self._devices
@devices.setter
def devices(self, devices):
- """Sets the devices of this V1alpha3ResourceClaimStatus.
+ """Sets the devices of this V1ResourceClaimStatus.
Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers. # noqa: E501
- :param devices: The devices of this V1alpha3ResourceClaimStatus. # noqa: E501
- :type: list[V1alpha3AllocatedDeviceStatus]
+ :param devices: The devices of this V1ResourceClaimStatus. # noqa: E501
+ :type: list[V1AllocatedDeviceStatus]
"""
self._devices = devices
@property
def reserved_for(self):
- """Gets the reserved_for of this V1alpha3ResourceClaimStatus. # noqa: E501
+ """Gets the reserved_for of this V1ResourceClaimStatus. # noqa: E501
ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated. In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled. Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again. There can be at most 256 such reservations. This may get increased in the future, but not reduced. # noqa: E501
- :return: The reserved_for of this V1alpha3ResourceClaimStatus. # noqa: E501
- :rtype: list[V1alpha3ResourceClaimConsumerReference]
+ :return: The reserved_for of this V1ResourceClaimStatus. # noqa: E501
+ :rtype: list[V1ResourceClaimConsumerReference]
"""
return self._reserved_for
@reserved_for.setter
def reserved_for(self, reserved_for):
- """Sets the reserved_for of this V1alpha3ResourceClaimStatus.
+ """Sets the reserved_for of this V1ResourceClaimStatus.
ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated. In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled. Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again. There can be at most 256 such reservations. This may get increased in the future, but not reduced. # noqa: E501
- :param reserved_for: The reserved_for of this V1alpha3ResourceClaimStatus. # noqa: E501
- :type: list[V1alpha3ResourceClaimConsumerReference]
+ :param reserved_for: The reserved_for of this V1ResourceClaimStatus. # noqa: E501
+ :type: list[V1ResourceClaimConsumerReference]
"""
self._reserved_for = reserved_for
@@ -163,14 +163,14 @@ class V1alpha3ResourceClaimStatus(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceClaimStatus):
+ if not isinstance(other, V1ResourceClaimStatus):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceClaimStatus):
+ if not isinstance(other, V1ResourceClaimStatus):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_template.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_template.py
index f552a16cdb8..e29870c8eaf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_template.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_template.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceClaimTemplate(object):
+class V1ResourceClaimTemplate(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -36,7 +36,7 @@ class V1alpha3ResourceClaimTemplate(object):
'api_version': 'str',
'kind': 'str',
'metadata': 'V1ObjectMeta',
- 'spec': 'V1alpha3ResourceClaimTemplateSpec'
+ 'spec': 'V1ResourceClaimTemplateSpec'
}
attribute_map = {
@@ -47,7 +47,7 @@ class V1alpha3ResourceClaimTemplate(object):
}
def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceClaimTemplate - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceClaimTemplate - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +68,22 @@ class V1alpha3ResourceClaimTemplate(object):
@property
def api_version(self):
- """Gets the api_version of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ """Gets the api_version of this V1ResourceClaimTemplate. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ :return: The api_version of this V1ResourceClaimTemplate. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1alpha3ResourceClaimTemplate.
+ """Sets the api_version of this V1ResourceClaimTemplate.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ :param api_version: The api_version of this V1ResourceClaimTemplate. # noqa: E501
:type: str
"""
@@ -91,22 +91,22 @@ class V1alpha3ResourceClaimTemplate(object):
@property
def kind(self):
- """Gets the kind of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ """Gets the kind of this V1ResourceClaimTemplate. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ :return: The kind of this V1ResourceClaimTemplate. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1alpha3ResourceClaimTemplate.
+ """Sets the kind of this V1ResourceClaimTemplate.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ :param kind: The kind of this V1ResourceClaimTemplate. # noqa: E501
:type: str
"""
@@ -114,20 +114,20 @@ class V1alpha3ResourceClaimTemplate(object):
@property
def metadata(self):
- """Gets the metadata of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ """Gets the metadata of this V1ResourceClaimTemplate. # noqa: E501
- :return: The metadata of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ :return: The metadata of this V1ResourceClaimTemplate. # noqa: E501
:rtype: V1ObjectMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1alpha3ResourceClaimTemplate.
+ """Sets the metadata of this V1ResourceClaimTemplate.
- :param metadata: The metadata of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ :param metadata: The metadata of this V1ResourceClaimTemplate. # noqa: E501
:type: V1ObjectMeta
"""
@@ -135,21 +135,21 @@ class V1alpha3ResourceClaimTemplate(object):
@property
def spec(self):
- """Gets the spec of this V1alpha3ResourceClaimTemplate. # noqa: E501
+ """Gets the spec of this V1ResourceClaimTemplate. # noqa: E501
- :return: The spec of this V1alpha3ResourceClaimTemplate. # noqa: E501
- :rtype: V1alpha3ResourceClaimTemplateSpec
+ :return: The spec of this V1ResourceClaimTemplate. # noqa: E501
+ :rtype: V1ResourceClaimTemplateSpec
"""
return self._spec
@spec.setter
def spec(self, spec):
- """Sets the spec of this V1alpha3ResourceClaimTemplate.
+ """Sets the spec of this V1ResourceClaimTemplate.
- :param spec: The spec of this V1alpha3ResourceClaimTemplate. # noqa: E501
- :type: V1alpha3ResourceClaimTemplateSpec
+ :param spec: The spec of this V1ResourceClaimTemplate. # noqa: E501
+ :type: V1ResourceClaimTemplateSpec
"""
if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501
raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501
@@ -190,14 +190,14 @@ class V1alpha3ResourceClaimTemplate(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceClaimTemplate):
+ if not isinstance(other, V1ResourceClaimTemplate):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceClaimTemplate):
+ if not isinstance(other, V1ResourceClaimTemplate):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_template_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_template_list.py
index 2085243c206..25d38b1f139 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_template_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_template_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceClaimTemplateList(object):
+class V1ResourceClaimTemplateList(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,7 +34,7 @@ class V1alpha3ResourceClaimTemplateList(object):
"""
openapi_types = {
'api_version': 'str',
- 'items': 'list[V1alpha3ResourceClaimTemplate]',
+ 'items': 'list[V1ResourceClaimTemplate]',
'kind': 'str',
'metadata': 'V1ListMeta'
}
@@ -47,7 +47,7 @@ class V1alpha3ResourceClaimTemplateList(object):
}
def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceClaimTemplateList - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceClaimTemplateList - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +68,22 @@ class V1alpha3ResourceClaimTemplateList(object):
@property
def api_version(self):
- """Gets the api_version of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ """Gets the api_version of this V1ResourceClaimTemplateList. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ :return: The api_version of this V1ResourceClaimTemplateList. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1alpha3ResourceClaimTemplateList.
+ """Sets the api_version of this V1ResourceClaimTemplateList.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ :param api_version: The api_version of this V1ResourceClaimTemplateList. # noqa: E501
:type: str
"""
@@ -91,23 +91,23 @@ class V1alpha3ResourceClaimTemplateList(object):
@property
def items(self):
- """Gets the items of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ """Gets the items of this V1ResourceClaimTemplateList. # noqa: E501
Items is the list of resource claim templates. # noqa: E501
- :return: The items of this V1alpha3ResourceClaimTemplateList. # noqa: E501
- :rtype: list[V1alpha3ResourceClaimTemplate]
+ :return: The items of this V1ResourceClaimTemplateList. # noqa: E501
+ :rtype: list[V1ResourceClaimTemplate]
"""
return self._items
@items.setter
def items(self, items):
- """Sets the items of this V1alpha3ResourceClaimTemplateList.
+ """Sets the items of this V1ResourceClaimTemplateList.
Items is the list of resource claim templates. # noqa: E501
- :param items: The items of this V1alpha3ResourceClaimTemplateList. # noqa: E501
- :type: list[V1alpha3ResourceClaimTemplate]
+ :param items: The items of this V1ResourceClaimTemplateList. # noqa: E501
+ :type: list[V1ResourceClaimTemplate]
"""
if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501
raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501
@@ -116,22 +116,22 @@ class V1alpha3ResourceClaimTemplateList(object):
@property
def kind(self):
- """Gets the kind of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ """Gets the kind of this V1ResourceClaimTemplateList. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ :return: The kind of this V1ResourceClaimTemplateList. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1alpha3ResourceClaimTemplateList.
+ """Sets the kind of this V1ResourceClaimTemplateList.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ :param kind: The kind of this V1ResourceClaimTemplateList. # noqa: E501
:type: str
"""
@@ -139,20 +139,20 @@ class V1alpha3ResourceClaimTemplateList(object):
@property
def metadata(self):
- """Gets the metadata of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ """Gets the metadata of this V1ResourceClaimTemplateList. # noqa: E501
- :return: The metadata of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ :return: The metadata of this V1ResourceClaimTemplateList. # noqa: E501
:rtype: V1ListMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1alpha3ResourceClaimTemplateList.
+ """Sets the metadata of this V1ResourceClaimTemplateList.
- :param metadata: The metadata of this V1alpha3ResourceClaimTemplateList. # noqa: E501
+ :param metadata: The metadata of this V1ResourceClaimTemplateList. # noqa: E501
:type: V1ListMeta
"""
@@ -192,14 +192,14 @@ class V1alpha3ResourceClaimTemplateList(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceClaimTemplateList):
+ if not isinstance(other, V1ResourceClaimTemplateList):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceClaimTemplateList):
+ if not isinstance(other, V1ResourceClaimTemplateList):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_template_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_template_spec.py
index a4b39b529b1..9c6ca51e5d6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_claim_template_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim_template_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceClaimTemplateSpec(object):
+class V1ResourceClaimTemplateSpec(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,7 +34,7 @@ class V1alpha3ResourceClaimTemplateSpec(object):
"""
openapi_types = {
'metadata': 'V1ObjectMeta',
- 'spec': 'V1alpha3ResourceClaimSpec'
+ 'spec': 'V1ResourceClaimSpec'
}
attribute_map = {
@@ -43,7 +43,7 @@ class V1alpha3ResourceClaimTemplateSpec(object):
}
def __init__(self, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceClaimTemplateSpec - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceClaimTemplateSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -58,20 +58,20 @@ class V1alpha3ResourceClaimTemplateSpec(object):
@property
def metadata(self):
- """Gets the metadata of this V1alpha3ResourceClaimTemplateSpec. # noqa: E501
+ """Gets the metadata of this V1ResourceClaimTemplateSpec. # noqa: E501
- :return: The metadata of this V1alpha3ResourceClaimTemplateSpec. # noqa: E501
+ :return: The metadata of this V1ResourceClaimTemplateSpec. # noqa: E501
:rtype: V1ObjectMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1alpha3ResourceClaimTemplateSpec.
+ """Sets the metadata of this V1ResourceClaimTemplateSpec.
- :param metadata: The metadata of this V1alpha3ResourceClaimTemplateSpec. # noqa: E501
+ :param metadata: The metadata of this V1ResourceClaimTemplateSpec. # noqa: E501
:type: V1ObjectMeta
"""
@@ -79,21 +79,21 @@ class V1alpha3ResourceClaimTemplateSpec(object):
@property
def spec(self):
- """Gets the spec of this V1alpha3ResourceClaimTemplateSpec. # noqa: E501
+ """Gets the spec of this V1ResourceClaimTemplateSpec. # noqa: E501
- :return: The spec of this V1alpha3ResourceClaimTemplateSpec. # noqa: E501
- :rtype: V1alpha3ResourceClaimSpec
+ :return: The spec of this V1ResourceClaimTemplateSpec. # noqa: E501
+ :rtype: V1ResourceClaimSpec
"""
return self._spec
@spec.setter
def spec(self, spec):
- """Sets the spec of this V1alpha3ResourceClaimTemplateSpec.
+ """Sets the spec of this V1ResourceClaimTemplateSpec.
- :param spec: The spec of this V1alpha3ResourceClaimTemplateSpec. # noqa: E501
- :type: V1alpha3ResourceClaimSpec
+ :param spec: The spec of this V1ResourceClaimTemplateSpec. # noqa: E501
+ :type: V1ResourceClaimSpec
"""
if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501
raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501
@@ -134,14 +134,14 @@ class V1alpha3ResourceClaimTemplateSpec(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceClaimTemplateSpec):
+ if not isinstance(other, V1ResourceClaimTemplateSpec):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceClaimTemplateSpec):
+ if not isinstance(other, V1ResourceClaimTemplateSpec):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_field_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_field_selector.py
index 4cbea683352..c3143156526 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_field_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_field_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_health.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_health.py
index 22034411891..59da068cf2a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_health.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_health.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_policy_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_policy_rule.py
index c0f59088804..9606dfaa803 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_policy_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_policy_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_pool.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_pool.py
index b640c871e6b..2671b5d0d47 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_pool.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_pool.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourcePool(object):
+class V1ResourcePool(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -45,7 +45,7 @@ class V1alpha3ResourcePool(object):
}
def __init__(self, generation=None, name=None, resource_slice_count=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourcePool - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourcePool - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -61,22 +61,22 @@ class V1alpha3ResourcePool(object):
@property
def generation(self):
- """Gets the generation of this V1alpha3ResourcePool. # noqa: E501
+ """Gets the generation of this V1ResourcePool. # noqa: E501
Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted. Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state. # noqa: E501
- :return: The generation of this V1alpha3ResourcePool. # noqa: E501
+ :return: The generation of this V1ResourcePool. # noqa: E501
:rtype: int
"""
return self._generation
@generation.setter
def generation(self, generation):
- """Sets the generation of this V1alpha3ResourcePool.
+ """Sets the generation of this V1ResourcePool.
Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted. Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state. # noqa: E501
- :param generation: The generation of this V1alpha3ResourcePool. # noqa: E501
+ :param generation: The generation of this V1ResourcePool. # noqa: E501
:type: int
"""
if self.local_vars_configuration.client_side_validation and generation is None: # noqa: E501
@@ -86,22 +86,22 @@ class V1alpha3ResourcePool(object):
@property
def name(self):
- """Gets the name of this V1alpha3ResourcePool. # noqa: E501
+ """Gets the name of this V1ResourcePool. # noqa: E501
Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required. It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable. # noqa: E501
- :return: The name of this V1alpha3ResourcePool. # noqa: E501
+ :return: The name of this V1ResourcePool. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
- """Sets the name of this V1alpha3ResourcePool.
+ """Sets the name of this V1ResourcePool.
Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required. It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable. # noqa: E501
- :param name: The name of this V1alpha3ResourcePool. # noqa: E501
+ :param name: The name of this V1ResourcePool. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
@@ -111,22 +111,22 @@ class V1alpha3ResourcePool(object):
@property
def resource_slice_count(self):
- """Gets the resource_slice_count of this V1alpha3ResourcePool. # noqa: E501
+ """Gets the resource_slice_count of this V1ResourcePool. # noqa: E501
ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero. Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool. # noqa: E501
- :return: The resource_slice_count of this V1alpha3ResourcePool. # noqa: E501
+ :return: The resource_slice_count of this V1ResourcePool. # noqa: E501
:rtype: int
"""
return self._resource_slice_count
@resource_slice_count.setter
def resource_slice_count(self, resource_slice_count):
- """Sets the resource_slice_count of this V1alpha3ResourcePool.
+ """Sets the resource_slice_count of this V1ResourcePool.
ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero. Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool. # noqa: E501
- :param resource_slice_count: The resource_slice_count of this V1alpha3ResourcePool. # noqa: E501
+ :param resource_slice_count: The resource_slice_count of this V1ResourcePool. # noqa: E501
:type: int
"""
if self.local_vars_configuration.client_side_validation and resource_slice_count is None: # noqa: E501
@@ -168,14 +168,14 @@ class V1alpha3ResourcePool(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourcePool):
+ if not isinstance(other, V1ResourcePool):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourcePool):
+ if not isinstance(other, V1ResourcePool):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota.py
index 92489506015..fd4e07998b4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_list.py
index f0bb0adb42f..fb5f2638725 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_spec.py
index 604aebda029..a343b49d1cd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_status.py
index f5b5f89abc0..35716e00b18 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_quota_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_requirements.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_requirements.py
index af9958e3775..5ed40e94b36 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_requirements.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_requirements.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -33,7 +33,7 @@ class V1ResourceRequirements(object):
and the value is json key in definition.
"""
openapi_types = {
- 'claims': 'list[V1ResourceClaim]',
+ 'claims': 'list[CoreV1ResourceClaim]',
'limits': 'dict(str, str)',
'requests': 'dict(str, str)'
}
@@ -66,10 +66,10 @@ class V1ResourceRequirements(object):
def claims(self):
"""Gets the claims of this V1ResourceRequirements. # noqa: E501
- Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. # noqa: E501
+ Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. # noqa: E501
:return: The claims of this V1ResourceRequirements. # noqa: E501
- :rtype: list[V1ResourceClaim]
+ :rtype: list[CoreV1ResourceClaim]
"""
return self._claims
@@ -77,10 +77,10 @@ class V1ResourceRequirements(object):
def claims(self, claims):
"""Sets the claims of this V1ResourceRequirements.
- Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. # noqa: E501
+ Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This field depends on the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. # noqa: E501
:param claims: The claims of this V1ResourceRequirements. # noqa: E501
- :type: list[V1ResourceClaim]
+ :type: list[CoreV1ResourceClaim]
"""
self._claims = claims
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_rule.py
index 6d1d08ede5d..ac8d148d84c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_slice.py
index 41560e22923..2c20c97b35c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_slice.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3DeviceClass(object):
+class V1ResourceSlice(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -36,7 +36,7 @@ class V1alpha3DeviceClass(object):
'api_version': 'str',
'kind': 'str',
'metadata': 'V1ObjectMeta',
- 'spec': 'V1alpha3DeviceClassSpec'
+ 'spec': 'V1ResourceSliceSpec'
}
attribute_map = {
@@ -47,7 +47,7 @@ class V1alpha3DeviceClass(object):
}
def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceClass - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceSlice - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +68,22 @@ class V1alpha3DeviceClass(object):
@property
def api_version(self):
- """Gets the api_version of this V1alpha3DeviceClass. # noqa: E501
+ """Gets the api_version of this V1ResourceSlice. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1alpha3DeviceClass. # noqa: E501
+ :return: The api_version of this V1ResourceSlice. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1alpha3DeviceClass.
+ """Sets the api_version of this V1ResourceSlice.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1alpha3DeviceClass. # noqa: E501
+ :param api_version: The api_version of this V1ResourceSlice. # noqa: E501
:type: str
"""
@@ -91,22 +91,22 @@ class V1alpha3DeviceClass(object):
@property
def kind(self):
- """Gets the kind of this V1alpha3DeviceClass. # noqa: E501
+ """Gets the kind of this V1ResourceSlice. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1alpha3DeviceClass. # noqa: E501
+ :return: The kind of this V1ResourceSlice. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1alpha3DeviceClass.
+ """Sets the kind of this V1ResourceSlice.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1alpha3DeviceClass. # noqa: E501
+ :param kind: The kind of this V1ResourceSlice. # noqa: E501
:type: str
"""
@@ -114,20 +114,20 @@ class V1alpha3DeviceClass(object):
@property
def metadata(self):
- """Gets the metadata of this V1alpha3DeviceClass. # noqa: E501
+ """Gets the metadata of this V1ResourceSlice. # noqa: E501
- :return: The metadata of this V1alpha3DeviceClass. # noqa: E501
+ :return: The metadata of this V1ResourceSlice. # noqa: E501
:rtype: V1ObjectMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1alpha3DeviceClass.
+ """Sets the metadata of this V1ResourceSlice.
- :param metadata: The metadata of this V1alpha3DeviceClass. # noqa: E501
+ :param metadata: The metadata of this V1ResourceSlice. # noqa: E501
:type: V1ObjectMeta
"""
@@ -135,21 +135,21 @@ class V1alpha3DeviceClass(object):
@property
def spec(self):
- """Gets the spec of this V1alpha3DeviceClass. # noqa: E501
+ """Gets the spec of this V1ResourceSlice. # noqa: E501
- :return: The spec of this V1alpha3DeviceClass. # noqa: E501
- :rtype: V1alpha3DeviceClassSpec
+ :return: The spec of this V1ResourceSlice. # noqa: E501
+ :rtype: V1ResourceSliceSpec
"""
return self._spec
@spec.setter
def spec(self, spec):
- """Sets the spec of this V1alpha3DeviceClass.
+ """Sets the spec of this V1ResourceSlice.
- :param spec: The spec of this V1alpha3DeviceClass. # noqa: E501
- :type: V1alpha3DeviceClassSpec
+ :param spec: The spec of this V1ResourceSlice. # noqa: E501
+ :type: V1ResourceSliceSpec
"""
if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501
raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501
@@ -190,14 +190,14 @@ class V1alpha3DeviceClass(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceClass):
+ if not isinstance(other, V1ResourceSlice):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceClass):
+ if not isinstance(other, V1ResourceSlice):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_slice_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_slice_list.py
index 61c22e70f00..7897889d327 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_slice_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_slice_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceSliceList(object):
+class V1ResourceSliceList(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,7 +34,7 @@ class V1alpha3ResourceSliceList(object):
"""
openapi_types = {
'api_version': 'str',
- 'items': 'list[V1alpha3ResourceSlice]',
+ 'items': 'list[V1ResourceSlice]',
'kind': 'str',
'metadata': 'V1ListMeta'
}
@@ -47,7 +47,7 @@ class V1alpha3ResourceSliceList(object):
}
def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceSliceList - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceSliceList - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +68,22 @@ class V1alpha3ResourceSliceList(object):
@property
def api_version(self):
- """Gets the api_version of this V1alpha3ResourceSliceList. # noqa: E501
+ """Gets the api_version of this V1ResourceSliceList. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1alpha3ResourceSliceList. # noqa: E501
+ :return: The api_version of this V1ResourceSliceList. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1alpha3ResourceSliceList.
+ """Sets the api_version of this V1ResourceSliceList.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1alpha3ResourceSliceList. # noqa: E501
+ :param api_version: The api_version of this V1ResourceSliceList. # noqa: E501
:type: str
"""
@@ -91,23 +91,23 @@ class V1alpha3ResourceSliceList(object):
@property
def items(self):
- """Gets the items of this V1alpha3ResourceSliceList. # noqa: E501
+ """Gets the items of this V1ResourceSliceList. # noqa: E501
Items is the list of resource ResourceSlices. # noqa: E501
- :return: The items of this V1alpha3ResourceSliceList. # noqa: E501
- :rtype: list[V1alpha3ResourceSlice]
+ :return: The items of this V1ResourceSliceList. # noqa: E501
+ :rtype: list[V1ResourceSlice]
"""
return self._items
@items.setter
def items(self, items):
- """Sets the items of this V1alpha3ResourceSliceList.
+ """Sets the items of this V1ResourceSliceList.
Items is the list of resource ResourceSlices. # noqa: E501
- :param items: The items of this V1alpha3ResourceSliceList. # noqa: E501
- :type: list[V1alpha3ResourceSlice]
+ :param items: The items of this V1ResourceSliceList. # noqa: E501
+ :type: list[V1ResourceSlice]
"""
if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501
raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501
@@ -116,22 +116,22 @@ class V1alpha3ResourceSliceList(object):
@property
def kind(self):
- """Gets the kind of this V1alpha3ResourceSliceList. # noqa: E501
+ """Gets the kind of this V1ResourceSliceList. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1alpha3ResourceSliceList. # noqa: E501
+ :return: The kind of this V1ResourceSliceList. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1alpha3ResourceSliceList.
+ """Sets the kind of this V1ResourceSliceList.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1alpha3ResourceSliceList. # noqa: E501
+ :param kind: The kind of this V1ResourceSliceList. # noqa: E501
:type: str
"""
@@ -139,20 +139,20 @@ class V1alpha3ResourceSliceList(object):
@property
def metadata(self):
- """Gets the metadata of this V1alpha3ResourceSliceList. # noqa: E501
+ """Gets the metadata of this V1ResourceSliceList. # noqa: E501
- :return: The metadata of this V1alpha3ResourceSliceList. # noqa: E501
+ :return: The metadata of this V1ResourceSliceList. # noqa: E501
:rtype: V1ListMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1alpha3ResourceSliceList.
+ """Sets the metadata of this V1ResourceSliceList.
- :param metadata: The metadata of this V1alpha3ResourceSliceList. # noqa: E501
+ :param metadata: The metadata of this V1ResourceSliceList. # noqa: E501
:type: V1ListMeta
"""
@@ -192,14 +192,14 @@ class V1alpha3ResourceSliceList(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceSliceList):
+ if not isinstance(other, V1ResourceSliceList):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceSliceList):
+ if not isinstance(other, V1ResourceSliceList):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_slice_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_slice_spec.py
index 2136880d363..256dd786ce4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_resource_slice_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_slice_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1alpha3ResourceSliceSpec(object):
+class V1ResourceSliceSpec(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,13 +34,13 @@ class V1alpha3ResourceSliceSpec(object):
"""
openapi_types = {
'all_nodes': 'bool',
- 'devices': 'list[V1alpha3Device]',
+ 'devices': 'list[V1Device]',
'driver': 'str',
'node_name': 'str',
'node_selector': 'V1NodeSelector',
'per_device_node_selection': 'bool',
- 'pool': 'V1alpha3ResourcePool',
- 'shared_counters': 'list[V1alpha3CounterSet]'
+ 'pool': 'V1ResourcePool',
+ 'shared_counters': 'list[V1CounterSet]'
}
attribute_map = {
@@ -55,7 +55,7 @@ class V1alpha3ResourceSliceSpec(object):
}
def __init__(self, all_nodes=None, devices=None, driver=None, node_name=None, node_selector=None, per_device_node_selection=None, pool=None, shared_counters=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3ResourceSliceSpec - a model defined in OpenAPI""" # noqa: E501
+ """V1ResourceSliceSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -87,22 +87,22 @@ class V1alpha3ResourceSliceSpec(object):
@property
def all_nodes(self):
- """Gets the all_nodes of this V1alpha3ResourceSliceSpec. # noqa: E501
+ """Gets the all_nodes of this V1ResourceSliceSpec. # noqa: E501
AllNodes indicates that all nodes have access to the resources in the pool. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. # noqa: E501
- :return: The all_nodes of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :return: The all_nodes of this V1ResourceSliceSpec. # noqa: E501
:rtype: bool
"""
return self._all_nodes
@all_nodes.setter
def all_nodes(self, all_nodes):
- """Sets the all_nodes of this V1alpha3ResourceSliceSpec.
+ """Sets the all_nodes of this V1ResourceSliceSpec.
AllNodes indicates that all nodes have access to the resources in the pool. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. # noqa: E501
- :param all_nodes: The all_nodes of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :param all_nodes: The all_nodes of this V1ResourceSliceSpec. # noqa: E501
:type: bool
"""
@@ -110,45 +110,45 @@ class V1alpha3ResourceSliceSpec(object):
@property
def devices(self):
- """Gets the devices of this V1alpha3ResourceSliceSpec. # noqa: E501
+ """Gets the devices of this V1ResourceSliceSpec. # noqa: E501
Devices lists some or all of the devices in this pool. Must not have more than 128 entries. # noqa: E501
- :return: The devices of this V1alpha3ResourceSliceSpec. # noqa: E501
- :rtype: list[V1alpha3Device]
+ :return: The devices of this V1ResourceSliceSpec. # noqa: E501
+ :rtype: list[V1Device]
"""
return self._devices
@devices.setter
def devices(self, devices):
- """Sets the devices of this V1alpha3ResourceSliceSpec.
+ """Sets the devices of this V1ResourceSliceSpec.
Devices lists some or all of the devices in this pool. Must not have more than 128 entries. # noqa: E501
- :param devices: The devices of this V1alpha3ResourceSliceSpec. # noqa: E501
- :type: list[V1alpha3Device]
+ :param devices: The devices of this V1ResourceSliceSpec. # noqa: E501
+ :type: list[V1Device]
"""
self._devices = devices
@property
def driver(self):
- """Gets the driver of this V1alpha3ResourceSliceSpec. # noqa: E501
+ """Gets the driver of this V1ResourceSliceSpec. # noqa: E501
Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable. # noqa: E501
- :return: The driver of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :return: The driver of this V1ResourceSliceSpec. # noqa: E501
:rtype: str
"""
return self._driver
@driver.setter
def driver(self, driver):
- """Sets the driver of this V1alpha3ResourceSliceSpec.
+ """Sets the driver of this V1ResourceSliceSpec.
Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable. # noqa: E501
- :param driver: The driver of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :param driver: The driver of this V1ResourceSliceSpec. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and driver is None: # noqa: E501
@@ -158,22 +158,22 @@ class V1alpha3ResourceSliceSpec(object):
@property
def node_name(self):
- """Gets the node_name of this V1alpha3ResourceSliceSpec. # noqa: E501
+ """Gets the node_name of this V1ResourceSliceSpec. # noqa: E501
NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node. This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable. # noqa: E501
- :return: The node_name of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :return: The node_name of this V1ResourceSliceSpec. # noqa: E501
:rtype: str
"""
return self._node_name
@node_name.setter
def node_name(self, node_name):
- """Sets the node_name of this V1alpha3ResourceSliceSpec.
+ """Sets the node_name of this V1ResourceSliceSpec.
NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node. This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable. # noqa: E501
- :param node_name: The node_name of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :param node_name: The node_name of this V1ResourceSliceSpec. # noqa: E501
:type: str
"""
@@ -181,20 +181,20 @@ class V1alpha3ResourceSliceSpec(object):
@property
def node_selector(self):
- """Gets the node_selector of this V1alpha3ResourceSliceSpec. # noqa: E501
+ """Gets the node_selector of this V1ResourceSliceSpec. # noqa: E501
- :return: The node_selector of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :return: The node_selector of this V1ResourceSliceSpec. # noqa: E501
:rtype: V1NodeSelector
"""
return self._node_selector
@node_selector.setter
def node_selector(self, node_selector):
- """Sets the node_selector of this V1alpha3ResourceSliceSpec.
+ """Sets the node_selector of this V1ResourceSliceSpec.
- :param node_selector: The node_selector of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :param node_selector: The node_selector of this V1ResourceSliceSpec. # noqa: E501
:type: V1NodeSelector
"""
@@ -202,22 +202,22 @@ class V1alpha3ResourceSliceSpec(object):
@property
def per_device_node_selection(self):
- """Gets the per_device_node_selection of this V1alpha3ResourceSliceSpec. # noqa: E501
+ """Gets the per_device_node_selection of this V1ResourceSliceSpec. # noqa: E501
PerDeviceNodeSelection defines whether the access from nodes to resources in the pool is set on the ResourceSlice level or on each device. If it is set to true, every device defined the ResourceSlice must specify this individually. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. # noqa: E501
- :return: The per_device_node_selection of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :return: The per_device_node_selection of this V1ResourceSliceSpec. # noqa: E501
:rtype: bool
"""
return self._per_device_node_selection
@per_device_node_selection.setter
def per_device_node_selection(self, per_device_node_selection):
- """Sets the per_device_node_selection of this V1alpha3ResourceSliceSpec.
+ """Sets the per_device_node_selection of this V1ResourceSliceSpec.
PerDeviceNodeSelection defines whether the access from nodes to resources in the pool is set on the ResourceSlice level or on each device. If it is set to true, every device defined the ResourceSlice must specify this individually. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. # noqa: E501
- :param per_device_node_selection: The per_device_node_selection of this V1alpha3ResourceSliceSpec. # noqa: E501
+ :param per_device_node_selection: The per_device_node_selection of this V1ResourceSliceSpec. # noqa: E501
:type: bool
"""
@@ -225,21 +225,21 @@ class V1alpha3ResourceSliceSpec(object):
@property
def pool(self):
- """Gets the pool of this V1alpha3ResourceSliceSpec. # noqa: E501
+ """Gets the pool of this V1ResourceSliceSpec. # noqa: E501
- :return: The pool of this V1alpha3ResourceSliceSpec. # noqa: E501
- :rtype: V1alpha3ResourcePool
+ :return: The pool of this V1ResourceSliceSpec. # noqa: E501
+ :rtype: V1ResourcePool
"""
return self._pool
@pool.setter
def pool(self, pool):
- """Sets the pool of this V1alpha3ResourceSliceSpec.
+ """Sets the pool of this V1ResourceSliceSpec.
- :param pool: The pool of this V1alpha3ResourceSliceSpec. # noqa: E501
- :type: V1alpha3ResourcePool
+ :param pool: The pool of this V1ResourceSliceSpec. # noqa: E501
+ :type: V1ResourcePool
"""
if self.local_vars_configuration.client_side_validation and pool is None: # noqa: E501
raise ValueError("Invalid value for `pool`, must not be `None`") # noqa: E501
@@ -248,23 +248,23 @@ class V1alpha3ResourceSliceSpec(object):
@property
def shared_counters(self):
- """Gets the shared_counters of this V1alpha3ResourceSliceSpec. # noqa: E501
+ """Gets the shared_counters of this V1ResourceSliceSpec. # noqa: E501
- SharedCounters defines a list of counter sets, each of which has a name and a list of counters available. The names of the SharedCounters must be unique in the ResourceSlice. The maximum number of SharedCounters is 32. # noqa: E501
+ SharedCounters defines a list of counter sets, each of which has a name and a list of counters available. The names of the SharedCounters must be unique in the ResourceSlice. The maximum number of counters in all sets is 32. # noqa: E501
- :return: The shared_counters of this V1alpha3ResourceSliceSpec. # noqa: E501
- :rtype: list[V1alpha3CounterSet]
+ :return: The shared_counters of this V1ResourceSliceSpec. # noqa: E501
+ :rtype: list[V1CounterSet]
"""
return self._shared_counters
@shared_counters.setter
def shared_counters(self, shared_counters):
- """Sets the shared_counters of this V1alpha3ResourceSliceSpec.
+ """Sets the shared_counters of this V1ResourceSliceSpec.
- SharedCounters defines a list of counter sets, each of which has a name and a list of counters available. The names of the SharedCounters must be unique in the ResourceSlice. The maximum number of SharedCounters is 32. # noqa: E501
+ SharedCounters defines a list of counter sets, each of which has a name and a list of counters available. The names of the SharedCounters must be unique in the ResourceSlice. The maximum number of counters in all sets is 32. # noqa: E501
- :param shared_counters: The shared_counters of this V1alpha3ResourceSliceSpec. # noqa: E501
- :type: list[V1alpha3CounterSet]
+ :param shared_counters: The shared_counters of this V1ResourceSliceSpec. # noqa: E501
+ :type: list[V1CounterSet]
"""
self._shared_counters = shared_counters
@@ -303,14 +303,14 @@ class V1alpha3ResourceSliceSpec(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3ResourceSliceSpec):
+ if not isinstance(other, V1ResourceSliceSpec):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3ResourceSliceSpec):
+ if not isinstance(other, V1ResourceSliceSpec):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_status.py
index 80092039cf5..adc9f1df3f2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_resource_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_role.py b/contrib/python/kubernetes/kubernetes/client/models/v1_role.py
index 421746d47bc..ad57e769604 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_role.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_role.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_role_binding.py b/contrib/python/kubernetes/kubernetes/client/models/v1_role_binding.py
index 35fa351ec93..1168b46b6a0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_role_binding.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_role_binding.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_role_binding_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_role_binding_list.py
index 06a35a76e72..74e7bdc3aa9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_role_binding_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_role_binding_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_role_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_role_list.py
index de4f89230d0..d21796cf3d5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_role_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_role_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_role_ref.py b/contrib/python/kubernetes/kubernetes/client/models/v1_role_ref.py
index bee863ca7cd..f2f53838a1b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_role_ref.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_role_ref.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_daemon_set.py b/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_daemon_set.py
index 690db4241bb..d51f3ce2e55 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_daemon_set.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_daemon_set.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -61,7 +61,7 @@ class V1RollingUpdateDaemonSet(object):
def max_surge(self):
"""Gets the max_surge of this V1RollingUpdateDaemonSet. # noqa: E501
- The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. # noqa: E501
+ The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediately created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. # noqa: E501
:return: The max_surge of this V1RollingUpdateDaemonSet. # noqa: E501
:rtype: object
@@ -72,7 +72,7 @@ class V1RollingUpdateDaemonSet(object):
def max_surge(self, max_surge):
"""Sets the max_surge of this V1RollingUpdateDaemonSet.
- The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. # noqa: E501
+ The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediately created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. # noqa: E501
:param max_surge: The max_surge of this V1RollingUpdateDaemonSet. # noqa: E501
:type: object
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_deployment.py b/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_deployment.py
index bc4fd93303b..2e32a5bfbfd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_deployment.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_deployment.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_stateful_set_strategy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_stateful_set_strategy.py
index bf75c45e757..40912352eba 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_stateful_set_strategy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_rolling_update_stateful_set_strategy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_rule_with_operations.py b/contrib/python/kubernetes/kubernetes/client/models/v1_rule_with_operations.py
index 5c3dbdcf0af..79bd885a6ee 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_rule_with_operations.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_rule_with_operations.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class.py
index 5a35ab599dd..8d1797e7c6e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class_list.py
index 07fca8d13ac..dceb822bfd5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_runtime_class_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_scale.py b/contrib/python/kubernetes/kubernetes/client/models/v1_scale.py
index 08830a93156..bd71436d061 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_scale.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_scale.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_persistent_volume_source.py
index 8e6500f1531..9b5b39af86b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_volume_source.py
index 41be97e1530..3211b87a482 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_scale_io_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_scale_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_scale_spec.py
index 47a1a5e96c4..e36629ab624 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_scale_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_scale_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_scale_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_scale_status.py
index 8042495d950..2797ffd982b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_scale_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_scale_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_scheduling.py b/contrib/python/kubernetes/kubernetes/client/models/v1_scheduling.py
index 2e69fa2fb42..7b18876d3b3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_scheduling.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_scheduling.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_scope_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1_scope_selector.py
index c0f2133a2e1..340ee11e844 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_scope_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_scope_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_scoped_resource_selector_requirement.py b/contrib/python/kubernetes/kubernetes/client/models/v1_scoped_resource_selector_requirement.py
index 8f60e24d912..051be53cccd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_scoped_resource_selector_requirement.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_scoped_resource_selector_requirement.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_se_linux_options.py b/contrib/python/kubernetes/kubernetes/client/models/v1_se_linux_options.py
index ca2a0fd1674..50aac0aa741 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_se_linux_options.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_se_linux_options.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_seccomp_profile.py b/contrib/python/kubernetes/kubernetes/client/models/v1_seccomp_profile.py
index 61a446297e6..22e2bd2fed7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_seccomp_profile.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_seccomp_profile.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_secret.py b/contrib/python/kubernetes/kubernetes/client/models/v1_secret.py
index b88eed3d780..4b0d6d31c05 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_secret.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_secret.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_env_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_env_source.py
index f10f317d154..40a963bf280 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_env_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_env_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_key_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_key_selector.py
index 0be2680c53d..846ddb3b0c2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_key_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_key_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_list.py
index f2254b49184..b2bf957828c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_projection.py b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_projection.py
index ac5e8e09f37..af8055c2069 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_projection.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_projection.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_reference.py
index 22e8a020f91..2791a08fd63 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_volume_source.py
index 6132e555a86..3b170502e95 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_secret_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_secret_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_security_context.py b/contrib/python/kubernetes/kubernetes/client/models/v1_security_context.py
index f1a81954699..32399b55be7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_security_context.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_security_context.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_selectable_field.py b/contrib/python/kubernetes/kubernetes/client/models/v1_selectable_field.py
index 8ea1339cf68..cbbf6194e43 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_selectable_field.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_selectable_field.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review.py b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review.py
index 8b1f74a918f..fc4bfc04dd0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review_spec.py
index 31bfb83f776..5f6bcd36d35 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_access_review_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review.py b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review.py
index ce67c178115..638eeb6f27f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review_status.py
index 2ead41ee34e..370ae09b56d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_review_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review.py b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review.py
index 30da0dc5a43..f601a2eecec 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review_spec.py
index 85f69ada3b0..a972f6e7721 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_self_subject_rules_review_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_server_address_by_client_cidr.py b/contrib/python/kubernetes/kubernetes/client/models/v1_server_address_by_client_cidr.py
index 90bc0c35bc9..ed21b03e71f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_server_address_by_client_cidr.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_server_address_by_client_cidr.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service.py
index ae4d7d19dde..9af150a8efc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_account.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_account.py
index af094cd1a08..7b6077ff416 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_account.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_account.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_list.py
index f10f69dd461..69de3200a9b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_subject.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_subject.py
index 2c372a342e2..28797e59cde 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_subject.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_subject.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_token_projection.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_token_projection.py
index d74ee4a358c..c8e02cb5b92 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_token_projection.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_account_token_projection.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_backend_port.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_backend_port.py
index 849d258506b..81225fc72d7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_backend_port.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_backend_port.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr.py
index 301706f8152..705bddcf801 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_list.py
index 45cd8d62dea..bfac6d915ac 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_spec.py
index 4aa2a03a5a8..fb46d4ad952 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_status.py
index 9aaad031eb5..2c3897a3689 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_cidr_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_list.py
index 682c869ea18..a4052400162 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_port.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_port.py
index 5501aef9112..ed913b0b764 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_port.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_port.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_spec.py
index fc6f45e7b71..85d7a906c84 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_service_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_service_status.py
index 35f979bb6fd..46cb9fd4ec0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_service_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_service_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_session_affinity_config.py b/contrib/python/kubernetes/kubernetes/client/models/v1_session_affinity_config.py
index 0b1f3c6a137..cc1775d00e7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_session_affinity_config.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_session_affinity_config.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_sleep_action.py b/contrib/python/kubernetes/kubernetes/client/models/v1_sleep_action.py
index e3fc769ef3b..dd0707233cd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_sleep_action.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_sleep_action.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set.py b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set.py
index 5959ef6d744..e96f011ed07 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_condition.py
index 1132bfba927..844cbc8cca5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_list.py
index 6f448b4f255..80c4f399f5c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_ordinals.py b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_ordinals.py
index f66b6dd0028..280214e3707 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_ordinals.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_ordinals.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_persistent_volume_claim_retention_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_persistent_volume_claim_retention_policy.py
index 02a70965a27..fad9e60d823 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_persistent_volume_claim_retention_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_persistent_volume_claim_retention_policy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_spec.py
index 17b78b0e1cb..b9686970487 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_status.py
index 3205dee0afd..c9c2028a8b9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_update_strategy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_update_strategy.py
index db132f05aad..8752aaaf479 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_update_strategy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_stateful_set_update_strategy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_status.py
index e104125ca85..50a24333e8d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_status_cause.py b/contrib/python/kubernetes/kubernetes/client/models/v1_status_cause.py
index de703a904fd..eac017cbe24 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_status_cause.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_status_cause.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_status_details.py b/contrib/python/kubernetes/kubernetes/client/models/v1_status_details.py
index 40485d182f2..9e67d3bbcd8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_status_details.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_status_details.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_storage_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1_storage_class.py
index de6fb95c7d6..b0e26b7cef7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_storage_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_storage_class.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_storage_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_storage_class_list.py
index da36cc85dcc..3223c030f31 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_storage_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_storage_class_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_persistent_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_persistent_volume_source.py
index fdb94867550..bf42194f53c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_persistent_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_persistent_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_volume_source.py
index 43587db08a3..6163052ba22 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_storage_os_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review.py b/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review.py
index 428f326928b..156f6aac454 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_spec.py
index 57979f45607..188b39eef04 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_status.py
index e022606ebda..cbc4f0b40fa 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_subject_access_review_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_subject_rules_review_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_subject_rules_review_status.py
index dbcd7ab52d4..a1650e8a953 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_subject_rules_review_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_subject_rules_review_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy.py
index 7d46ca8ea09..917f70c5e08 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -55,7 +55,7 @@ class V1SuccessPolicy(object):
def rules(self):
"""Gets the rules of this V1SuccessPolicy. # noqa: E501
- rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SucceededCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed. # noqa: E501
+ rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SuccessCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed. # noqa: E501
:return: The rules of this V1SuccessPolicy. # noqa: E501
:rtype: list[V1SuccessPolicyRule]
@@ -66,7 +66,7 @@ class V1SuccessPolicy(object):
def rules(self, rules):
"""Sets the rules of this V1SuccessPolicy.
- rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SucceededCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed. # noqa: E501
+ rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the \"SuccessCriteriaMet\" condition is added, and the lingering pods are removed. The terminal state for such a Job has the \"Complete\" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed. # noqa: E501
:param rules: The rules of this V1SuccessPolicy. # noqa: E501
:type: list[V1SuccessPolicyRule]
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy_rule.py
index fe97c440dd4..03b8d7dfc26 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_sysctl.py b/contrib/python/kubernetes/kubernetes/client/models/v1_sysctl.py
index 4520255a6e7..1567f3a5181 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_sysctl.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_sysctl.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_taint.py b/contrib/python/kubernetes/kubernetes/client/models/v1_taint.py
index 045a9a2a2ef..a973f0a3948 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_taint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_taint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -119,7 +119,7 @@ class V1Taint(object):
def time_added(self):
"""Gets the time_added of this V1Taint. # noqa: E501
- TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints. # noqa: E501
+ TimeAdded represents the time at which the taint was added. # noqa: E501
:return: The time_added of this V1Taint. # noqa: E501
:rtype: datetime
@@ -130,7 +130,7 @@ class V1Taint(object):
def time_added(self, time_added):
"""Sets the time_added of this V1Taint.
- TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints. # noqa: E501
+ TimeAdded represents the time at which the taint was added. # noqa: E501
:param time_added: The time_added of this V1Taint. # noqa: E501
:type: datetime
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_tcp_socket_action.py b/contrib/python/kubernetes/kubernetes/client/models/v1_tcp_socket_action.py
index e942960f8ee..431971460f6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_tcp_socket_action.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_tcp_socket_action.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_token_request_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_token_request_spec.py
index dc4e68a0c98..5390a387447 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_token_request_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_token_request_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_token_request_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_token_request_status.py
index 645f2836f20..2e47cb67cd9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_token_request_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_token_request_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_token_review.py b/contrib/python/kubernetes/kubernetes/client/models/v1_token_review.py
index 1f935320d08..73284d42525 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_token_review.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_token_review.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_token_review_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_token_review_spec.py
index 419077dc706..b3721649946 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_token_review_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_token_review_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_token_review_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_token_review_status.py
index 03fb4f2e9a0..5c46cc917b9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_token_review_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_token_review_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_toleration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_toleration.py
index c525665085d..fc3d4d8605c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_toleration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_toleration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_label_requirement.py b/contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_label_requirement.py
index cdc10d4b65f..0d89ea2e16f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_label_requirement.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_label_requirement.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_term.py b/contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_term.py
index 9b7c90b9abd..6ebc15db97a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_term.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_topology_selector_term.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_topology_spread_constraint.py b/contrib/python/kubernetes/kubernetes/client/models/v1_topology_spread_constraint.py
index ab2e21d05ff..d4deef62dbc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_topology_spread_constraint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_topology_spread_constraint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_type_checking.py b/contrib/python/kubernetes/kubernetes/client/models/v1_type_checking.py
index ddae6e9656a..82396390eeb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_type_checking.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_type_checking.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_typed_local_object_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_typed_local_object_reference.py
index 5cf0772b26b..7f9c0623b3d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_typed_local_object_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_typed_local_object_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_typed_object_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1_typed_object_reference.py
index 268c50461ec..36a8c2fd73c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_typed_object_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_typed_object_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_uncounted_terminated_pods.py b/contrib/python/kubernetes/kubernetes/client/models/v1_uncounted_terminated_pods.py
index 40d30c4e903..3c29c83614d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_uncounted_terminated_pods.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_uncounted_terminated_pods.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_user_info.py b/contrib/python/kubernetes/kubernetes/client/models/v1_user_info.py
index 51ffc67c710..acf25b4bea8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_user_info.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_user_info.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_user_subject.py b/contrib/python/kubernetes/kubernetes/client/models/v1_user_subject.py
index 5b8a1db6e44..3c2fe1f7f8b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_user_subject.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_user_subject.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy.py
index 3248ed48470..1ffb7936a9c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding.py
index 36dff9d10b5..d0f95c05650 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_list.py
index 7edb7529ac4..93cb18f5364 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_spec.py
index 41809006ad8..1a296df825a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_list.py
index aed3447f4c6..23573661ccc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_spec.py
index ce35a624d89..453308de72f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_status.py
index adc2387325d..31f85a96c2e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook.py
index 30327af82b5..ecb3dc7562d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration.py
index 2af76083d9b..dedbe015dec 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration_list.py
index 58c047a618a..7acb09e3d47 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook_configuration_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validation.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validation.py
index 297ffa8017a..b673b8097ee 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validation.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validation.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_validation_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1_validation_rule.py
index 792d08393e1..53ec7ba5ae6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_validation_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validation_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_variable.py b/contrib/python/kubernetes/kubernetes/client/models/v1_variable.py
index 3954428c63d..f6026fa1c3a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_variable.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_variable.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume.py
index 31fe775dd2a..81cbb3999fc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment.py
index f88eb3a676a..583a3f7a7bb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_list.py
index 73a722c4396..d77696ec9e5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_source.py
index 70efbb96241..716c03a9b63 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_spec.py
index a4753abe140..11eede437f1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_status.py
index e9ddb15424b..1e88042bac1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attachment_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attributes_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attributes_class.py
new file mode 100644
index 00000000000..fea31280406
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attributes_class.py
@@ -0,0 +1,233 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1VolumeAttributesClass(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'api_version': 'str',
+ 'driver_name': 'str',
+ 'kind': 'str',
+ 'metadata': 'V1ObjectMeta',
+ 'parameters': 'dict(str, str)'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'driver_name': 'driverName',
+ 'kind': 'kind',
+ 'metadata': 'metadata',
+ 'parameters': 'parameters'
+ }
+
+ def __init__(self, api_version=None, driver_name=None, kind=None, metadata=None, parameters=None, local_vars_configuration=None): # noqa: E501
+ """V1VolumeAttributesClass - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._api_version = None
+ self._driver_name = None
+ self._kind = None
+ self._metadata = None
+ self._parameters = None
+ self.discriminator = None
+
+ if api_version is not None:
+ self.api_version = api_version
+ self.driver_name = driver_name
+ if kind is not None:
+ self.kind = kind
+ if metadata is not None:
+ self.metadata = metadata
+ if parameters is not None:
+ self.parameters = parameters
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1VolumeAttributesClass. # noqa: E501
+
+ APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
+
+ :return: The api_version of this V1VolumeAttributesClass. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1VolumeAttributesClass.
+
+ APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
+
+ :param api_version: The api_version of this V1VolumeAttributesClass. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def driver_name(self):
+ """Gets the driver_name of this V1VolumeAttributesClass. # noqa: E501
+
+ Name of the CSI driver This field is immutable. # noqa: E501
+
+ :return: The driver_name of this V1VolumeAttributesClass. # noqa: E501
+ :rtype: str
+ """
+ return self._driver_name
+
+ @driver_name.setter
+ def driver_name(self, driver_name):
+ """Sets the driver_name of this V1VolumeAttributesClass.
+
+ Name of the CSI driver This field is immutable. # noqa: E501
+
+ :param driver_name: The driver_name of this V1VolumeAttributesClass. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and driver_name is None: # noqa: E501
+ raise ValueError("Invalid value for `driver_name`, must not be `None`") # noqa: E501
+
+ self._driver_name = driver_name
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1VolumeAttributesClass. # noqa: E501
+
+ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
+
+ :return: The kind of this V1VolumeAttributesClass. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1VolumeAttributesClass.
+
+ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
+
+ :param kind: The kind of this V1VolumeAttributesClass. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1VolumeAttributesClass. # noqa: E501
+
+
+ :return: The metadata of this V1VolumeAttributesClass. # noqa: E501
+ :rtype: V1ObjectMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1VolumeAttributesClass.
+
+
+ :param metadata: The metadata of this V1VolumeAttributesClass. # noqa: E501
+ :type: V1ObjectMeta
+ """
+
+ self._metadata = metadata
+
+ @property
+ def parameters(self):
+ """Gets the parameters of this V1VolumeAttributesClass. # noqa: E501
+
+ parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass. This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an \"Infeasible\" state in the modifyVolumeStatus field. # noqa: E501
+
+ :return: The parameters of this V1VolumeAttributesClass. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._parameters
+
+ @parameters.setter
+ def parameters(self, parameters):
+ """Sets the parameters of this V1VolumeAttributesClass.
+
+ parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass. This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an \"Infeasible\" state in the modifyVolumeStatus field. # noqa: E501
+
+ :param parameters: The parameters of this V1VolumeAttributesClass. # noqa: E501
+ :type: dict(str, str)
+ """
+
+ self._parameters = parameters
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1VolumeAttributesClass):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1VolumeAttributesClass):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attributes_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attributes_class_list.py
new file mode 100644
index 00000000000..dbb8f775333
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_attributes_class_list.py
@@ -0,0 +1,205 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1VolumeAttributesClassList(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'api_version': 'str',
+ 'items': 'list[V1VolumeAttributesClass]',
+ 'kind': 'str',
+ 'metadata': 'V1ListMeta'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'items': 'items',
+ 'kind': 'kind',
+ 'metadata': 'metadata'
+ }
+
+ def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501
+ """V1VolumeAttributesClassList - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._api_version = None
+ self._items = None
+ self._kind = None
+ self._metadata = None
+ self.discriminator = None
+
+ if api_version is not None:
+ self.api_version = api_version
+ self.items = items
+ if kind is not None:
+ self.kind = kind
+ if metadata is not None:
+ self.metadata = metadata
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1VolumeAttributesClassList. # noqa: E501
+
+ APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
+
+ :return: The api_version of this V1VolumeAttributesClassList. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1VolumeAttributesClassList.
+
+ APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
+
+ :param api_version: The api_version of this V1VolumeAttributesClassList. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def items(self):
+ """Gets the items of this V1VolumeAttributesClassList. # noqa: E501
+
+ items is the list of VolumeAttributesClass objects. # noqa: E501
+
+ :return: The items of this V1VolumeAttributesClassList. # noqa: E501
+ :rtype: list[V1VolumeAttributesClass]
+ """
+ return self._items
+
+ @items.setter
+ def items(self, items):
+ """Sets the items of this V1VolumeAttributesClassList.
+
+ items is the list of VolumeAttributesClass objects. # noqa: E501
+
+ :param items: The items of this V1VolumeAttributesClassList. # noqa: E501
+ :type: list[V1VolumeAttributesClass]
+ """
+ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501
+ raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501
+
+ self._items = items
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1VolumeAttributesClassList. # noqa: E501
+
+ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
+
+ :return: The kind of this V1VolumeAttributesClassList. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1VolumeAttributesClassList.
+
+ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
+
+ :param kind: The kind of this V1VolumeAttributesClassList. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1VolumeAttributesClassList. # noqa: E501
+
+
+ :return: The metadata of this V1VolumeAttributesClassList. # noqa: E501
+ :rtype: V1ListMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1VolumeAttributesClassList.
+
+
+ :param metadata: The metadata of this V1VolumeAttributesClassList. # noqa: E501
+ :type: V1ListMeta
+ """
+
+ self._metadata = metadata
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1VolumeAttributesClassList):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1VolumeAttributesClassList):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_device.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_device.py
index 91c1bb628f2..5cc3268d4e3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_device.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_device.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_error.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_error.py
index 0d833c8c7a2..e8be1194f6e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_error.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_error.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -66,7 +66,7 @@ class V1VolumeError(object):
def error_code(self):
"""Gets the error_code of this V1VolumeError. # noqa: E501
- errorCode is a numeric gRPC code representing the error encountered during Attach or Detach operations. This is an optional, alpha field that requires the MutableCSINodeAllocatableCount feature gate being enabled to be set. # noqa: E501
+ errorCode is a numeric gRPC code representing the error encountered during Attach or Detach operations. This is an optional, beta field that requires the MutableCSINodeAllocatableCount feature gate being enabled to be set. # noqa: E501
:return: The error_code of this V1VolumeError. # noqa: E501
:rtype: int
@@ -77,7 +77,7 @@ class V1VolumeError(object):
def error_code(self, error_code):
"""Sets the error_code of this V1VolumeError.
- errorCode is a numeric gRPC code representing the error encountered during Attach or Detach operations. This is an optional, alpha field that requires the MutableCSINodeAllocatableCount feature gate being enabled to be set. # noqa: E501
+ errorCode is a numeric gRPC code representing the error encountered during Attach or Detach operations. This is an optional, beta field that requires the MutableCSINodeAllocatableCount feature gate being enabled to be set. # noqa: E501
:param error_code: The error_code of this V1VolumeError. # noqa: E501
:type: int
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount.py
index 8c02b6027d4..020c765c1ba 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount_status.py
index a9917e8f86b..c40e68c3bc4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_affinity.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_affinity.py
index 1eac2380ec7..5da4436aa72 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_affinity.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_affinity.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_resources.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_resources.py
index c6ea9abcceb..9dbceb0ae8b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_resources.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_node_resources.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_projection.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_projection.py
index ddd3bb99a03..bcd585cc0b8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_projection.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_projection.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -36,6 +36,7 @@ class V1VolumeProjection(object):
'cluster_trust_bundle': 'V1ClusterTrustBundleProjection',
'config_map': 'V1ConfigMapProjection',
'downward_api': 'V1DownwardAPIProjection',
+ 'pod_certificate': 'V1PodCertificateProjection',
'secret': 'V1SecretProjection',
'service_account_token': 'V1ServiceAccountTokenProjection'
}
@@ -44,11 +45,12 @@ class V1VolumeProjection(object):
'cluster_trust_bundle': 'clusterTrustBundle',
'config_map': 'configMap',
'downward_api': 'downwardAPI',
+ 'pod_certificate': 'podCertificate',
'secret': 'secret',
'service_account_token': 'serviceAccountToken'
}
- def __init__(self, cluster_trust_bundle=None, config_map=None, downward_api=None, secret=None, service_account_token=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, cluster_trust_bundle=None, config_map=None, downward_api=None, pod_certificate=None, secret=None, service_account_token=None, local_vars_configuration=None): # noqa: E501
"""V1VolumeProjection - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -57,6 +59,7 @@ class V1VolumeProjection(object):
self._cluster_trust_bundle = None
self._config_map = None
self._downward_api = None
+ self._pod_certificate = None
self._secret = None
self._service_account_token = None
self.discriminator = None
@@ -67,6 +70,8 @@ class V1VolumeProjection(object):
self.config_map = config_map
if downward_api is not None:
self.downward_api = downward_api
+ if pod_certificate is not None:
+ self.pod_certificate = pod_certificate
if secret is not None:
self.secret = secret
if service_account_token is not None:
@@ -136,6 +141,27 @@ class V1VolumeProjection(object):
self._downward_api = downward_api
@property
+ def pod_certificate(self):
+ """Gets the pod_certificate of this V1VolumeProjection. # noqa: E501
+
+
+ :return: The pod_certificate of this V1VolumeProjection. # noqa: E501
+ :rtype: V1PodCertificateProjection
+ """
+ return self._pod_certificate
+
+ @pod_certificate.setter
+ def pod_certificate(self, pod_certificate):
+ """Sets the pod_certificate of this V1VolumeProjection.
+
+
+ :param pod_certificate: The pod_certificate of this V1VolumeProjection. # noqa: E501
+ :type: V1PodCertificateProjection
+ """
+
+ self._pod_certificate = pod_certificate
+
+ @property
def secret(self):
"""Gets the secret of this V1VolumeProjection. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_resource_requirements.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_resource_requirements.py
index 22927caa6a5..7e8cd55c0ed 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_volume_resource_requirements.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_resource_requirements.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_vsphere_virtual_disk_volume_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_vsphere_virtual_disk_volume_source.py
index f823e2369ce..a7e6805e0eb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_vsphere_virtual_disk_volume_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_vsphere_virtual_disk_volume_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_watch_event.py b/contrib/python/kubernetes/kubernetes/client/models/v1_watch_event.py
index 3eebaebc8ef..c52f458a4c3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_watch_event.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_watch_event.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_webhook_conversion.py b/contrib/python/kubernetes/kubernetes/client/models/v1_webhook_conversion.py
index 451498c0a7f..bbfdf370f4d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_webhook_conversion.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_webhook_conversion.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_weighted_pod_affinity_term.py b/contrib/python/kubernetes/kubernetes/client/models/v1_weighted_pod_affinity_term.py
index ff4142bacc4..c3ccf5bde9e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_weighted_pod_affinity_term.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_weighted_pod_affinity_term.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_windows_security_context_options.py b/contrib/python/kubernetes/kubernetes/client/models/v1_windows_security_context_options.py
index 3369b024ac3..f39166ce5e2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_windows_security_context_options.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_windows_security_context_options.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_apply_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_apply_configuration.py
index 58a618c2aad..69d993459ad 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_apply_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_apply_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle.py
index 04edba9fb65..5a4e90acaa6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_list.py
index 53eeebc1e3d..421422c9393 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_spec.py
index 0be936810a8..99c276b3a2d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_cluster_trust_bundle_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_group_version_resource.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_group_version_resource.py
index 05e085e4ed0..6efbb6b12ab 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_group_version_resource.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_group_version_resource.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_json_patch.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_json_patch.py
index 990a092caa0..19526782960 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_json_patch.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_json_patch.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_condition.py
index 06ee19ef8b3..90facd81a75 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_resources.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_resources.py
index b07f2cb6b39..f52c43ba556 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_resources.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_match_resources.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_migration_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_migration_condition.py
index 12d6d128212..1d7dd921630 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_migration_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_migration_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy.py
index 43e520d50b9..f11d2ef4eec 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding.py
index ab6fb798126..9e51ba2a9b2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_list.py
index c522709b8f7..7a393f59723 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_spec.py
index d455d243b1b..b4c5a32db63 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_binding_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_list.py
index 81a3a775969..b43fba3f5cc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_spec.py
index 70a83f2da64..30bd3322b5b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutating_admission_policy_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutation.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutation.py
index ff80b7ee6e1..32cbb604102 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutation.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_mutation.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_named_rule_with_operations.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_named_rule_with_operations.py
index 28c5c3c16a9..e1a653894da 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_named_rule_with_operations.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_named_rule_with_operations.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_kind.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_kind.py
index 32cd6f2fffc..20d0fc6e89b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_kind.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_kind.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_ref.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_ref.py
index 80dfe0f7d35..d20852657fc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_ref.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_param_ref.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request.py
index b7b5ea8e25f..a6e770b0084 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1beta1ValidatingAdmissionPolicy(object):
+class V1alpha1PodCertificateRequest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -36,8 +36,8 @@ class V1beta1ValidatingAdmissionPolicy(object):
'api_version': 'str',
'kind': 'str',
'metadata': 'V1ObjectMeta',
- 'spec': 'V1beta1ValidatingAdmissionPolicySpec',
- 'status': 'V1beta1ValidatingAdmissionPolicyStatus'
+ 'spec': 'V1alpha1PodCertificateRequestSpec',
+ 'status': 'V1alpha1PodCertificateRequestStatus'
}
attribute_map = {
@@ -49,7 +49,7 @@ class V1beta1ValidatingAdmissionPolicy(object):
}
def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501
- """V1beta1ValidatingAdmissionPolicy - a model defined in OpenAPI""" # noqa: E501
+ """V1alpha1PodCertificateRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -67,29 +67,28 @@ class V1beta1ValidatingAdmissionPolicy(object):
self.kind = kind
if metadata is not None:
self.metadata = metadata
- if spec is not None:
- self.spec = spec
+ self.spec = spec
if status is not None:
self.status = status
@property
def api_version(self):
- """Gets the api_version of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ """Gets the api_version of this V1alpha1PodCertificateRequest. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ :return: The api_version of this V1alpha1PodCertificateRequest. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1beta1ValidatingAdmissionPolicy.
+ """Sets the api_version of this V1alpha1PodCertificateRequest.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ :param api_version: The api_version of this V1alpha1PodCertificateRequest. # noqa: E501
:type: str
"""
@@ -97,22 +96,22 @@ class V1beta1ValidatingAdmissionPolicy(object):
@property
def kind(self):
- """Gets the kind of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ """Gets the kind of this V1alpha1PodCertificateRequest. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ :return: The kind of this V1alpha1PodCertificateRequest. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1beta1ValidatingAdmissionPolicy.
+ """Sets the kind of this V1alpha1PodCertificateRequest.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ :param kind: The kind of this V1alpha1PodCertificateRequest. # noqa: E501
:type: str
"""
@@ -120,20 +119,20 @@ class V1beta1ValidatingAdmissionPolicy(object):
@property
def metadata(self):
- """Gets the metadata of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ """Gets the metadata of this V1alpha1PodCertificateRequest. # noqa: E501
- :return: The metadata of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ :return: The metadata of this V1alpha1PodCertificateRequest. # noqa: E501
:rtype: V1ObjectMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1beta1ValidatingAdmissionPolicy.
+ """Sets the metadata of this V1alpha1PodCertificateRequest.
- :param metadata: The metadata of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ :param metadata: The metadata of this V1alpha1PodCertificateRequest. # noqa: E501
:type: V1ObjectMeta
"""
@@ -141,42 +140,44 @@ class V1beta1ValidatingAdmissionPolicy(object):
@property
def spec(self):
- """Gets the spec of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ """Gets the spec of this V1alpha1PodCertificateRequest. # noqa: E501
- :return: The spec of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
- :rtype: V1beta1ValidatingAdmissionPolicySpec
+ :return: The spec of this V1alpha1PodCertificateRequest. # noqa: E501
+ :rtype: V1alpha1PodCertificateRequestSpec
"""
return self._spec
@spec.setter
def spec(self, spec):
- """Sets the spec of this V1beta1ValidatingAdmissionPolicy.
+ """Sets the spec of this V1alpha1PodCertificateRequest.
- :param spec: The spec of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
- :type: V1beta1ValidatingAdmissionPolicySpec
+ :param spec: The spec of this V1alpha1PodCertificateRequest. # noqa: E501
+ :type: V1alpha1PodCertificateRequestSpec
"""
+ if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501
+ raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501
self._spec = spec
@property
def status(self):
- """Gets the status of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
+ """Gets the status of this V1alpha1PodCertificateRequest. # noqa: E501
- :return: The status of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
- :rtype: V1beta1ValidatingAdmissionPolicyStatus
+ :return: The status of this V1alpha1PodCertificateRequest. # noqa: E501
+ :rtype: V1alpha1PodCertificateRequestStatus
"""
return self._status
@status.setter
def status(self, status):
- """Sets the status of this V1beta1ValidatingAdmissionPolicy.
+ """Sets the status of this V1alpha1PodCertificateRequest.
- :param status: The status of this V1beta1ValidatingAdmissionPolicy. # noqa: E501
- :type: V1beta1ValidatingAdmissionPolicyStatus
+ :param status: The status of this V1alpha1PodCertificateRequest. # noqa: E501
+ :type: V1alpha1PodCertificateRequestStatus
"""
self._status = status
@@ -215,14 +216,14 @@ class V1beta1ValidatingAdmissionPolicy(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicy):
+ if not isinstance(other, V1alpha1PodCertificateRequest):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicy):
+ if not isinstance(other, V1alpha1PodCertificateRequest):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_list.py
new file mode 100644
index 00000000000..26d631f9f32
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_list.py
@@ -0,0 +1,205 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha1PodCertificateRequestList(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'api_version': 'str',
+ 'items': 'list[V1alpha1PodCertificateRequest]',
+ 'kind': 'str',
+ 'metadata': 'V1ListMeta'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'items': 'items',
+ 'kind': 'kind',
+ 'metadata': 'metadata'
+ }
+
+ def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha1PodCertificateRequestList - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._api_version = None
+ self._items = None
+ self._kind = None
+ self._metadata = None
+ self.discriminator = None
+
+ if api_version is not None:
+ self.api_version = api_version
+ self.items = items
+ if kind is not None:
+ self.kind = kind
+ if metadata is not None:
+ self.metadata = metadata
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1alpha1PodCertificateRequestList. # noqa: E501
+
+ APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
+
+ :return: The api_version of this V1alpha1PodCertificateRequestList. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1alpha1PodCertificateRequestList.
+
+ APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
+
+ :param api_version: The api_version of this V1alpha1PodCertificateRequestList. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def items(self):
+ """Gets the items of this V1alpha1PodCertificateRequestList. # noqa: E501
+
+ items is a collection of PodCertificateRequest objects # noqa: E501
+
+ :return: The items of this V1alpha1PodCertificateRequestList. # noqa: E501
+ :rtype: list[V1alpha1PodCertificateRequest]
+ """
+ return self._items
+
+ @items.setter
+ def items(self, items):
+ """Sets the items of this V1alpha1PodCertificateRequestList.
+
+ items is a collection of PodCertificateRequest objects # noqa: E501
+
+ :param items: The items of this V1alpha1PodCertificateRequestList. # noqa: E501
+ :type: list[V1alpha1PodCertificateRequest]
+ """
+ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501
+ raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501
+
+ self._items = items
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1alpha1PodCertificateRequestList. # noqa: E501
+
+ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
+
+ :return: The kind of this V1alpha1PodCertificateRequestList. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1alpha1PodCertificateRequestList.
+
+ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
+
+ :param kind: The kind of this V1alpha1PodCertificateRequestList. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1alpha1PodCertificateRequestList. # noqa: E501
+
+
+ :return: The metadata of this V1alpha1PodCertificateRequestList. # noqa: E501
+ :rtype: V1ListMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1alpha1PodCertificateRequestList.
+
+
+ :param metadata: The metadata of this V1alpha1PodCertificateRequestList. # noqa: E501
+ :type: V1ListMeta
+ """
+
+ self._metadata = metadata
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1alpha1PodCertificateRequestList):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1alpha1PodCertificateRequestList):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_spec.py
new file mode 100644
index 00000000000..a4730234488
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_spec.py
@@ -0,0 +1,389 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha1PodCertificateRequestSpec(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'max_expiration_seconds': 'int',
+ 'node_name': 'str',
+ 'node_uid': 'str',
+ 'pkix_public_key': 'str',
+ 'pod_name': 'str',
+ 'pod_uid': 'str',
+ 'proof_of_possession': 'str',
+ 'service_account_name': 'str',
+ 'service_account_uid': 'str',
+ 'signer_name': 'str'
+ }
+
+ attribute_map = {
+ 'max_expiration_seconds': 'maxExpirationSeconds',
+ 'node_name': 'nodeName',
+ 'node_uid': 'nodeUID',
+ 'pkix_public_key': 'pkixPublicKey',
+ 'pod_name': 'podName',
+ 'pod_uid': 'podUID',
+ 'proof_of_possession': 'proofOfPossession',
+ 'service_account_name': 'serviceAccountName',
+ 'service_account_uid': 'serviceAccountUID',
+ 'signer_name': 'signerName'
+ }
+
+ def __init__(self, max_expiration_seconds=None, node_name=None, node_uid=None, pkix_public_key=None, pod_name=None, pod_uid=None, proof_of_possession=None, service_account_name=None, service_account_uid=None, signer_name=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha1PodCertificateRequestSpec - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._max_expiration_seconds = None
+ self._node_name = None
+ self._node_uid = None
+ self._pkix_public_key = None
+ self._pod_name = None
+ self._pod_uid = None
+ self._proof_of_possession = None
+ self._service_account_name = None
+ self._service_account_uid = None
+ self._signer_name = None
+ self.discriminator = None
+
+ if max_expiration_seconds is not None:
+ self.max_expiration_seconds = max_expiration_seconds
+ self.node_name = node_name
+ self.node_uid = node_uid
+ self.pkix_public_key = pkix_public_key
+ self.pod_name = pod_name
+ self.pod_uid = pod_uid
+ self.proof_of_possession = proof_of_possession
+ self.service_account_name = service_account_name
+ self.service_account_uid = service_account_uid
+ self.signer_name = signer_name
+
+ @property
+ def max_expiration_seconds(self):
+ """Gets the max_expiration_seconds of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ maxExpirationSeconds is the maximum lifetime permitted for the certificate. If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver will reject values shorter than 3600 (1 hour). The maximum allowable value is 7862400 (91 days). The signer implementation is then free to issue a certificate with any lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 seconds (1 hour). This constraint is enforced by kube-apiserver. `kubernetes.io` signers will never issue certificates with a lifetime longer than 24 hours. # noqa: E501
+
+ :return: The max_expiration_seconds of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: int
+ """
+ return self._max_expiration_seconds
+
+ @max_expiration_seconds.setter
+ def max_expiration_seconds(self, max_expiration_seconds):
+ """Sets the max_expiration_seconds of this V1alpha1PodCertificateRequestSpec.
+
+ maxExpirationSeconds is the maximum lifetime permitted for the certificate. If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver will reject values shorter than 3600 (1 hour). The maximum allowable value is 7862400 (91 days). The signer implementation is then free to issue a certificate with any lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 seconds (1 hour). This constraint is enforced by kube-apiserver. `kubernetes.io` signers will never issue certificates with a lifetime longer than 24 hours. # noqa: E501
+
+ :param max_expiration_seconds: The max_expiration_seconds of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: int
+ """
+
+ self._max_expiration_seconds = max_expiration_seconds
+
+ @property
+ def node_name(self):
+ """Gets the node_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ nodeName is the name of the node the pod is assigned to. # noqa: E501
+
+ :return: The node_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._node_name
+
+ @node_name.setter
+ def node_name(self, node_name):
+ """Sets the node_name of this V1alpha1PodCertificateRequestSpec.
+
+ nodeName is the name of the node the pod is assigned to. # noqa: E501
+
+ :param node_name: The node_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and node_name is None: # noqa: E501
+ raise ValueError("Invalid value for `node_name`, must not be `None`") # noqa: E501
+
+ self._node_name = node_name
+
+ @property
+ def node_uid(self):
+ """Gets the node_uid of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ nodeUID is the UID of the node the pod is assigned to. # noqa: E501
+
+ :return: The node_uid of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._node_uid
+
+ @node_uid.setter
+ def node_uid(self, node_uid):
+ """Sets the node_uid of this V1alpha1PodCertificateRequestSpec.
+
+ nodeUID is the UID of the node the pod is assigned to. # noqa: E501
+
+ :param node_uid: The node_uid of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and node_uid is None: # noqa: E501
+ raise ValueError("Invalid value for `node_uid`, must not be `None`") # noqa: E501
+
+ self._node_uid = node_uid
+
+ @property
+ def pkix_public_key(self):
+ """Gets the pkix_public_key of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ pkixPublicKey is the PKIX-serialized public key the signer will issue the certificate to. The key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in the future. Signer implementations do not need to support all key types supported by kube-apiserver and kubelet. If a signer does not support the key type used for a given PodCertificateRequest, it must deny the request by setting a status.conditions entry with a type of \"Denied\" and a reason of \"UnsupportedKeyType\". It may also suggest a key type that it does support in the message field. # noqa: E501
+
+ :return: The pkix_public_key of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._pkix_public_key
+
+ @pkix_public_key.setter
+ def pkix_public_key(self, pkix_public_key):
+ """Sets the pkix_public_key of this V1alpha1PodCertificateRequestSpec.
+
+ pkixPublicKey is the PKIX-serialized public key the signer will issue the certificate to. The key must be one of RSA3072, RSA4096, ECDSAP256, ECDSAP384, ECDSAP521, or ED25519. Note that this list may be expanded in the future. Signer implementations do not need to support all key types supported by kube-apiserver and kubelet. If a signer does not support the key type used for a given PodCertificateRequest, it must deny the request by setting a status.conditions entry with a type of \"Denied\" and a reason of \"UnsupportedKeyType\". It may also suggest a key type that it does support in the message field. # noqa: E501
+
+ :param pkix_public_key: The pkix_public_key of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and pkix_public_key is None: # noqa: E501
+ raise ValueError("Invalid value for `pkix_public_key`, must not be `None`") # noqa: E501
+ if (self.local_vars_configuration.client_side_validation and
+ pkix_public_key is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', pkix_public_key)): # noqa: E501
+ raise ValueError(r"Invalid value for `pkix_public_key`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501
+
+ self._pkix_public_key = pkix_public_key
+
+ @property
+ def pod_name(self):
+ """Gets the pod_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ podName is the name of the pod into which the certificate will be mounted. # noqa: E501
+
+ :return: The pod_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._pod_name
+
+ @pod_name.setter
+ def pod_name(self, pod_name):
+ """Sets the pod_name of this V1alpha1PodCertificateRequestSpec.
+
+ podName is the name of the pod into which the certificate will be mounted. # noqa: E501
+
+ :param pod_name: The pod_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and pod_name is None: # noqa: E501
+ raise ValueError("Invalid value for `pod_name`, must not be `None`") # noqa: E501
+
+ self._pod_name = pod_name
+
+ @property
+ def pod_uid(self):
+ """Gets the pod_uid of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ podUID is the UID of the pod into which the certificate will be mounted. # noqa: E501
+
+ :return: The pod_uid of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._pod_uid
+
+ @pod_uid.setter
+ def pod_uid(self, pod_uid):
+ """Sets the pod_uid of this V1alpha1PodCertificateRequestSpec.
+
+ podUID is the UID of the pod into which the certificate will be mounted. # noqa: E501
+
+ :param pod_uid: The pod_uid of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and pod_uid is None: # noqa: E501
+ raise ValueError("Invalid value for `pod_uid`, must not be `None`") # noqa: E501
+
+ self._pod_uid = pod_uid
+
+ @property
+ def proof_of_possession(self):
+ """Gets the proof_of_possession of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ proofOfPossession proves that the requesting kubelet holds the private key corresponding to pkixPublicKey. It is contructed by signing the ASCII bytes of the pod's UID using `pkixPublicKey`. kube-apiserver validates the proof of possession during creation of the PodCertificateRequest. If the key is an RSA key, then the signature is over the ASCII bytes of the pod UID, using RSASSA-PSS from RFC 8017 (as implemented by the golang function crypto/rsa.SignPSS with nil options). If the key is an ECDSA key, then the signature is as described by [SEC 1, Version 2.0](https://www.secg.org/sec1-v2.pdf) (as implemented by the golang library function crypto/ecdsa.SignASN1) If the key is an ED25519 key, the the signature is as described by the [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by the golang library crypto/ed25519.Sign). # noqa: E501
+
+ :return: The proof_of_possession of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._proof_of_possession
+
+ @proof_of_possession.setter
+ def proof_of_possession(self, proof_of_possession):
+ """Sets the proof_of_possession of this V1alpha1PodCertificateRequestSpec.
+
+ proofOfPossession proves that the requesting kubelet holds the private key corresponding to pkixPublicKey. It is contructed by signing the ASCII bytes of the pod's UID using `pkixPublicKey`. kube-apiserver validates the proof of possession during creation of the PodCertificateRequest. If the key is an RSA key, then the signature is over the ASCII bytes of the pod UID, using RSASSA-PSS from RFC 8017 (as implemented by the golang function crypto/rsa.SignPSS with nil options). If the key is an ECDSA key, then the signature is as described by [SEC 1, Version 2.0](https://www.secg.org/sec1-v2.pdf) (as implemented by the golang library function crypto/ecdsa.SignASN1) If the key is an ED25519 key, the the signature is as described by the [ED25519 Specification](https://ed25519.cr.yp.to/) (as implemented by the golang library crypto/ed25519.Sign). # noqa: E501
+
+ :param proof_of_possession: The proof_of_possession of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and proof_of_possession is None: # noqa: E501
+ raise ValueError("Invalid value for `proof_of_possession`, must not be `None`") # noqa: E501
+ if (self.local_vars_configuration.client_side_validation and
+ proof_of_possession is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', proof_of_possession)): # noqa: E501
+ raise ValueError(r"Invalid value for `proof_of_possession`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501
+
+ self._proof_of_possession = proof_of_possession
+
+ @property
+ def service_account_name(self):
+ """Gets the service_account_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ serviceAccountName is the name of the service account the pod is running as. # noqa: E501
+
+ :return: The service_account_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._service_account_name
+
+ @service_account_name.setter
+ def service_account_name(self, service_account_name):
+ """Sets the service_account_name of this V1alpha1PodCertificateRequestSpec.
+
+ serviceAccountName is the name of the service account the pod is running as. # noqa: E501
+
+ :param service_account_name: The service_account_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and service_account_name is None: # noqa: E501
+ raise ValueError("Invalid value for `service_account_name`, must not be `None`") # noqa: E501
+
+ self._service_account_name = service_account_name
+
+ @property
+ def service_account_uid(self):
+ """Gets the service_account_uid of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ serviceAccountUID is the UID of the service account the pod is running as. # noqa: E501
+
+ :return: The service_account_uid of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._service_account_uid
+
+ @service_account_uid.setter
+ def service_account_uid(self, service_account_uid):
+ """Sets the service_account_uid of this V1alpha1PodCertificateRequestSpec.
+
+ serviceAccountUID is the UID of the service account the pod is running as. # noqa: E501
+
+ :param service_account_uid: The service_account_uid of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and service_account_uid is None: # noqa: E501
+ raise ValueError("Invalid value for `service_account_uid`, must not be `None`") # noqa: E501
+
+ self._service_account_uid = service_account_uid
+
+ @property
+ def signer_name(self):
+ """Gets the signer_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+
+ signerName indicates the requested signer. All signer names beginning with `kubernetes.io` are reserved for use by the Kubernetes project. There is currently one well-known signer documented by the Kubernetes project, `kubernetes.io/kube-apiserver-client-pod`, which will issue client certificates understood by kube-apiserver. It is currently unimplemented. # noqa: E501
+
+ :return: The signer_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._signer_name
+
+ @signer_name.setter
+ def signer_name(self, signer_name):
+ """Sets the signer_name of this V1alpha1PodCertificateRequestSpec.
+
+ signerName indicates the requested signer. All signer names beginning with `kubernetes.io` are reserved for use by the Kubernetes project. There is currently one well-known signer documented by the Kubernetes project, `kubernetes.io/kube-apiserver-client-pod`, which will issue client certificates understood by kube-apiserver. It is currently unimplemented. # noqa: E501
+
+ :param signer_name: The signer_name of this V1alpha1PodCertificateRequestSpec. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and signer_name is None: # noqa: E501
+ raise ValueError("Invalid value for `signer_name`, must not be `None`") # noqa: E501
+
+ self._signer_name = signer_name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1alpha1PodCertificateRequestSpec):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1alpha1PodCertificateRequestSpec):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_status.py
new file mode 100644
index 00000000000..5ed0861313a
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_pod_certificate_request_status.py
@@ -0,0 +1,234 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha1PodCertificateRequestStatus(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'begin_refresh_at': 'datetime',
+ 'certificate_chain': 'str',
+ 'conditions': 'list[V1Condition]',
+ 'not_after': 'datetime',
+ 'not_before': 'datetime'
+ }
+
+ attribute_map = {
+ 'begin_refresh_at': 'beginRefreshAt',
+ 'certificate_chain': 'certificateChain',
+ 'conditions': 'conditions',
+ 'not_after': 'notAfter',
+ 'not_before': 'notBefore'
+ }
+
+ def __init__(self, begin_refresh_at=None, certificate_chain=None, conditions=None, not_after=None, not_before=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha1PodCertificateRequestStatus - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._begin_refresh_at = None
+ self._certificate_chain = None
+ self._conditions = None
+ self._not_after = None
+ self._not_before = None
+ self.discriminator = None
+
+ if begin_refresh_at is not None:
+ self.begin_refresh_at = begin_refresh_at
+ if certificate_chain is not None:
+ self.certificate_chain = certificate_chain
+ if conditions is not None:
+ self.conditions = conditions
+ if not_after is not None:
+ self.not_after = not_after
+ if not_before is not None:
+ self.not_before = not_before
+
+ @property
+ def begin_refresh_at(self):
+ """Gets the begin_refresh_at of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+
+ beginRefreshAt is the time at which the kubelet should begin trying to refresh the certificate. This field is set via the /status subresource, and must be set at the same time as certificateChain. Once populated, this field is immutable. This field is only a hint. Kubelet may start refreshing before or after this time if necessary. # noqa: E501
+
+ :return: The begin_refresh_at of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :rtype: datetime
+ """
+ return self._begin_refresh_at
+
+ @begin_refresh_at.setter
+ def begin_refresh_at(self, begin_refresh_at):
+ """Sets the begin_refresh_at of this V1alpha1PodCertificateRequestStatus.
+
+ beginRefreshAt is the time at which the kubelet should begin trying to refresh the certificate. This field is set via the /status subresource, and must be set at the same time as certificateChain. Once populated, this field is immutable. This field is only a hint. Kubelet may start refreshing before or after this time if necessary. # noqa: E501
+
+ :param begin_refresh_at: The begin_refresh_at of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :type: datetime
+ """
+
+ self._begin_refresh_at = begin_refresh_at
+
+ @property
+ def certificate_chain(self):
+ """Gets the certificate_chain of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+
+ certificateChain is populated with an issued certificate by the signer. This field is set via the /status subresource. Once populated, this field is immutable. If the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty. Validation requirements: 1. certificateChain must consist of one or more PEM-formatted certificates. 2. Each entry must be a valid PEM-wrapped, DER-encoded ASN.1 Certificate as described in section 4 of RFC5280. If more than one block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes. When projecting the chain into a pod volume, kubelet will drop any data in-between the PEM blocks, as well as any PEM block headers. # noqa: E501
+
+ :return: The certificate_chain of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._certificate_chain
+
+ @certificate_chain.setter
+ def certificate_chain(self, certificate_chain):
+ """Sets the certificate_chain of this V1alpha1PodCertificateRequestStatus.
+
+ certificateChain is populated with an issued certificate by the signer. This field is set via the /status subresource. Once populated, this field is immutable. If the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty. Validation requirements: 1. certificateChain must consist of one or more PEM-formatted certificates. 2. Each entry must be a valid PEM-wrapped, DER-encoded ASN.1 Certificate as described in section 4 of RFC5280. If more than one block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes. When projecting the chain into a pod volume, kubelet will drop any data in-between the PEM blocks, as well as any PEM block headers. # noqa: E501
+
+ :param certificate_chain: The certificate_chain of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :type: str
+ """
+
+ self._certificate_chain = certificate_chain
+
+ @property
+ def conditions(self):
+ """Gets the conditions of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+
+ conditions applied to the request. The types \"Issued\", \"Denied\", and \"Failed\" have special handling. At most one of these conditions may be present, and they must have status \"True\". If the request is denied with `Reason=UnsupportedKeyType`, the signer may suggest a key type that will work in the message field. # noqa: E501
+
+ :return: The conditions of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :rtype: list[V1Condition]
+ """
+ return self._conditions
+
+ @conditions.setter
+ def conditions(self, conditions):
+ """Sets the conditions of this V1alpha1PodCertificateRequestStatus.
+
+ conditions applied to the request. The types \"Issued\", \"Denied\", and \"Failed\" have special handling. At most one of these conditions may be present, and they must have status \"True\". If the request is denied with `Reason=UnsupportedKeyType`, the signer may suggest a key type that will work in the message field. # noqa: E501
+
+ :param conditions: The conditions of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :type: list[V1Condition]
+ """
+
+ self._conditions = conditions
+
+ @property
+ def not_after(self):
+ """Gets the not_after of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+
+ notAfter is the time at which the certificate expires. The value must be the same as the notAfter value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain. # noqa: E501
+
+ :return: The not_after of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :rtype: datetime
+ """
+ return self._not_after
+
+ @not_after.setter
+ def not_after(self, not_after):
+ """Sets the not_after of this V1alpha1PodCertificateRequestStatus.
+
+ notAfter is the time at which the certificate expires. The value must be the same as the notAfter value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain. # noqa: E501
+
+ :param not_after: The not_after of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :type: datetime
+ """
+
+ self._not_after = not_after
+
+ @property
+ def not_before(self):
+ """Gets the not_before of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+
+ notBefore is the time at which the certificate becomes valid. The value must be the same as the notBefore value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain. # noqa: E501
+
+ :return: The not_before of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :rtype: datetime
+ """
+ return self._not_before
+
+ @not_before.setter
+ def not_before(self, not_before):
+ """Sets the not_before of this V1alpha1PodCertificateRequestStatus.
+
+ notBefore is the time at which the certificate becomes valid. The value must be the same as the notBefore value in the leaf certificate in certificateChain. This field is set via the /status subresource. Once populated, it is immutable. The signer must set this field at the same time it sets certificateChain. # noqa: E501
+
+ :param not_before: The not_before of this V1alpha1PodCertificateRequestStatus. # noqa: E501
+ :type: datetime
+ """
+
+ self._not_before = not_before
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1alpha1PodCertificateRequestStatus):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1alpha1PodCertificateRequestStatus):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_server_storage_version.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_server_storage_version.py
index c0aaf232d11..b6f6beee22b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_server_storage_version.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_server_storage_version.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version.py
index f3f4e1bcf17..f2505d29598 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_condition.py
index 82e01786fe0..05aea5285bf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_list.py
index 2452a51fc99..aaa5f49d504 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration.py
index 39bf0b47cd4..90e57a92726 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_list.py
index 2033cf1fd4a..c43a7a57b39 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_spec.py
index 8b5ea9b2938..2d7431ad2ba 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_status.py
index 33da35a6343..333228a1631 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_status.py
index 8dbf7e1a96f..59ae6b0211d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_variable.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_variable.py
index 561167c4747..2510fe65b63 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_variable.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_variable.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class.py
index 0b91d46af41..590c8d90afb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class_list.py
index 80c5366a2ba..6fcabf712d4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_volume_attributes_class_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate.py
index d66d7cfa44f..9ca6a75dfc9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_list.py
index 4e40bdbe291..7edfab45a84 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_spec.py
index af1fcfde095..bf51374422e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_lease_candidate_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_basic_device.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_basic_device.py
deleted file mode 100644
index b5515cc8797..00000000000
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_basic_device.py
+++ /dev/null
@@ -1,288 +0,0 @@
-# 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.33
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from kubernetes.client.configuration import Configuration
-
-
-class V1alpha3BasicDevice(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'all_nodes': 'bool',
- 'attributes': 'dict(str, V1alpha3DeviceAttribute)',
- 'capacity': 'dict(str, str)',
- 'consumes_counters': 'list[V1alpha3DeviceCounterConsumption]',
- 'node_name': 'str',
- 'node_selector': 'V1NodeSelector',
- 'taints': 'list[V1alpha3DeviceTaint]'
- }
-
- attribute_map = {
- 'all_nodes': 'allNodes',
- 'attributes': 'attributes',
- 'capacity': 'capacity',
- 'consumes_counters': 'consumesCounters',
- 'node_name': 'nodeName',
- 'node_selector': 'nodeSelector',
- 'taints': 'taints'
- }
-
- def __init__(self, all_nodes=None, attributes=None, capacity=None, consumes_counters=None, node_name=None, node_selector=None, taints=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3BasicDevice - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._all_nodes = None
- self._attributes = None
- self._capacity = None
- self._consumes_counters = None
- self._node_name = None
- self._node_selector = None
- self._taints = None
- self.discriminator = None
-
- if all_nodes is not None:
- self.all_nodes = all_nodes
- if attributes is not None:
- self.attributes = attributes
- if capacity is not None:
- self.capacity = capacity
- if consumes_counters is not None:
- self.consumes_counters = consumes_counters
- if node_name is not None:
- self.node_name = node_name
- if node_selector is not None:
- self.node_selector = node_selector
- if taints is not None:
- self.taints = taints
-
- @property
- def all_nodes(self):
- """Gets the all_nodes of this V1alpha3BasicDevice. # noqa: E501
-
- AllNodes indicates that all nodes have access to the device. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501
-
- :return: The all_nodes of this V1alpha3BasicDevice. # noqa: E501
- :rtype: bool
- """
- return self._all_nodes
-
- @all_nodes.setter
- def all_nodes(self, all_nodes):
- """Sets the all_nodes of this V1alpha3BasicDevice.
-
- AllNodes indicates that all nodes have access to the device. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501
-
- :param all_nodes: The all_nodes of this V1alpha3BasicDevice. # noqa: E501
- :type: bool
- """
-
- self._all_nodes = all_nodes
-
- @property
- def attributes(self):
- """Gets the attributes of this V1alpha3BasicDevice. # noqa: E501
-
- Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501
-
- :return: The attributes of this V1alpha3BasicDevice. # noqa: E501
- :rtype: dict(str, V1alpha3DeviceAttribute)
- """
- return self._attributes
-
- @attributes.setter
- def attributes(self, attributes):
- """Sets the attributes of this V1alpha3BasicDevice.
-
- Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501
-
- :param attributes: The attributes of this V1alpha3BasicDevice. # noqa: E501
- :type: dict(str, V1alpha3DeviceAttribute)
- """
-
- self._attributes = attributes
-
- @property
- def capacity(self):
- """Gets the capacity of this V1alpha3BasicDevice. # noqa: E501
-
- Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501
-
- :return: The capacity of this V1alpha3BasicDevice. # noqa: E501
- :rtype: dict(str, str)
- """
- return self._capacity
-
- @capacity.setter
- def capacity(self, capacity):
- """Sets the capacity of this V1alpha3BasicDevice.
-
- Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501
-
- :param capacity: The capacity of this V1alpha3BasicDevice. # noqa: E501
- :type: dict(str, str)
- """
-
- self._capacity = capacity
-
- @property
- def consumes_counters(self):
- """Gets the consumes_counters of this V1alpha3BasicDevice. # noqa: E501
-
- ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets. There can only be a single entry per counterSet. The total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each). # noqa: E501
-
- :return: The consumes_counters of this V1alpha3BasicDevice. # noqa: E501
- :rtype: list[V1alpha3DeviceCounterConsumption]
- """
- return self._consumes_counters
-
- @consumes_counters.setter
- def consumes_counters(self, consumes_counters):
- """Sets the consumes_counters of this V1alpha3BasicDevice.
-
- ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets. There can only be a single entry per counterSet. The total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each). # noqa: E501
-
- :param consumes_counters: The consumes_counters of this V1alpha3BasicDevice. # noqa: E501
- :type: list[V1alpha3DeviceCounterConsumption]
- """
-
- self._consumes_counters = consumes_counters
-
- @property
- def node_name(self):
- """Gets the node_name of this V1alpha3BasicDevice. # noqa: E501
-
- NodeName identifies the node where the device is available. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501
-
- :return: The node_name of this V1alpha3BasicDevice. # noqa: E501
- :rtype: str
- """
- return self._node_name
-
- @node_name.setter
- def node_name(self, node_name):
- """Sets the node_name of this V1alpha3BasicDevice.
-
- NodeName identifies the node where the device is available. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501
-
- :param node_name: The node_name of this V1alpha3BasicDevice. # noqa: E501
- :type: str
- """
-
- self._node_name = node_name
-
- @property
- def node_selector(self):
- """Gets the node_selector of this V1alpha3BasicDevice. # noqa: E501
-
-
- :return: The node_selector of this V1alpha3BasicDevice. # noqa: E501
- :rtype: V1NodeSelector
- """
- return self._node_selector
-
- @node_selector.setter
- def node_selector(self, node_selector):
- """Sets the node_selector of this V1alpha3BasicDevice.
-
-
- :param node_selector: The node_selector of this V1alpha3BasicDevice. # noqa: E501
- :type: V1NodeSelector
- """
-
- self._node_selector = node_selector
-
- @property
- def taints(self):
- """Gets the taints of this V1alpha3BasicDevice. # noqa: E501
-
- If specified, these are the driver-defined taints. The maximum number of taints is 4. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
-
- :return: The taints of this V1alpha3BasicDevice. # noqa: E501
- :rtype: list[V1alpha3DeviceTaint]
- """
- return self._taints
-
- @taints.setter
- def taints(self, taints):
- """Sets the taints of this V1alpha3BasicDevice.
-
- If specified, these are the driver-defined taints. The maximum number of taints is 4. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
-
- :param taints: The taints of this V1alpha3BasicDevice. # noqa: E501
- :type: list[V1alpha3DeviceTaint]
- """
-
- self._taints = taints
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value
- ))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict") else item,
- value.items()
- ))
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3BasicDevice):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3BasicDevice):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_cel_device_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_cel_device_selector.py
index 5705a78d4dc..d8892724e84 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_cel_device_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_cel_device_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_request.py
deleted file mode 100644
index 1702a840d43..00000000000
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_request.py
+++ /dev/null
@@ -1,319 +0,0 @@
-# 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.33
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from kubernetes.client.configuration import Configuration
-
-
-class V1alpha3DeviceRequest(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'admin_access': 'bool',
- 'allocation_mode': 'str',
- 'count': 'int',
- 'device_class_name': 'str',
- 'first_available': 'list[V1alpha3DeviceSubRequest]',
- 'name': 'str',
- 'selectors': 'list[V1alpha3DeviceSelector]',
- 'tolerations': 'list[V1alpha3DeviceToleration]'
- }
-
- attribute_map = {
- 'admin_access': 'adminAccess',
- 'allocation_mode': 'allocationMode',
- 'count': 'count',
- 'device_class_name': 'deviceClassName',
- 'first_available': 'firstAvailable',
- 'name': 'name',
- 'selectors': 'selectors',
- 'tolerations': 'tolerations'
- }
-
- def __init__(self, admin_access=None, allocation_mode=None, count=None, device_class_name=None, first_available=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
- """V1alpha3DeviceRequest - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._admin_access = None
- self._allocation_mode = None
- self._count = None
- self._device_class_name = None
- self._first_available = None
- self._name = None
- self._selectors = None
- self._tolerations = None
- self.discriminator = None
-
- if admin_access is not None:
- self.admin_access = admin_access
- if allocation_mode is not None:
- self.allocation_mode = allocation_mode
- if count is not None:
- self.count = count
- if device_class_name is not None:
- self.device_class_name = device_class_name
- if first_available is not None:
- self.first_available = first_available
- self.name = name
- if selectors is not None:
- self.selectors = selectors
- if tolerations is not None:
- self.tolerations = tolerations
-
- @property
- def admin_access(self):
- """Gets the admin_access of this V1alpha3DeviceRequest. # noqa: E501
-
- AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. # noqa: E501
-
- :return: The admin_access of this V1alpha3DeviceRequest. # noqa: E501
- :rtype: bool
- """
- return self._admin_access
-
- @admin_access.setter
- def admin_access(self, admin_access):
- """Sets the admin_access of this V1alpha3DeviceRequest.
-
- AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. # noqa: E501
-
- :param admin_access: The admin_access of this V1alpha3DeviceRequest. # noqa: E501
- :type: bool
- """
-
- self._admin_access = admin_access
-
- @property
- def allocation_mode(self):
- """Gets the allocation_mode of this V1alpha3DeviceRequest. # noqa: E501
-
- AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This request is for all of the matching devices in a pool. At least one device must exist on the node for the allocation to succeed. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501
-
- :return: The allocation_mode of this V1alpha3DeviceRequest. # noqa: E501
- :rtype: str
- """
- return self._allocation_mode
-
- @allocation_mode.setter
- def allocation_mode(self, allocation_mode):
- """Sets the allocation_mode of this V1alpha3DeviceRequest.
-
- AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This request is for all of the matching devices in a pool. At least one device must exist on the node for the allocation to succeed. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501
-
- :param allocation_mode: The allocation_mode of this V1alpha3DeviceRequest. # noqa: E501
- :type: str
- """
-
- self._allocation_mode = allocation_mode
-
- @property
- def count(self):
- """Gets the count of this V1alpha3DeviceRequest. # noqa: E501
-
- Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. # noqa: E501
-
- :return: The count of this V1alpha3DeviceRequest. # noqa: E501
- :rtype: int
- """
- return self._count
-
- @count.setter
- def count(self, count):
- """Sets the count of this V1alpha3DeviceRequest.
-
- Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. # noqa: E501
-
- :param count: The count of this V1alpha3DeviceRequest. # noqa: E501
- :type: int
- """
-
- self._count = count
-
- @property
- def device_class_name(self):
- """Gets the device_class_name of this V1alpha3DeviceRequest. # noqa: E501
-
- DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request. A class is required if no subrequests are specified in the firstAvailable list and no class can be set if subrequests are specified in the firstAvailable list. Which classes are available depends on the cluster. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. # noqa: E501
-
- :return: The device_class_name of this V1alpha3DeviceRequest. # noqa: E501
- :rtype: str
- """
- return self._device_class_name
-
- @device_class_name.setter
- def device_class_name(self, device_class_name):
- """Sets the device_class_name of this V1alpha3DeviceRequest.
-
- DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request. A class is required if no subrequests are specified in the firstAvailable list and no class can be set if subrequests are specified in the firstAvailable list. Which classes are available depends on the cluster. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. # noqa: E501
-
- :param device_class_name: The device_class_name of this V1alpha3DeviceRequest. # noqa: E501
- :type: str
- """
-
- self._device_class_name = device_class_name
-
- @property
- def first_available(self):
- """Gets the first_available of this V1alpha3DeviceRequest. # noqa: E501
-
- FirstAvailable contains subrequests, of which exactly one will be satisfied by the scheduler to satisfy this request. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one cannot be used. This field may only be set in the entries of DeviceClaim.Requests. DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later. # noqa: E501
-
- :return: The first_available of this V1alpha3DeviceRequest. # noqa: E501
- :rtype: list[V1alpha3DeviceSubRequest]
- """
- return self._first_available
-
- @first_available.setter
- def first_available(self, first_available):
- """Sets the first_available of this V1alpha3DeviceRequest.
-
- FirstAvailable contains subrequests, of which exactly one will be satisfied by the scheduler to satisfy this request. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one cannot be used. This field may only be set in the entries of DeviceClaim.Requests. DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later. # noqa: E501
-
- :param first_available: The first_available of this V1alpha3DeviceRequest. # noqa: E501
- :type: list[V1alpha3DeviceSubRequest]
- """
-
- self._first_available = first_available
-
- @property
- def name(self):
- """Gets the name of this V1alpha3DeviceRequest. # noqa: E501
-
- Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. Must be a DNS label. # noqa: E501
-
- :return: The name of this V1alpha3DeviceRequest. # noqa: E501
- :rtype: str
- """
- return self._name
-
- @name.setter
- def name(self, name):
- """Sets the name of this V1alpha3DeviceRequest.
-
- Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. Must be a DNS label. # noqa: E501
-
- :param name: The name of this V1alpha3DeviceRequest. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
- raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
-
- self._name = name
-
- @property
- def selectors(self):
- """Gets the selectors of this V1alpha3DeviceRequest. # noqa: E501
-
- Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. # noqa: E501
-
- :return: The selectors of this V1alpha3DeviceRequest. # noqa: E501
- :rtype: list[V1alpha3DeviceSelector]
- """
- return self._selectors
-
- @selectors.setter
- def selectors(self, selectors):
- """Sets the selectors of this V1alpha3DeviceRequest.
-
- Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. # noqa: E501
-
- :param selectors: The selectors of this V1alpha3DeviceRequest. # noqa: E501
- :type: list[V1alpha3DeviceSelector]
- """
-
- self._selectors = selectors
-
- @property
- def tolerations(self):
- """Gets the tolerations of this V1alpha3DeviceRequest. # noqa: E501
-
- If specified, the request's tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
-
- :return: The tolerations of this V1alpha3DeviceRequest. # noqa: E501
- :rtype: list[V1alpha3DeviceToleration]
- """
- return self._tolerations
-
- @tolerations.setter
- def tolerations(self, tolerations):
- """Sets the tolerations of this V1alpha3DeviceRequest.
-
- If specified, the request's tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501
-
- :param tolerations: The tolerations of this V1alpha3DeviceRequest. # noqa: E501
- :type: list[V1alpha3DeviceToleration]
- """
-
- self._tolerations = tolerations
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value
- ))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict") else item,
- value.items()
- ))
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, V1alpha3DeviceRequest):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, V1alpha3DeviceRequest):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_selector.py
index 03db1285a5e..d8c43c0860d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint.py
index 89ebd4dc4a5..e6ec0e5c325 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule.py
index 343e44b28d8..bcc39dace9b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_list.py
index e015a27ec71..9289bed9ed3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_spec.py
index 20c573c7863..59785931f48 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_rule_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_selector.py
index e5b30a4fd4d..07bdb4a88b5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha3_device_taint_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocated_device_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocated_device_status.py
index ce6738c3a4b..b6b41255f57 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocated_device_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocated_device_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -38,7 +38,8 @@ class V1beta1AllocatedDeviceStatus(object):
'device': 'str',
'driver': 'str',
'network_data': 'V1beta1NetworkDeviceData',
- 'pool': 'str'
+ 'pool': 'str',
+ 'share_id': 'str'
}
attribute_map = {
@@ -47,10 +48,11 @@ class V1beta1AllocatedDeviceStatus(object):
'device': 'device',
'driver': 'driver',
'network_data': 'networkData',
- 'pool': 'pool'
+ 'pool': 'pool',
+ 'share_id': 'shareID'
}
- def __init__(self, conditions=None, data=None, device=None, driver=None, network_data=None, pool=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, conditions=None, data=None, device=None, driver=None, network_data=None, pool=None, share_id=None, local_vars_configuration=None): # noqa: E501
"""V1beta1AllocatedDeviceStatus - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -62,6 +64,7 @@ class V1beta1AllocatedDeviceStatus(object):
self._driver = None
self._network_data = None
self._pool = None
+ self._share_id = None
self.discriminator = None
if conditions is not None:
@@ -73,6 +76,8 @@ class V1beta1AllocatedDeviceStatus(object):
if network_data is not None:
self.network_data = network_data
self.pool = pool
+ if share_id is not None:
+ self.share_id = share_id
@property
def conditions(self):
@@ -216,6 +221,29 @@ class V1beta1AllocatedDeviceStatus(object):
self._pool = pool
+ @property
+ def share_id(self):
+ """Gets the share_id of this V1beta1AllocatedDeviceStatus. # noqa: E501
+
+ ShareID uniquely identifies an individual allocation share of the device. # noqa: E501
+
+ :return: The share_id of this V1beta1AllocatedDeviceStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._share_id
+
+ @share_id.setter
+ def share_id(self, share_id):
+ """Sets the share_id of this V1beta1AllocatedDeviceStatus.
+
+ ShareID uniquely identifies an individual allocation share of the device. # noqa: E501
+
+ :param share_id: The share_id of this V1beta1AllocatedDeviceStatus. # noqa: E501
+ :type: str
+ """
+
+ self._share_id = share_id
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocation_result.py
index 6c0c4bc872f..a726798897b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_allocation_result.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -33,31 +33,59 @@ class V1beta1AllocationResult(object):
and the value is json key in definition.
"""
openapi_types = {
+ 'allocation_timestamp': 'datetime',
'devices': 'V1beta1DeviceAllocationResult',
'node_selector': 'V1NodeSelector'
}
attribute_map = {
+ 'allocation_timestamp': 'allocationTimestamp',
'devices': 'devices',
'node_selector': 'nodeSelector'
}
- def __init__(self, devices=None, node_selector=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, allocation_timestamp=None, devices=None, node_selector=None, local_vars_configuration=None): # noqa: E501
"""V1beta1AllocationResult - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._allocation_timestamp = None
self._devices = None
self._node_selector = None
self.discriminator = None
+ if allocation_timestamp is not None:
+ self.allocation_timestamp = allocation_timestamp
if devices is not None:
self.devices = devices
if node_selector is not None:
self.node_selector = node_selector
@property
+ def allocation_timestamp(self):
+ """Gets the allocation_timestamp of this V1beta1AllocationResult. # noqa: E501
+
+ AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E501
+
+ :return: The allocation_timestamp of this V1beta1AllocationResult. # noqa: E501
+ :rtype: datetime
+ """
+ return self._allocation_timestamp
+
+ @allocation_timestamp.setter
+ def allocation_timestamp(self, allocation_timestamp):
+ """Sets the allocation_timestamp of this V1beta1AllocationResult.
+
+ AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E501
+
+ :param allocation_timestamp: The allocation_timestamp of this V1beta1AllocationResult. # noqa: E501
+ :type: datetime
+ """
+
+ self._allocation_timestamp = allocation_timestamp
+
+ @property
def devices(self):
"""Gets the devices of this V1beta1AllocationResult. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_apply_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_apply_configuration.py
new file mode 100644
index 00000000000..f22eba737e3
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_apply_configuration.py
@@ -0,0 +1,122 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta1ApplyConfiguration(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'expression': 'str'
+ }
+
+ attribute_map = {
+ 'expression': 'expression'
+ }
+
+ def __init__(self, expression=None, local_vars_configuration=None): # noqa: E501
+ """V1beta1ApplyConfiguration - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._expression = None
+ self.discriminator = None
+
+ if expression is not None:
+ self.expression = expression
+
+ @property
+ def expression(self):
+ """Gets the expression of this V1beta1ApplyConfiguration. # noqa: E501
+
+ expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec Apply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field: Object{ spec: Object.spec{ serviceAccountName: \"example\" } } Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration. CEL expressions have access to the object types needed to create apply configurations: - 'Object' - CEL type of the resource object. - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec') - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers') CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required. # noqa: E501
+
+ :return: The expression of this V1beta1ApplyConfiguration. # noqa: E501
+ :rtype: str
+ """
+ return self._expression
+
+ @expression.setter
+ def expression(self, expression):
+ """Sets the expression of this V1beta1ApplyConfiguration.
+
+ expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec Apply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field: Object{ spec: Object.spec{ serviceAccountName: \"example\" } } Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration. CEL expressions have access to the object types needed to create apply configurations: - 'Object' - CEL type of the resource object. - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec') - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers') CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required. # noqa: E501
+
+ :param expression: The expression of this V1beta1ApplyConfiguration. # noqa: E501
+ :type: str
+ """
+
+ self._expression = expression
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta1ApplyConfiguration):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta1ApplyConfiguration):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_audit_annotation.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_audit_annotation.py
deleted file mode 100644
index fb18874fd4d..00000000000
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_audit_annotation.py
+++ /dev/null
@@ -1,152 +0,0 @@
-# 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.33
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from kubernetes.client.configuration import Configuration
-
-
-class V1beta1AuditAnnotation(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'key': 'str',
- 'value_expression': 'str'
- }
-
- attribute_map = {
- 'key': 'key',
- 'value_expression': 'valueExpression'
- }
-
- def __init__(self, key=None, value_expression=None, local_vars_configuration=None): # noqa: E501
- """V1beta1AuditAnnotation - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._key = None
- self._value_expression = None
- self.discriminator = None
-
- self.key = key
- self.value_expression = value_expression
-
- @property
- def key(self):
- """Gets the key of this V1beta1AuditAnnotation. # noqa: E501
-
- key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\". If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded. Required. # noqa: E501
-
- :return: The key of this V1beta1AuditAnnotation. # noqa: E501
- :rtype: str
- """
- return self._key
-
- @key.setter
- def key(self, key):
- """Sets the key of this V1beta1AuditAnnotation.
-
- key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\". If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded. Required. # noqa: E501
-
- :param key: The key of this V1beta1AuditAnnotation. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501
- raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501
-
- self._key = key
-
- @property
- def value_expression(self):
- """Gets the value_expression of this V1beta1AuditAnnotation. # noqa: E501
-
- valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb. If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list. Required. # noqa: E501
-
- :return: The value_expression of this V1beta1AuditAnnotation. # noqa: E501
- :rtype: str
- """
- return self._value_expression
-
- @value_expression.setter
- def value_expression(self, value_expression):
- """Sets the value_expression of this V1beta1AuditAnnotation.
-
- valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb. If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list. Required. # noqa: E501
-
- :param value_expression: The value_expression of this V1beta1AuditAnnotation. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and value_expression is None: # noqa: E501
- raise ValueError("Invalid value for `value_expression`, must not be `None`") # noqa: E501
-
- self._value_expression = value_expression
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value
- ))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict") else item,
- value.items()
- ))
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, V1beta1AuditAnnotation):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1AuditAnnotation):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_basic_device.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_basic_device.py
index b3507513b59..6d35d1e030b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_basic_device.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_basic_device.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -34,7 +34,11 @@ class V1beta1BasicDevice(object):
"""
openapi_types = {
'all_nodes': 'bool',
+ 'allow_multiple_allocations': 'bool',
'attributes': 'dict(str, V1beta1DeviceAttribute)',
+ 'binding_conditions': 'list[str]',
+ 'binding_failure_conditions': 'list[str]',
+ 'binds_to_node': 'bool',
'capacity': 'dict(str, V1beta1DeviceCapacity)',
'consumes_counters': 'list[V1beta1DeviceCounterConsumption]',
'node_name': 'str',
@@ -44,7 +48,11 @@ class V1beta1BasicDevice(object):
attribute_map = {
'all_nodes': 'allNodes',
+ 'allow_multiple_allocations': 'allowMultipleAllocations',
'attributes': 'attributes',
+ 'binding_conditions': 'bindingConditions',
+ 'binding_failure_conditions': 'bindingFailureConditions',
+ 'binds_to_node': 'bindsToNode',
'capacity': 'capacity',
'consumes_counters': 'consumesCounters',
'node_name': 'nodeName',
@@ -52,14 +60,18 @@ class V1beta1BasicDevice(object):
'taints': 'taints'
}
- def __init__(self, all_nodes=None, attributes=None, capacity=None, consumes_counters=None, node_name=None, node_selector=None, taints=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, all_nodes=None, allow_multiple_allocations=None, attributes=None, binding_conditions=None, binding_failure_conditions=None, binds_to_node=None, capacity=None, consumes_counters=None, node_name=None, node_selector=None, taints=None, local_vars_configuration=None): # noqa: E501
"""V1beta1BasicDevice - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._all_nodes = None
+ self._allow_multiple_allocations = None
self._attributes = None
+ self._binding_conditions = None
+ self._binding_failure_conditions = None
+ self._binds_to_node = None
self._capacity = None
self._consumes_counters = None
self._node_name = None
@@ -69,8 +81,16 @@ class V1beta1BasicDevice(object):
if all_nodes is not None:
self.all_nodes = all_nodes
+ if allow_multiple_allocations is not None:
+ self.allow_multiple_allocations = allow_multiple_allocations
if attributes is not None:
self.attributes = attributes
+ if binding_conditions is not None:
+ self.binding_conditions = binding_conditions
+ if binding_failure_conditions is not None:
+ self.binding_failure_conditions = binding_failure_conditions
+ if binds_to_node is not None:
+ self.binds_to_node = binds_to_node
if capacity is not None:
self.capacity = capacity
if consumes_counters is not None:
@@ -106,6 +126,29 @@ class V1beta1BasicDevice(object):
self._all_nodes = all_nodes
@property
+ def allow_multiple_allocations(self):
+ """Gets the allow_multiple_allocations of this V1beta1BasicDevice. # noqa: E501
+
+ AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. # noqa: E501
+
+ :return: The allow_multiple_allocations of this V1beta1BasicDevice. # noqa: E501
+ :rtype: bool
+ """
+ return self._allow_multiple_allocations
+
+ @allow_multiple_allocations.setter
+ def allow_multiple_allocations(self, allow_multiple_allocations):
+ """Sets the allow_multiple_allocations of this V1beta1BasicDevice.
+
+ AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. # noqa: E501
+
+ :param allow_multiple_allocations: The allow_multiple_allocations of this V1beta1BasicDevice. # noqa: E501
+ :type: bool
+ """
+
+ self._allow_multiple_allocations = allow_multiple_allocations
+
+ @property
def attributes(self):
"""Gets the attributes of this V1beta1BasicDevice. # noqa: E501
@@ -129,6 +172,75 @@ class V1beta1BasicDevice(object):
self._attributes = attributes
@property
+ def binding_conditions(self):
+ """Gets the binding_conditions of this V1beta1BasicDevice. # noqa: E501
+
+ BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_conditions of this V1beta1BasicDevice. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_conditions
+
+ @binding_conditions.setter
+ def binding_conditions(self, binding_conditions):
+ """Sets the binding_conditions of this V1beta1BasicDevice.
+
+ BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_conditions: The binding_conditions of this V1beta1BasicDevice. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_conditions = binding_conditions
+
+ @property
+ def binding_failure_conditions(self):
+ """Gets the binding_failure_conditions of this V1beta1BasicDevice. # noqa: E501
+
+ BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is true, a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_failure_conditions of this V1beta1BasicDevice. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_failure_conditions
+
+ @binding_failure_conditions.setter
+ def binding_failure_conditions(self, binding_failure_conditions):
+ """Sets the binding_failure_conditions of this V1beta1BasicDevice.
+
+ BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is true, a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_failure_conditions: The binding_failure_conditions of this V1beta1BasicDevice. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_failure_conditions = binding_failure_conditions
+
+ @property
+ def binds_to_node(self):
+ """Gets the binds_to_node of this V1beta1BasicDevice. # noqa: E501
+
+ BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binds_to_node of this V1beta1BasicDevice. # noqa: E501
+ :rtype: bool
+ """
+ return self._binds_to_node
+
+ @binds_to_node.setter
+ def binds_to_node(self, binds_to_node):
+ """Sets the binds_to_node of this V1beta1BasicDevice.
+
+ BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binds_to_node: The binds_to_node of this V1beta1BasicDevice. # noqa: E501
+ :type: bool
+ """
+
+ self._binds_to_node = binds_to_node
+
+ @property
def capacity(self):
"""Gets the capacity of this V1beta1BasicDevice. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_request_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_request_policy.py
new file mode 100644
index 00000000000..74c759d3970
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_request_policy.py
@@ -0,0 +1,176 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta1CapacityRequestPolicy(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'default': 'str',
+ 'valid_range': 'V1beta1CapacityRequestPolicyRange',
+ 'valid_values': 'list[str]'
+ }
+
+ attribute_map = {
+ 'default': 'default',
+ 'valid_range': 'validRange',
+ 'valid_values': 'validValues'
+ }
+
+ def __init__(self, default=None, valid_range=None, valid_values=None, local_vars_configuration=None): # noqa: E501
+ """V1beta1CapacityRequestPolicy - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._default = None
+ self._valid_range = None
+ self._valid_values = None
+ self.discriminator = None
+
+ if default is not None:
+ self.default = default
+ if valid_range is not None:
+ self.valid_range = valid_range
+ if valid_values is not None:
+ self.valid_values = valid_values
+
+ @property
+ def default(self):
+ """Gets the default of this V1beta1CapacityRequestPolicy. # noqa: E501
+
+ Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity. # noqa: E501
+
+ :return: The default of this V1beta1CapacityRequestPolicy. # noqa: E501
+ :rtype: str
+ """
+ return self._default
+
+ @default.setter
+ def default(self, default):
+ """Sets the default of this V1beta1CapacityRequestPolicy.
+
+ Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity. # noqa: E501
+
+ :param default: The default of this V1beta1CapacityRequestPolicy. # noqa: E501
+ :type: str
+ """
+
+ self._default = default
+
+ @property
+ def valid_range(self):
+ """Gets the valid_range of this V1beta1CapacityRequestPolicy. # noqa: E501
+
+
+ :return: The valid_range of this V1beta1CapacityRequestPolicy. # noqa: E501
+ :rtype: V1beta1CapacityRequestPolicyRange
+ """
+ return self._valid_range
+
+ @valid_range.setter
+ def valid_range(self, valid_range):
+ """Sets the valid_range of this V1beta1CapacityRequestPolicy.
+
+
+ :param valid_range: The valid_range of this V1beta1CapacityRequestPolicy. # noqa: E501
+ :type: V1beta1CapacityRequestPolicyRange
+ """
+
+ self._valid_range = valid_range
+
+ @property
+ def valid_values(self):
+ """Gets the valid_values of this V1beta1CapacityRequestPolicy. # noqa: E501
+
+ ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. # noqa: E501
+
+ :return: The valid_values of this V1beta1CapacityRequestPolicy. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._valid_values
+
+ @valid_values.setter
+ def valid_values(self, valid_values):
+ """Sets the valid_values of this V1beta1CapacityRequestPolicy.
+
+ ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. # noqa: E501
+
+ :param valid_values: The valid_values of this V1beta1CapacityRequestPolicy. # noqa: E501
+ :type: list[str]
+ """
+
+ self._valid_values = valid_values
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta1CapacityRequestPolicy):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta1CapacityRequestPolicy):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_request_policy_range.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_request_policy_range.py
new file mode 100644
index 00000000000..13b4cb30a85
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_request_policy_range.py
@@ -0,0 +1,179 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta1CapacityRequestPolicyRange(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'max': 'str',
+ 'min': 'str',
+ 'step': 'str'
+ }
+
+ attribute_map = {
+ 'max': 'max',
+ 'min': 'min',
+ 'step': 'step'
+ }
+
+ def __init__(self, max=None, min=None, step=None, local_vars_configuration=None): # noqa: E501
+ """V1beta1CapacityRequestPolicyRange - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._max = None
+ self._min = None
+ self._step = None
+ self.discriminator = None
+
+ if max is not None:
+ self.max = max
+ self.min = min
+ if step is not None:
+ self.step = step
+
+ @property
+ def max(self):
+ """Gets the max of this V1beta1CapacityRequestPolicyRange. # noqa: E501
+
+ Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. # noqa: E501
+
+ :return: The max of this V1beta1CapacityRequestPolicyRange. # noqa: E501
+ :rtype: str
+ """
+ return self._max
+
+ @max.setter
+ def max(self, max):
+ """Sets the max of this V1beta1CapacityRequestPolicyRange.
+
+ Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. # noqa: E501
+
+ :param max: The max of this V1beta1CapacityRequestPolicyRange. # noqa: E501
+ :type: str
+ """
+
+ self._max = max
+
+ @property
+ def min(self):
+ """Gets the min of this V1beta1CapacityRequestPolicyRange. # noqa: E501
+
+ Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. # noqa: E501
+
+ :return: The min of this V1beta1CapacityRequestPolicyRange. # noqa: E501
+ :rtype: str
+ """
+ return self._min
+
+ @min.setter
+ def min(self, min):
+ """Sets the min of this V1beta1CapacityRequestPolicyRange.
+
+ Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. # noqa: E501
+
+ :param min: The min of this V1beta1CapacityRequestPolicyRange. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and min is None: # noqa: E501
+ raise ValueError("Invalid value for `min`, must not be `None`") # noqa: E501
+
+ self._min = min
+
+ @property
+ def step(self):
+ """Gets the step of this V1beta1CapacityRequestPolicyRange. # noqa: E501
+
+ Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value. # noqa: E501
+
+ :return: The step of this V1beta1CapacityRequestPolicyRange. # noqa: E501
+ :rtype: str
+ """
+ return self._step
+
+ @step.setter
+ def step(self, step):
+ """Sets the step of this V1beta1CapacityRequestPolicyRange.
+
+ Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value. # noqa: E501
+
+ :param step: The step of this V1beta1CapacityRequestPolicyRange. # noqa: E501
+ :type: str
+ """
+
+ self._step = step
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta1CapacityRequestPolicyRange):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta1CapacityRequestPolicyRange):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_requirements.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_requirements.py
new file mode 100644
index 00000000000..bc1d3f3c54f
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_capacity_requirements.py
@@ -0,0 +1,122 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta1CapacityRequirements(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'requests': 'dict(str, str)'
+ }
+
+ attribute_map = {
+ 'requests': 'requests'
+ }
+
+ def __init__(self, requests=None, local_vars_configuration=None): # noqa: E501
+ """V1beta1CapacityRequirements - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._requests = None
+ self.discriminator = None
+
+ if requests is not None:
+ self.requests = requests
+
+ @property
+ def requests(self):
+ """Gets the requests of this V1beta1CapacityRequirements. # noqa: E501
+
+ Requests represent individual device resource requests for distinct resources, all of which must be provided by the device. This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[<domain>].<name>.compareTo(quantity(<request quantity>)) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. # noqa: E501
+
+ :return: The requests of this V1beta1CapacityRequirements. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._requests
+
+ @requests.setter
+ def requests(self, requests):
+ """Sets the requests of this V1beta1CapacityRequirements.
+
+ Requests represent individual device resource requests for distinct resources, all of which must be provided by the device. This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[<domain>].<name>.compareTo(quantity(<request quantity>)) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. # noqa: E501
+
+ :param requests: The requests of this V1beta1CapacityRequirements. # noqa: E501
+ :type: dict(str, str)
+ """
+
+ self._requests = requests
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta1CapacityRequirements):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta1CapacityRequirements):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cel_device_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cel_device_selector.py
index 06b7d0d968b..901885cbbd2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cel_device_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cel_device_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -55,7 +55,7 @@ class V1beta1CELDeviceSelector(object):
def expression(self):
"""Gets the expression of this V1beta1CELDeviceSelector. # noqa: E501
- Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
+ Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
:return: The expression of this V1beta1CELDeviceSelector. # noqa: E501
:rtype: str
@@ -66,7 +66,7 @@ class V1beta1CELDeviceSelector(object):
def expression(self, expression):
"""Sets the expression of this V1beta1CELDeviceSelector.
- Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
+ Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
:param expression: The expression of this V1beta1CELDeviceSelector. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle.py
index 323e19ae3df..adb02622388 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_list.py
index 728f47c234a..a3c6f0e8ef1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_spec.py
index 5751af14522..e9045348270 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_cluster_trust_bundle_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter.py
index 1026d14a6c7..b2ba05c50fd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter_set.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter_set.py
index 4a31de8f59f..22a96070cfa 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter_set.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_counter_set.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device.py
index 05622bd0728..2d9e49f56ad 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_configuration.py
index 885f5b50502..f9d2845daff 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_result.py
index fe1fef81edc..9ca0e8b34bd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_allocation_result.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_attribute.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_attribute.py
index cbea47fcca4..a9a5691d0a1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_attribute.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_attribute.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_capacity.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_capacity.py
index a1fe5e04aab..150003376ee 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_capacity.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_capacity.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -33,29 +33,55 @@ class V1beta1DeviceCapacity(object):
and the value is json key in definition.
"""
openapi_types = {
+ 'request_policy': 'V1beta1CapacityRequestPolicy',
'value': 'str'
}
attribute_map = {
+ 'request_policy': 'requestPolicy',
'value': 'value'
}
- def __init__(self, value=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, request_policy=None, value=None, local_vars_configuration=None): # noqa: E501
"""V1beta1DeviceCapacity - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._request_policy = None
self._value = None
self.discriminator = None
+ if request_policy is not None:
+ self.request_policy = request_policy
self.value = value
@property
+ def request_policy(self):
+ """Gets the request_policy of this V1beta1DeviceCapacity. # noqa: E501
+
+
+ :return: The request_policy of this V1beta1DeviceCapacity. # noqa: E501
+ :rtype: V1beta1CapacityRequestPolicy
+ """
+ return self._request_policy
+
+ @request_policy.setter
+ def request_policy(self, request_policy):
+ """Sets the request_policy of this V1beta1DeviceCapacity.
+
+
+ :param request_policy: The request_policy of this V1beta1DeviceCapacity. # noqa: E501
+ :type: V1beta1CapacityRequestPolicy
+ """
+
+ self._request_policy = request_policy
+
+ @property
def value(self):
"""Gets the value of this V1beta1DeviceCapacity. # noqa: E501
- Value defines how much of a certain device capacity is available. # noqa: E501
+ Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value. # noqa: E501
:return: The value of this V1beta1DeviceCapacity. # noqa: E501
:rtype: str
@@ -66,7 +92,7 @@ class V1beta1DeviceCapacity(object):
def value(self, value):
"""Sets the value of this V1beta1DeviceCapacity.
- Value defines how much of a certain device capacity is available. # noqa: E501
+ Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value. # noqa: E501
:param value: The value of this V1beta1DeviceCapacity. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim.py
index 0b1e9470b91..f366d572a43 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim_configuration.py
index 33d5d3ccd49..35af6a11a0f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_claim_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class.py
index 6091093021f..fa99ce7fb37 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_configuration.py
index 700507e6975..a0818e3edd0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_list.py
index 1d04dfe5335..61b462a3272 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_spec.py
index fadba48f2c7..c8c43b8be8b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_class_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -34,26 +34,31 @@ class V1beta1DeviceClassSpec(object):
"""
openapi_types = {
'config': 'list[V1beta1DeviceClassConfiguration]',
+ 'extended_resource_name': 'str',
'selectors': 'list[V1beta1DeviceSelector]'
}
attribute_map = {
'config': 'config',
+ 'extended_resource_name': 'extendedResourceName',
'selectors': 'selectors'
}
- def __init__(self, config=None, selectors=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, config=None, extended_resource_name=None, selectors=None, local_vars_configuration=None): # noqa: E501
"""V1beta1DeviceClassSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._config = None
+ self._extended_resource_name = None
self._selectors = None
self.discriminator = None
if config is not None:
self.config = config
+ if extended_resource_name is not None:
+ self.extended_resource_name = extended_resource_name
if selectors is not None:
self.selectors = selectors
@@ -81,6 +86,29 @@ class V1beta1DeviceClassSpec(object):
self._config = config
@property
+ def extended_resource_name(self):
+ """Gets the extended_resource_name of this V1beta1DeviceClassSpec. # noqa: E501
+
+ ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E501
+
+ :return: The extended_resource_name of this V1beta1DeviceClassSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._extended_resource_name
+
+ @extended_resource_name.setter
+ def extended_resource_name(self, extended_resource_name):
+ """Sets the extended_resource_name of this V1beta1DeviceClassSpec.
+
+ ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E501
+
+ :param extended_resource_name: The extended_resource_name of this V1beta1DeviceClassSpec. # noqa: E501
+ :type: str
+ """
+
+ self._extended_resource_name = extended_resource_name
+
+ @property
def selectors(self):
"""Gets the selectors of this V1beta1DeviceClassSpec. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_constraint.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_constraint.py
index 616f8ab9571..f89dab4ea1f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_constraint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_constraint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -33,31 +33,59 @@ class V1beta1DeviceConstraint(object):
and the value is json key in definition.
"""
openapi_types = {
+ 'distinct_attribute': 'str',
'match_attribute': 'str',
'requests': 'list[str]'
}
attribute_map = {
+ 'distinct_attribute': 'distinctAttribute',
'match_attribute': 'matchAttribute',
'requests': 'requests'
}
- def __init__(self, match_attribute=None, requests=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, distinct_attribute=None, match_attribute=None, requests=None, local_vars_configuration=None): # noqa: E501
"""V1beta1DeviceConstraint - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._distinct_attribute = None
self._match_attribute = None
self._requests = None
self.discriminator = None
+ if distinct_attribute is not None:
+ self.distinct_attribute = distinct_attribute
if match_attribute is not None:
self.match_attribute = match_attribute
if requests is not None:
self.requests = requests
@property
+ def distinct_attribute(self):
+ """Gets the distinct_attribute of this V1beta1DeviceConstraint. # noqa: E501
+
+ DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices. This acts as the inverse of MatchAttribute. This constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation. This is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs. # noqa: E501
+
+ :return: The distinct_attribute of this V1beta1DeviceConstraint. # noqa: E501
+ :rtype: str
+ """
+ return self._distinct_attribute
+
+ @distinct_attribute.setter
+ def distinct_attribute(self, distinct_attribute):
+ """Sets the distinct_attribute of this V1beta1DeviceConstraint.
+
+ DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices. This acts as the inverse of MatchAttribute. This constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation. This is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs. # noqa: E501
+
+ :param distinct_attribute: The distinct_attribute of this V1beta1DeviceConstraint. # noqa: E501
+ :type: str
+ """
+
+ self._distinct_attribute = distinct_attribute
+
+ @property
def match_attribute(self):
"""Gets the match_attribute of this V1beta1DeviceConstraint. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_counter_consumption.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_counter_consumption.py
index ee27f1d27d6..caa4fe18951 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_counter_consumption.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_counter_consumption.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request.py
index 842df311a8f..60307edc50d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -35,6 +35,7 @@ class V1beta1DeviceRequest(object):
openapi_types = {
'admin_access': 'bool',
'allocation_mode': 'str',
+ 'capacity': 'V1beta1CapacityRequirements',
'count': 'int',
'device_class_name': 'str',
'first_available': 'list[V1beta1DeviceSubRequest]',
@@ -46,6 +47,7 @@ class V1beta1DeviceRequest(object):
attribute_map = {
'admin_access': 'adminAccess',
'allocation_mode': 'allocationMode',
+ 'capacity': 'capacity',
'count': 'count',
'device_class_name': 'deviceClassName',
'first_available': 'firstAvailable',
@@ -54,7 +56,7 @@ class V1beta1DeviceRequest(object):
'tolerations': 'tolerations'
}
- def __init__(self, admin_access=None, allocation_mode=None, count=None, device_class_name=None, first_available=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, admin_access=None, allocation_mode=None, capacity=None, count=None, device_class_name=None, first_available=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
"""V1beta1DeviceRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -62,6 +64,7 @@ class V1beta1DeviceRequest(object):
self._admin_access = None
self._allocation_mode = None
+ self._capacity = None
self._count = None
self._device_class_name = None
self._first_available = None
@@ -74,6 +77,8 @@ class V1beta1DeviceRequest(object):
self.admin_access = admin_access
if allocation_mode is not None:
self.allocation_mode = allocation_mode
+ if capacity is not None:
+ self.capacity = capacity
if count is not None:
self.count = count
if device_class_name is not None:
@@ -133,6 +138,27 @@ class V1beta1DeviceRequest(object):
self._allocation_mode = allocation_mode
@property
+ def capacity(self):
+ """Gets the capacity of this V1beta1DeviceRequest. # noqa: E501
+
+
+ :return: The capacity of this V1beta1DeviceRequest. # noqa: E501
+ :rtype: V1beta1CapacityRequirements
+ """
+ return self._capacity
+
+ @capacity.setter
+ def capacity(self, capacity):
+ """Sets the capacity of this V1beta1DeviceRequest.
+
+
+ :param capacity: The capacity of this V1beta1DeviceRequest. # noqa: E501
+ :type: V1beta1CapacityRequirements
+ """
+
+ self._capacity = capacity
+
+ @property
def count(self):
"""Gets the count of this V1beta1DeviceRequest. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request_allocation_result.py
index 77df476828f..7a08ed6575d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_request_allocation_result.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -34,42 +34,62 @@ class V1beta1DeviceRequestAllocationResult(object):
"""
openapi_types = {
'admin_access': 'bool',
+ 'binding_conditions': 'list[str]',
+ 'binding_failure_conditions': 'list[str]',
+ 'consumed_capacity': 'dict(str, str)',
'device': 'str',
'driver': 'str',
'pool': 'str',
'request': 'str',
+ 'share_id': 'str',
'tolerations': 'list[V1beta1DeviceToleration]'
}
attribute_map = {
'admin_access': 'adminAccess',
+ 'binding_conditions': 'bindingConditions',
+ 'binding_failure_conditions': 'bindingFailureConditions',
+ 'consumed_capacity': 'consumedCapacity',
'device': 'device',
'driver': 'driver',
'pool': 'pool',
'request': 'request',
+ 'share_id': 'shareID',
'tolerations': 'tolerations'
}
- def __init__(self, admin_access=None, device=None, driver=None, pool=None, request=None, tolerations=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, admin_access=None, binding_conditions=None, binding_failure_conditions=None, consumed_capacity=None, device=None, driver=None, pool=None, request=None, share_id=None, tolerations=None, local_vars_configuration=None): # noqa: E501
"""V1beta1DeviceRequestAllocationResult - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._admin_access = None
+ self._binding_conditions = None
+ self._binding_failure_conditions = None
+ self._consumed_capacity = None
self._device = None
self._driver = None
self._pool = None
self._request = None
+ self._share_id = None
self._tolerations = None
self.discriminator = None
if admin_access is not None:
self.admin_access = admin_access
+ if binding_conditions is not None:
+ self.binding_conditions = binding_conditions
+ if binding_failure_conditions is not None:
+ self.binding_failure_conditions = binding_failure_conditions
+ if consumed_capacity is not None:
+ self.consumed_capacity = consumed_capacity
self.device = device
self.driver = driver
self.pool = pool
self.request = request
+ if share_id is not None:
+ self.share_id = share_id
if tolerations is not None:
self.tolerations = tolerations
@@ -97,6 +117,75 @@ class V1beta1DeviceRequestAllocationResult(object):
self._admin_access = admin_access
@property
+ def binding_conditions(self):
+ """Gets the binding_conditions of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+
+ BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_conditions of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_conditions
+
+ @binding_conditions.setter
+ def binding_conditions(self, binding_conditions):
+ """Sets the binding_conditions of this V1beta1DeviceRequestAllocationResult.
+
+ BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_conditions: The binding_conditions of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_conditions = binding_conditions
+
+ @property
+ def binding_failure_conditions(self):
+ """Gets the binding_failure_conditions of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+
+ BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_failure_conditions of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_failure_conditions
+
+ @binding_failure_conditions.setter
+ def binding_failure_conditions(self, binding_failure_conditions):
+ """Sets the binding_failure_conditions of this V1beta1DeviceRequestAllocationResult.
+
+ BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_failure_conditions: The binding_failure_conditions of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_failure_conditions = binding_failure_conditions
+
+ @property
+ def consumed_capacity(self):
+ """Gets the consumed_capacity of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+
+ ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). The total consumed capacity for each device must not exceed the DeviceCapacity's Value. This field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero. # noqa: E501
+
+ :return: The consumed_capacity of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._consumed_capacity
+
+ @consumed_capacity.setter
+ def consumed_capacity(self, consumed_capacity):
+ """Sets the consumed_capacity of this V1beta1DeviceRequestAllocationResult.
+
+ ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). The total consumed capacity for each device must not exceed the DeviceCapacity's Value. This field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero. # noqa: E501
+
+ :param consumed_capacity: The consumed_capacity of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+ :type: dict(str, str)
+ """
+
+ self._consumed_capacity = consumed_capacity
+
+ @property
def device(self):
"""Gets the device of this V1beta1DeviceRequestAllocationResult. # noqa: E501
@@ -197,6 +286,29 @@ class V1beta1DeviceRequestAllocationResult(object):
self._request = request
@property
+ def share_id(self):
+ """Gets the share_id of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+
+ ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device. # noqa: E501
+
+ :return: The share_id of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+ :rtype: str
+ """
+ return self._share_id
+
+ @share_id.setter
+ def share_id(self, share_id):
+ """Sets the share_id of this V1beta1DeviceRequestAllocationResult.
+
+ ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device. # noqa: E501
+
+ :param share_id: The share_id of this V1beta1DeviceRequestAllocationResult. # noqa: E501
+ :type: str
+ """
+
+ self._share_id = share_id
+
+ @property
def tolerations(self):
"""Gets the tolerations of this V1beta1DeviceRequestAllocationResult. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_selector.py
index 941645a7302..93465cae6f6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_sub_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_sub_request.py
index b538e386058..a6c5c45692a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_sub_request.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_sub_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -34,6 +34,7 @@ class V1beta1DeviceSubRequest(object):
"""
openapi_types = {
'allocation_mode': 'str',
+ 'capacity': 'V1beta1CapacityRequirements',
'count': 'int',
'device_class_name': 'str',
'name': 'str',
@@ -43,6 +44,7 @@ class V1beta1DeviceSubRequest(object):
attribute_map = {
'allocation_mode': 'allocationMode',
+ 'capacity': 'capacity',
'count': 'count',
'device_class_name': 'deviceClassName',
'name': 'name',
@@ -50,13 +52,14 @@ class V1beta1DeviceSubRequest(object):
'tolerations': 'tolerations'
}
- def __init__(self, allocation_mode=None, count=None, device_class_name=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, allocation_mode=None, capacity=None, count=None, device_class_name=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
"""V1beta1DeviceSubRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._allocation_mode = None
+ self._capacity = None
self._count = None
self._device_class_name = None
self._name = None
@@ -66,6 +69,8 @@ class V1beta1DeviceSubRequest(object):
if allocation_mode is not None:
self.allocation_mode = allocation_mode
+ if capacity is not None:
+ self.capacity = capacity
if count is not None:
self.count = count
self.device_class_name = device_class_name
@@ -99,6 +104,27 @@ class V1beta1DeviceSubRequest(object):
self._allocation_mode = allocation_mode
@property
+ def capacity(self):
+ """Gets the capacity of this V1beta1DeviceSubRequest. # noqa: E501
+
+
+ :return: The capacity of this V1beta1DeviceSubRequest. # noqa: E501
+ :rtype: V1beta1CapacityRequirements
+ """
+ return self._capacity
+
+ @capacity.setter
+ def capacity(self, capacity):
+ """Sets the capacity of this V1beta1DeviceSubRequest.
+
+
+ :param capacity: The capacity of this V1beta1DeviceSubRequest. # noqa: E501
+ :type: V1beta1CapacityRequirements
+ """
+
+ self._capacity = capacity
+
+ @property
def count(self):
"""Gets the count of this V1beta1DeviceSubRequest. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_taint.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_taint.py
index 2e73051b0d2..53c44988855 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_taint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_taint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_toleration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_toleration.py
index 3677050b09a..ab55caa9b5d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_toleration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_device_toleration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_expression_warning.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_expression_warning.py
deleted file mode 100644
index d63bac73840..00000000000
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_expression_warning.py
+++ /dev/null
@@ -1,152 +0,0 @@
-# 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.33
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from kubernetes.client.configuration import Configuration
-
-
-class V1beta1ExpressionWarning(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'field_ref': 'str',
- 'warning': 'str'
- }
-
- attribute_map = {
- 'field_ref': 'fieldRef',
- 'warning': 'warning'
- }
-
- def __init__(self, field_ref=None, warning=None, local_vars_configuration=None): # noqa: E501
- """V1beta1ExpressionWarning - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._field_ref = None
- self._warning = None
- self.discriminator = None
-
- self.field_ref = field_ref
- self.warning = warning
-
- @property
- def field_ref(self):
- """Gets the field_ref of this V1beta1ExpressionWarning. # noqa: E501
-
- The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\" # noqa: E501
-
- :return: The field_ref of this V1beta1ExpressionWarning. # noqa: E501
- :rtype: str
- """
- return self._field_ref
-
- @field_ref.setter
- def field_ref(self, field_ref):
- """Sets the field_ref of this V1beta1ExpressionWarning.
-
- The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\" # noqa: E501
-
- :param field_ref: The field_ref of this V1beta1ExpressionWarning. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and field_ref is None: # noqa: E501
- raise ValueError("Invalid value for `field_ref`, must not be `None`") # noqa: E501
-
- self._field_ref = field_ref
-
- @property
- def warning(self):
- """Gets the warning of this V1beta1ExpressionWarning. # noqa: E501
-
- The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler. # noqa: E501
-
- :return: The warning of this V1beta1ExpressionWarning. # noqa: E501
- :rtype: str
- """
- return self._warning
-
- @warning.setter
- def warning(self, warning):
- """Sets the warning of this V1beta1ExpressionWarning.
-
- The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler. # noqa: E501
-
- :param warning: The warning of this V1beta1ExpressionWarning. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and warning is None: # noqa: E501
- raise ValueError("Invalid value for `warning`, must not be `None`") # noqa: E501
-
- self._warning = warning
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value
- ))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict") else item,
- value.items()
- ))
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, V1beta1ExpressionWarning):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1ExpressionWarning):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address.py
index e3e2886a721..8a88a966760 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_list.py
index 0b5ae6a845e..8ce18f8da68 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_spec.py
index eb7037a3a87..ee7d2e3a581 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_ip_address_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_json_patch.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_json_patch.py
new file mode 100644
index 00000000000..746d4e011fd
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_json_patch.py
@@ -0,0 +1,122 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta1JSONPatch(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'expression': 'str'
+ }
+
+ attribute_map = {
+ 'expression': 'expression'
+ }
+
+ def __init__(self, expression=None, local_vars_configuration=None): # noqa: E501
+ """V1beta1JSONPatch - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._expression = None
+ self.discriminator = None
+
+ if expression is not None:
+ self.expression = expression
+
+ @property
+ def expression(self):
+ """Gets the expression of this V1beta1JSONPatch. # noqa: E501
+
+ expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). ref: https://github.com/google/cel-spec expression must return an array of JSONPatch values. For example, this CEL expression returns a JSON patch to conditionally modify a value: [ JSONPatch{op: \"test\", path: \"/spec/example\", value: \"Red\"}, JSONPatch{op: \"replace\", path: \"/spec/example\", value: \"Green\"} ] To define an object for the patch value, use Object types. For example: [ JSONPatch{ op: \"add\", path: \"/spec/selector\", value: Object.spec.selector{matchLabels: {\"environment\": \"test\"}} } ] To use strings containing '/' and '~' as JSONPatch path keys, use \"jsonpatch.escapeKey\". For example: [ JSONPatch{ op: \"add\", path: \"/metadata/labels/\" + jsonpatch.escapeKey(\"example.com/environment\"), value: \"test\" }, ] CEL expressions have access to the types needed to create JSON patches and objects: - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'. See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string, integer, array, map or object. If set, the 'path' and 'from' fields must be set to a [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL function may be used to escape path keys containing '/' and '~'. - 'Object' - CEL type of the resource object. - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec') - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers') CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) as well as: - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively). Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required. # noqa: E501
+
+ :return: The expression of this V1beta1JSONPatch. # noqa: E501
+ :rtype: str
+ """
+ return self._expression
+
+ @expression.setter
+ def expression(self, expression):
+ """Sets the expression of this V1beta1JSONPatch.
+
+ expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). ref: https://github.com/google/cel-spec expression must return an array of JSONPatch values. For example, this CEL expression returns a JSON patch to conditionally modify a value: [ JSONPatch{op: \"test\", path: \"/spec/example\", value: \"Red\"}, JSONPatch{op: \"replace\", path: \"/spec/example\", value: \"Green\"} ] To define an object for the patch value, use Object types. For example: [ JSONPatch{ op: \"add\", path: \"/spec/selector\", value: Object.spec.selector{matchLabels: {\"environment\": \"test\"}} } ] To use strings containing '/' and '~' as JSONPatch path keys, use \"jsonpatch.escapeKey\". For example: [ JSONPatch{ op: \"add\", path: \"/metadata/labels/\" + jsonpatch.escapeKey(\"example.com/environment\"), value: \"test\" }, ] CEL expressions have access to the types needed to create JSON patches and objects: - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'. See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string, integer, array, map or object. If set, the 'path' and 'from' fields must be set to a [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL function may be used to escape path keys containing '/' and '~'. - 'Object' - CEL type of the resource object. - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec') - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers') CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) as well as: - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively). Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required. # noqa: E501
+
+ :param expression: The expression of this V1beta1JSONPatch. # noqa: E501
+ :type: str
+ """
+
+ self._expression = expression
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta1JSONPatch):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta1JSONPatch):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate.py
index 0b47a9cb926..27142b0fddb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_list.py
index fc9f58e1375..a883a060543 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_spec.py
index 6438e180626..85010084ffc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_lease_candidate_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_condition.py
index a426375d825..15f156d80e1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_resources.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_resources.py
index 66cfe270f2f..514917c4634 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_resources.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_match_resources.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy.py
new file mode 100644
index 00000000000..b64474ead0c
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy.py
@@ -0,0 +1,202 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta1MutatingAdmissionPolicy(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'api_version': 'str',
+ 'kind': 'str',
+ 'metadata': 'V1ObjectMeta',
+ 'spec': 'V1beta1MutatingAdmissionPolicySpec'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'kind': 'kind',
+ 'metadata': 'metadata',
+ 'spec': 'spec'
+ }
+
+ def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501
+ """V1beta1MutatingAdmissionPolicy - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._api_version = None
+ self._kind = None
+ self._metadata = None
+ self._spec = None
+ self.discriminator = None
+
+ if api_version is not None:
+ self.api_version = api_version
+ if kind is not None:
+ self.kind = kind
+ if metadata is not None:
+ self.metadata = metadata
+ if spec is not None:
+ self.spec = spec
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+
+ APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
+
+ :return: The api_version of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1beta1MutatingAdmissionPolicy.
+
+ APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
+
+ :param api_version: The api_version of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+
+ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
+
+ :return: The kind of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1beta1MutatingAdmissionPolicy.
+
+ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
+
+ :param kind: The kind of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+
+
+ :return: The metadata of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+ :rtype: V1ObjectMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1beta1MutatingAdmissionPolicy.
+
+
+ :param metadata: The metadata of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+ :type: V1ObjectMeta
+ """
+
+ self._metadata = metadata
+
+ @property
+ def spec(self):
+ """Gets the spec of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+
+
+ :return: The spec of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+ :rtype: V1beta1MutatingAdmissionPolicySpec
+ """
+ return self._spec
+
+ @spec.setter
+ def spec(self, spec):
+ """Sets the spec of this V1beta1MutatingAdmissionPolicy.
+
+
+ :param spec: The spec of this V1beta1MutatingAdmissionPolicy. # noqa: E501
+ :type: V1beta1MutatingAdmissionPolicySpec
+ """
+
+ self._spec = spec
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta1MutatingAdmissionPolicy):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta1MutatingAdmissionPolicy):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding.py
index 63a1f022382..b3096d0052b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1beta1ValidatingAdmissionPolicyBinding(object):
+class V1beta1MutatingAdmissionPolicyBinding(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -36,7 +36,7 @@ class V1beta1ValidatingAdmissionPolicyBinding(object):
'api_version': 'str',
'kind': 'str',
'metadata': 'V1ObjectMeta',
- 'spec': 'V1beta1ValidatingAdmissionPolicyBindingSpec'
+ 'spec': 'V1beta1MutatingAdmissionPolicyBindingSpec'
}
attribute_map = {
@@ -47,7 +47,7 @@ class V1beta1ValidatingAdmissionPolicyBinding(object):
}
def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501
- """V1beta1ValidatingAdmissionPolicyBinding - a model defined in OpenAPI""" # noqa: E501
+ """V1beta1MutatingAdmissionPolicyBinding - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -69,22 +69,22 @@ class V1beta1ValidatingAdmissionPolicyBinding(object):
@property
def api_version(self):
- """Gets the api_version of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ """Gets the api_version of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :return: The api_version of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1beta1ValidatingAdmissionPolicyBinding.
+ """Sets the api_version of this V1beta1MutatingAdmissionPolicyBinding.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :param api_version: The api_version of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
:type: str
"""
@@ -92,22 +92,22 @@ class V1beta1ValidatingAdmissionPolicyBinding(object):
@property
def kind(self):
- """Gets the kind of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ """Gets the kind of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :return: The kind of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1beta1ValidatingAdmissionPolicyBinding.
+ """Sets the kind of this V1beta1MutatingAdmissionPolicyBinding.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :param kind: The kind of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
:type: str
"""
@@ -115,20 +115,20 @@ class V1beta1ValidatingAdmissionPolicyBinding(object):
@property
def metadata(self):
- """Gets the metadata of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ """Gets the metadata of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
- :return: The metadata of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :return: The metadata of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
:rtype: V1ObjectMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1beta1ValidatingAdmissionPolicyBinding.
+ """Sets the metadata of this V1beta1MutatingAdmissionPolicyBinding.
- :param metadata: The metadata of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :param metadata: The metadata of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
:type: V1ObjectMeta
"""
@@ -136,21 +136,21 @@ class V1beta1ValidatingAdmissionPolicyBinding(object):
@property
def spec(self):
- """Gets the spec of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
+ """Gets the spec of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
- :return: The spec of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
- :rtype: V1beta1ValidatingAdmissionPolicyBindingSpec
+ :return: The spec of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
+ :rtype: V1beta1MutatingAdmissionPolicyBindingSpec
"""
return self._spec
@spec.setter
def spec(self, spec):
- """Sets the spec of this V1beta1ValidatingAdmissionPolicyBinding.
+ """Sets the spec of this V1beta1MutatingAdmissionPolicyBinding.
- :param spec: The spec of this V1beta1ValidatingAdmissionPolicyBinding. # noqa: E501
- :type: V1beta1ValidatingAdmissionPolicyBindingSpec
+ :param spec: The spec of this V1beta1MutatingAdmissionPolicyBinding. # noqa: E501
+ :type: V1beta1MutatingAdmissionPolicyBindingSpec
"""
self._spec = spec
@@ -189,14 +189,14 @@ class V1beta1ValidatingAdmissionPolicyBinding(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyBinding):
+ if not isinstance(other, V1beta1MutatingAdmissionPolicyBinding):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyBinding):
+ if not isinstance(other, V1beta1MutatingAdmissionPolicyBinding):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding_list.py
index 73f9913bc92..18c05a93c60 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1beta1ValidatingAdmissionPolicyBindingList(object):
+class V1beta1MutatingAdmissionPolicyBindingList(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,7 +34,7 @@ class V1beta1ValidatingAdmissionPolicyBindingList(object):
"""
openapi_types = {
'api_version': 'str',
- 'items': 'list[V1beta1ValidatingAdmissionPolicyBinding]',
+ 'items': 'list[V1beta1MutatingAdmissionPolicyBinding]',
'kind': 'str',
'metadata': 'V1ListMeta'
}
@@ -47,7 +47,7 @@ class V1beta1ValidatingAdmissionPolicyBindingList(object):
}
def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501
- """V1beta1ValidatingAdmissionPolicyBindingList - a model defined in OpenAPI""" # noqa: E501
+ """V1beta1MutatingAdmissionPolicyBindingList - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +68,22 @@ class V1beta1ValidatingAdmissionPolicyBindingList(object):
@property
def api_version(self):
- """Gets the api_version of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ """Gets the api_version of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :return: The api_version of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1beta1ValidatingAdmissionPolicyBindingList.
+ """Sets the api_version of this V1beta1MutatingAdmissionPolicyBindingList.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :param api_version: The api_version of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
:type: str
"""
@@ -91,23 +91,23 @@ class V1beta1ValidatingAdmissionPolicyBindingList(object):
@property
def items(self):
- """Gets the items of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ """Gets the items of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
List of PolicyBinding. # noqa: E501
- :return: The items of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
- :rtype: list[V1beta1ValidatingAdmissionPolicyBinding]
+ :return: The items of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
+ :rtype: list[V1beta1MutatingAdmissionPolicyBinding]
"""
return self._items
@items.setter
def items(self, items):
- """Sets the items of this V1beta1ValidatingAdmissionPolicyBindingList.
+ """Sets the items of this V1beta1MutatingAdmissionPolicyBindingList.
List of PolicyBinding. # noqa: E501
- :param items: The items of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
- :type: list[V1beta1ValidatingAdmissionPolicyBinding]
+ :param items: The items of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
+ :type: list[V1beta1MutatingAdmissionPolicyBinding]
"""
if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501
raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501
@@ -116,22 +116,22 @@ class V1beta1ValidatingAdmissionPolicyBindingList(object):
@property
def kind(self):
- """Gets the kind of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ """Gets the kind of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :return: The kind of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1beta1ValidatingAdmissionPolicyBindingList.
+ """Sets the kind of this V1beta1MutatingAdmissionPolicyBindingList.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :param kind: The kind of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
:type: str
"""
@@ -139,20 +139,20 @@ class V1beta1ValidatingAdmissionPolicyBindingList(object):
@property
def metadata(self):
- """Gets the metadata of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ """Gets the metadata of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
- :return: The metadata of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :return: The metadata of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
:rtype: V1ListMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1beta1ValidatingAdmissionPolicyBindingList.
+ """Sets the metadata of this V1beta1MutatingAdmissionPolicyBindingList.
- :param metadata: The metadata of this V1beta1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :param metadata: The metadata of this V1beta1MutatingAdmissionPolicyBindingList. # noqa: E501
:type: V1ListMeta
"""
@@ -192,14 +192,14 @@ class V1beta1ValidatingAdmissionPolicyBindingList(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyBindingList):
+ if not isinstance(other, V1beta1MutatingAdmissionPolicyBindingList):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyBindingList):
+ if not isinstance(other, V1beta1MutatingAdmissionPolicyBindingList):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding_spec.py
new file mode 100644
index 00000000000..14dc5f513d1
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_binding_spec.py
@@ -0,0 +1,174 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta1MutatingAdmissionPolicyBindingSpec(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'match_resources': 'V1beta1MatchResources',
+ 'param_ref': 'V1beta1ParamRef',
+ 'policy_name': 'str'
+ }
+
+ attribute_map = {
+ 'match_resources': 'matchResources',
+ 'param_ref': 'paramRef',
+ 'policy_name': 'policyName'
+ }
+
+ def __init__(self, match_resources=None, param_ref=None, policy_name=None, local_vars_configuration=None): # noqa: E501
+ """V1beta1MutatingAdmissionPolicyBindingSpec - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._match_resources = None
+ self._param_ref = None
+ self._policy_name = None
+ self.discriminator = None
+
+ if match_resources is not None:
+ self.match_resources = match_resources
+ if param_ref is not None:
+ self.param_ref = param_ref
+ if policy_name is not None:
+ self.policy_name = policy_name
+
+ @property
+ def match_resources(self):
+ """Gets the match_resources of this V1beta1MutatingAdmissionPolicyBindingSpec. # noqa: E501
+
+
+ :return: The match_resources of this V1beta1MutatingAdmissionPolicyBindingSpec. # noqa: E501
+ :rtype: V1beta1MatchResources
+ """
+ return self._match_resources
+
+ @match_resources.setter
+ def match_resources(self, match_resources):
+ """Sets the match_resources of this V1beta1MutatingAdmissionPolicyBindingSpec.
+
+
+ :param match_resources: The match_resources of this V1beta1MutatingAdmissionPolicyBindingSpec. # noqa: E501
+ :type: V1beta1MatchResources
+ """
+
+ self._match_resources = match_resources
+
+ @property
+ def param_ref(self):
+ """Gets the param_ref of this V1beta1MutatingAdmissionPolicyBindingSpec. # noqa: E501
+
+
+ :return: The param_ref of this V1beta1MutatingAdmissionPolicyBindingSpec. # noqa: E501
+ :rtype: V1beta1ParamRef
+ """
+ return self._param_ref
+
+ @param_ref.setter
+ def param_ref(self, param_ref):
+ """Sets the param_ref of this V1beta1MutatingAdmissionPolicyBindingSpec.
+
+
+ :param param_ref: The param_ref of this V1beta1MutatingAdmissionPolicyBindingSpec. # noqa: E501
+ :type: V1beta1ParamRef
+ """
+
+ self._param_ref = param_ref
+
+ @property
+ def policy_name(self):
+ """Gets the policy_name of this V1beta1MutatingAdmissionPolicyBindingSpec. # noqa: E501
+
+ policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. # noqa: E501
+
+ :return: The policy_name of this V1beta1MutatingAdmissionPolicyBindingSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._policy_name
+
+ @policy_name.setter
+ def policy_name(self, policy_name):
+ """Sets the policy_name of this V1beta1MutatingAdmissionPolicyBindingSpec.
+
+ policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. # noqa: E501
+
+ :param policy_name: The policy_name of this V1beta1MutatingAdmissionPolicyBindingSpec. # noqa: E501
+ :type: str
+ """
+
+ self._policy_name = policy_name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta1MutatingAdmissionPolicyBindingSpec):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta1MutatingAdmissionPolicyBindingSpec):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_list.py
index f51fbee74f3..b796c90fa25 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -18,7 +18,7 @@ import six
from kubernetes.client.configuration import Configuration
-class V1beta1ValidatingAdmissionPolicyList(object):
+class V1beta1MutatingAdmissionPolicyList(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
@@ -34,7 +34,7 @@ class V1beta1ValidatingAdmissionPolicyList(object):
"""
openapi_types = {
'api_version': 'str',
- 'items': 'list[V1beta1ValidatingAdmissionPolicy]',
+ 'items': 'list[V1beta1MutatingAdmissionPolicy]',
'kind': 'str',
'metadata': 'V1ListMeta'
}
@@ -47,7 +47,7 @@ class V1beta1ValidatingAdmissionPolicyList(object):
}
def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501
- """V1beta1ValidatingAdmissionPolicyList - a model defined in OpenAPI""" # noqa: E501
+ """V1beta1MutatingAdmissionPolicyList - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
@@ -68,22 +68,22 @@ class V1beta1ValidatingAdmissionPolicyList(object):
@property
def api_version(self):
- """Gets the api_version of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ """Gets the api_version of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :return: The api_version of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ :return: The api_version of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
:rtype: str
"""
return self._api_version
@api_version.setter
def api_version(self, api_version):
- """Sets the api_version of this V1beta1ValidatingAdmissionPolicyList.
+ """Sets the api_version of this V1beta1MutatingAdmissionPolicyList.
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501
- :param api_version: The api_version of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ :param api_version: The api_version of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
:type: str
"""
@@ -91,23 +91,23 @@ class V1beta1ValidatingAdmissionPolicyList(object):
@property
def items(self):
- """Gets the items of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ """Gets the items of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
List of ValidatingAdmissionPolicy. # noqa: E501
- :return: The items of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
- :rtype: list[V1beta1ValidatingAdmissionPolicy]
+ :return: The items of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
+ :rtype: list[V1beta1MutatingAdmissionPolicy]
"""
return self._items
@items.setter
def items(self, items):
- """Sets the items of this V1beta1ValidatingAdmissionPolicyList.
+ """Sets the items of this V1beta1MutatingAdmissionPolicyList.
List of ValidatingAdmissionPolicy. # noqa: E501
- :param items: The items of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
- :type: list[V1beta1ValidatingAdmissionPolicy]
+ :param items: The items of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
+ :type: list[V1beta1MutatingAdmissionPolicy]
"""
if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501
raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501
@@ -116,22 +116,22 @@ class V1beta1ValidatingAdmissionPolicyList(object):
@property
def kind(self):
- """Gets the kind of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ """Gets the kind of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :return: The kind of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ :return: The kind of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
:rtype: str
"""
return self._kind
@kind.setter
def kind(self, kind):
- """Sets the kind of this V1beta1ValidatingAdmissionPolicyList.
+ """Sets the kind of this V1beta1MutatingAdmissionPolicyList.
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501
- :param kind: The kind of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ :param kind: The kind of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
:type: str
"""
@@ -139,20 +139,20 @@ class V1beta1ValidatingAdmissionPolicyList(object):
@property
def metadata(self):
- """Gets the metadata of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ """Gets the metadata of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
- :return: The metadata of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ :return: The metadata of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
:rtype: V1ListMeta
"""
return self._metadata
@metadata.setter
def metadata(self, metadata):
- """Sets the metadata of this V1beta1ValidatingAdmissionPolicyList.
+ """Sets the metadata of this V1beta1MutatingAdmissionPolicyList.
- :param metadata: The metadata of this V1beta1ValidatingAdmissionPolicyList. # noqa: E501
+ :param metadata: The metadata of this V1beta1MutatingAdmissionPolicyList. # noqa: E501
:type: V1ListMeta
"""
@@ -192,14 +192,14 @@ class V1beta1ValidatingAdmissionPolicyList(object):
def __eq__(self, other):
"""Returns true if both objects are equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyList):
+ if not isinstance(other, V1beta1MutatingAdmissionPolicyList):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyList):
+ if not isinstance(other, V1beta1MutatingAdmissionPolicyList):
return True
return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_spec.py
new file mode 100644
index 00000000000..ed365d663ec
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutating_admission_policy_spec.py
@@ -0,0 +1,286 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta1MutatingAdmissionPolicySpec(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'failure_policy': 'str',
+ 'match_conditions': 'list[V1beta1MatchCondition]',
+ 'match_constraints': 'V1beta1MatchResources',
+ 'mutations': 'list[V1beta1Mutation]',
+ 'param_kind': 'V1beta1ParamKind',
+ 'reinvocation_policy': 'str',
+ 'variables': 'list[V1beta1Variable]'
+ }
+
+ attribute_map = {
+ 'failure_policy': 'failurePolicy',
+ 'match_conditions': 'matchConditions',
+ 'match_constraints': 'matchConstraints',
+ 'mutations': 'mutations',
+ 'param_kind': 'paramKind',
+ 'reinvocation_policy': 'reinvocationPolicy',
+ 'variables': 'variables'
+ }
+
+ def __init__(self, failure_policy=None, match_conditions=None, match_constraints=None, mutations=None, param_kind=None, reinvocation_policy=None, variables=None, local_vars_configuration=None): # noqa: E501
+ """V1beta1MutatingAdmissionPolicySpec - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._failure_policy = None
+ self._match_conditions = None
+ self._match_constraints = None
+ self._mutations = None
+ self._param_kind = None
+ self._reinvocation_policy = None
+ self._variables = None
+ self.discriminator = None
+
+ if failure_policy is not None:
+ self.failure_policy = failure_policy
+ if match_conditions is not None:
+ self.match_conditions = match_conditions
+ if match_constraints is not None:
+ self.match_constraints = match_constraints
+ if mutations is not None:
+ self.mutations = mutations
+ if param_kind is not None:
+ self.param_kind = param_kind
+ if reinvocation_policy is not None:
+ self.reinvocation_policy = reinvocation_policy
+ if variables is not None:
+ self.variables = variables
+
+ @property
+ def failure_policy(self):
+ """Gets the failure_policy of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+
+ failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. A policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource. failurePolicy does not define how validations that evaluate to false are handled. Allowed values are Ignore or Fail. Defaults to Fail. # noqa: E501
+
+ :return: The failure_policy of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :rtype: str
+ """
+ return self._failure_policy
+
+ @failure_policy.setter
+ def failure_policy(self, failure_policy):
+ """Sets the failure_policy of this V1beta1MutatingAdmissionPolicySpec.
+
+ failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. A policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource. failurePolicy does not define how validations that evaluate to false are handled. Allowed values are Ignore or Fail. Defaults to Fail. # noqa: E501
+
+ :param failure_policy: The failure_policy of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :type: str
+ """
+
+ self._failure_policy = failure_policy
+
+ @property
+ def match_conditions(self):
+ """Gets the match_conditions of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+
+ matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped # noqa: E501
+
+ :return: The match_conditions of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :rtype: list[V1beta1MatchCondition]
+ """
+ return self._match_conditions
+
+ @match_conditions.setter
+ def match_conditions(self, match_conditions):
+ """Sets the match_conditions of this V1beta1MutatingAdmissionPolicySpec.
+
+ matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped # noqa: E501
+
+ :param match_conditions: The match_conditions of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :type: list[V1beta1MatchCondition]
+ """
+
+ self._match_conditions = match_conditions
+
+ @property
+ def match_constraints(self):
+ """Gets the match_constraints of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+
+
+ :return: The match_constraints of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :rtype: V1beta1MatchResources
+ """
+ return self._match_constraints
+
+ @match_constraints.setter
+ def match_constraints(self, match_constraints):
+ """Sets the match_constraints of this V1beta1MutatingAdmissionPolicySpec.
+
+
+ :param match_constraints: The match_constraints of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :type: V1beta1MatchResources
+ """
+
+ self._match_constraints = match_constraints
+
+ @property
+ def mutations(self):
+ """Gets the mutations of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+
+ mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis. # noqa: E501
+
+ :return: The mutations of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :rtype: list[V1beta1Mutation]
+ """
+ return self._mutations
+
+ @mutations.setter
+ def mutations(self, mutations):
+ """Sets the mutations of this V1beta1MutatingAdmissionPolicySpec.
+
+ mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis. # noqa: E501
+
+ :param mutations: The mutations of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :type: list[V1beta1Mutation]
+ """
+
+ self._mutations = mutations
+
+ @property
+ def param_kind(self):
+ """Gets the param_kind of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+
+
+ :return: The param_kind of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :rtype: V1beta1ParamKind
+ """
+ return self._param_kind
+
+ @param_kind.setter
+ def param_kind(self, param_kind):
+ """Sets the param_kind of this V1beta1MutatingAdmissionPolicySpec.
+
+
+ :param param_kind: The param_kind of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :type: V1beta1ParamKind
+ """
+
+ self._param_kind = param_kind
+
+ @property
+ def reinvocation_policy(self):
+ """Gets the reinvocation_policy of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+
+ reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\". Never: These mutations will not be called more than once per binding in a single admission evaluation. IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required. # noqa: E501
+
+ :return: The reinvocation_policy of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :rtype: str
+ """
+ return self._reinvocation_policy
+
+ @reinvocation_policy.setter
+ def reinvocation_policy(self, reinvocation_policy):
+ """Sets the reinvocation_policy of this V1beta1MutatingAdmissionPolicySpec.
+
+ reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\". Never: These mutations will not be called more than once per binding in a single admission evaluation. IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required. # noqa: E501
+
+ :param reinvocation_policy: The reinvocation_policy of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :type: str
+ """
+
+ self._reinvocation_policy = reinvocation_policy
+
+ @property
+ def variables(self):
+ """Gets the variables of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+
+ variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic. # noqa: E501
+
+ :return: The variables of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :rtype: list[V1beta1Variable]
+ """
+ return self._variables
+
+ @variables.setter
+ def variables(self, variables):
+ """Sets the variables of this V1beta1MutatingAdmissionPolicySpec.
+
+ variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic. # noqa: E501
+
+ :param variables: The variables of this V1beta1MutatingAdmissionPolicySpec. # noqa: E501
+ :type: list[V1beta1Variable]
+ """
+
+ self._variables = variables
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta1MutatingAdmissionPolicySpec):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta1MutatingAdmissionPolicySpec):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutation.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutation.py
new file mode 100644
index 00000000000..8602df1655b
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_mutation.py
@@ -0,0 +1,175 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta1Mutation(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'apply_configuration': 'V1beta1ApplyConfiguration',
+ 'json_patch': 'V1beta1JSONPatch',
+ 'patch_type': 'str'
+ }
+
+ attribute_map = {
+ 'apply_configuration': 'applyConfiguration',
+ 'json_patch': 'jsonPatch',
+ 'patch_type': 'patchType'
+ }
+
+ def __init__(self, apply_configuration=None, json_patch=None, patch_type=None, local_vars_configuration=None): # noqa: E501
+ """V1beta1Mutation - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._apply_configuration = None
+ self._json_patch = None
+ self._patch_type = None
+ self.discriminator = None
+
+ if apply_configuration is not None:
+ self.apply_configuration = apply_configuration
+ if json_patch is not None:
+ self.json_patch = json_patch
+ self.patch_type = patch_type
+
+ @property
+ def apply_configuration(self):
+ """Gets the apply_configuration of this V1beta1Mutation. # noqa: E501
+
+
+ :return: The apply_configuration of this V1beta1Mutation. # noqa: E501
+ :rtype: V1beta1ApplyConfiguration
+ """
+ return self._apply_configuration
+
+ @apply_configuration.setter
+ def apply_configuration(self, apply_configuration):
+ """Sets the apply_configuration of this V1beta1Mutation.
+
+
+ :param apply_configuration: The apply_configuration of this V1beta1Mutation. # noqa: E501
+ :type: V1beta1ApplyConfiguration
+ """
+
+ self._apply_configuration = apply_configuration
+
+ @property
+ def json_patch(self):
+ """Gets the json_patch of this V1beta1Mutation. # noqa: E501
+
+
+ :return: The json_patch of this V1beta1Mutation. # noqa: E501
+ :rtype: V1beta1JSONPatch
+ """
+ return self._json_patch
+
+ @json_patch.setter
+ def json_patch(self, json_patch):
+ """Sets the json_patch of this V1beta1Mutation.
+
+
+ :param json_patch: The json_patch of this V1beta1Mutation. # noqa: E501
+ :type: V1beta1JSONPatch
+ """
+
+ self._json_patch = json_patch
+
+ @property
+ def patch_type(self):
+ """Gets the patch_type of this V1beta1Mutation. # noqa: E501
+
+ patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required. # noqa: E501
+
+ :return: The patch_type of this V1beta1Mutation. # noqa: E501
+ :rtype: str
+ """
+ return self._patch_type
+
+ @patch_type.setter
+ def patch_type(self, patch_type):
+ """Sets the patch_type of this V1beta1Mutation.
+
+ patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required. # noqa: E501
+
+ :param patch_type: The patch_type of this V1beta1Mutation. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and patch_type is None: # noqa: E501
+ raise ValueError("Invalid value for `patch_type`, must not be `None`") # noqa: E501
+
+ self._patch_type = patch_type
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta1Mutation):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta1Mutation):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_named_rule_with_operations.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_named_rule_with_operations.py
index 555d9e6c80b..d384736fda1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_named_rule_with_operations.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_named_rule_with_operations.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_network_device_data.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_network_device_data.py
index 2e6dca10a00..57db3ae987f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_network_device_data.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_network_device_data.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_opaque_device_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_opaque_device_configuration.py
index 12b56b5c80c..7ccd3fd9e47 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_opaque_device_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_opaque_device_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_kind.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_kind.py
index a632153458d..82d44c57192 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_kind.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_kind.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_ref.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_ref.py
index 8eaf04c3df5..23dc27ab020 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_ref.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_param_ref.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_parent_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_parent_reference.py
index 3deefc9a730..6fe9befc856 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_parent_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_parent_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim.py
index d3506523ed2..c5d7d7e2ad3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_consumer_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_consumer_reference.py
index 34066aea8f9..7975b5236e2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_consumer_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_consumer_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_list.py
index 6e76760de01..16d4d699966 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_spec.py
index 45b341b23b5..58e788ba866 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_status.py
index b07c07e8168..bc57acf3bab 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template.py
index 735982769d5..43b276f4649 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_list.py
index 9275093daac..bd4bc2cf6de 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_spec.py
index c8ade8ef278..eacc8262c5e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_claim_template_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_pool.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_pool.py
index 763e4c8ad6a..c59100415a9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_pool.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_pool.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice.py
index 392ab6dd2af..3e4cbab10b3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_list.py
index b4a7113f47c..074a17a6c6d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_spec.py
index 3fc97a3d308..6eea55afcb0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_resource_slice_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr.py
index 4ad1c4990e2..6126820a05d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_list.py
index fa2ab122232..f2e5c7d0d4c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_spec.py
index b4ee9b076fb..0d5169a8c15 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_status.py
index 274970a533d..53897196ba3 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_service_cidr_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_spec.py
deleted file mode 100644
index 62cf0a181e1..00000000000
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_spec.py
+++ /dev/null
@@ -1,202 +0,0 @@
-# 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.33
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from kubernetes.client.configuration import Configuration
-
-
-class V1beta1ValidatingAdmissionPolicyBindingSpec(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'match_resources': 'V1beta1MatchResources',
- 'param_ref': 'V1beta1ParamRef',
- 'policy_name': 'str',
- 'validation_actions': 'list[str]'
- }
-
- attribute_map = {
- 'match_resources': 'matchResources',
- 'param_ref': 'paramRef',
- 'policy_name': 'policyName',
- 'validation_actions': 'validationActions'
- }
-
- def __init__(self, match_resources=None, param_ref=None, policy_name=None, validation_actions=None, local_vars_configuration=None): # noqa: E501
- """V1beta1ValidatingAdmissionPolicyBindingSpec - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._match_resources = None
- self._param_ref = None
- self._policy_name = None
- self._validation_actions = None
- self.discriminator = None
-
- if match_resources is not None:
- self.match_resources = match_resources
- if param_ref is not None:
- self.param_ref = param_ref
- if policy_name is not None:
- self.policy_name = policy_name
- if validation_actions is not None:
- self.validation_actions = validation_actions
-
- @property
- def match_resources(self):
- """Gets the match_resources of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
-
-
- :return: The match_resources of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
- :rtype: V1beta1MatchResources
- """
- return self._match_resources
-
- @match_resources.setter
- def match_resources(self, match_resources):
- """Sets the match_resources of this V1beta1ValidatingAdmissionPolicyBindingSpec.
-
-
- :param match_resources: The match_resources of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
- :type: V1beta1MatchResources
- """
-
- self._match_resources = match_resources
-
- @property
- def param_ref(self):
- """Gets the param_ref of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
-
-
- :return: The param_ref of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
- :rtype: V1beta1ParamRef
- """
- return self._param_ref
-
- @param_ref.setter
- def param_ref(self, param_ref):
- """Sets the param_ref of this V1beta1ValidatingAdmissionPolicyBindingSpec.
-
-
- :param param_ref: The param_ref of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
- :type: V1beta1ParamRef
- """
-
- self._param_ref = param_ref
-
- @property
- def policy_name(self):
- """Gets the policy_name of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
-
- PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. # noqa: E501
-
- :return: The policy_name of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
- :rtype: str
- """
- return self._policy_name
-
- @policy_name.setter
- def policy_name(self, policy_name):
- """Sets the policy_name of this V1beta1ValidatingAdmissionPolicyBindingSpec.
-
- PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. # noqa: E501
-
- :param policy_name: The policy_name of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
- :type: str
- """
-
- self._policy_name = policy_name
-
- @property
- def validation_actions(self):
- """Gets the validation_actions of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
-
- validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\\\"message\\\": \\\"Invalid value\\\", {\\\"policy\\\": \\\"policy.example.com\\\", {\\\"binding\\\": \\\"policybinding.example.com\\\", {\\\"expressionIndex\\\": \\\"1\\\", {\\\"validationActions\\\": [\\\"Audit\\\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required. # noqa: E501
-
- :return: The validation_actions of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
- :rtype: list[str]
- """
- return self._validation_actions
-
- @validation_actions.setter
- def validation_actions(self, validation_actions):
- """Sets the validation_actions of this V1beta1ValidatingAdmissionPolicyBindingSpec.
-
- validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\\\"message\\\": \\\"Invalid value\\\", {\\\"policy\\\": \\\"policy.example.com\\\", {\\\"binding\\\": \\\"policybinding.example.com\\\", {\\\"expressionIndex\\\": \\\"1\\\", {\\\"validationActions\\\": [\\\"Audit\\\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required. # noqa: E501
-
- :param validation_actions: The validation_actions of this V1beta1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
- :type: list[str]
- """
-
- self._validation_actions = validation_actions
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value
- ))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict") else item,
- value.items()
- ))
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyBindingSpec):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyBindingSpec):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_spec.py
deleted file mode 100644
index aba69be2b5a..00000000000
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_spec.py
+++ /dev/null
@@ -1,286 +0,0 @@
-# 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.33
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from kubernetes.client.configuration import Configuration
-
-
-class V1beta1ValidatingAdmissionPolicySpec(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'audit_annotations': 'list[V1beta1AuditAnnotation]',
- 'failure_policy': 'str',
- 'match_conditions': 'list[V1beta1MatchCondition]',
- 'match_constraints': 'V1beta1MatchResources',
- 'param_kind': 'V1beta1ParamKind',
- 'validations': 'list[V1beta1Validation]',
- 'variables': 'list[V1beta1Variable]'
- }
-
- attribute_map = {
- 'audit_annotations': 'auditAnnotations',
- 'failure_policy': 'failurePolicy',
- 'match_conditions': 'matchConditions',
- 'match_constraints': 'matchConstraints',
- 'param_kind': 'paramKind',
- 'validations': 'validations',
- 'variables': 'variables'
- }
-
- def __init__(self, audit_annotations=None, failure_policy=None, match_conditions=None, match_constraints=None, param_kind=None, validations=None, variables=None, local_vars_configuration=None): # noqa: E501
- """V1beta1ValidatingAdmissionPolicySpec - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._audit_annotations = None
- self._failure_policy = None
- self._match_conditions = None
- self._match_constraints = None
- self._param_kind = None
- self._validations = None
- self._variables = None
- self.discriminator = None
-
- if audit_annotations is not None:
- self.audit_annotations = audit_annotations
- if failure_policy is not None:
- self.failure_policy = failure_policy
- if match_conditions is not None:
- self.match_conditions = match_conditions
- if match_constraints is not None:
- self.match_constraints = match_constraints
- if param_kind is not None:
- self.param_kind = param_kind
- if validations is not None:
- self.validations = validations
- if variables is not None:
- self.variables = variables
-
- @property
- def audit_annotations(self):
- """Gets the audit_annotations of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
-
- auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required. # noqa: E501
-
- :return: The audit_annotations of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :rtype: list[V1beta1AuditAnnotation]
- """
- return self._audit_annotations
-
- @audit_annotations.setter
- def audit_annotations(self, audit_annotations):
- """Sets the audit_annotations of this V1beta1ValidatingAdmissionPolicySpec.
-
- auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required. # noqa: E501
-
- :param audit_annotations: The audit_annotations of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :type: list[V1beta1AuditAnnotation]
- """
-
- self._audit_annotations = audit_annotations
-
- @property
- def failure_policy(self):
- """Gets the failure_policy of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
-
- failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource. failurePolicy does not define how validations that evaluate to false are handled. When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced. Allowed values are Ignore or Fail. Defaults to Fail. # noqa: E501
-
- :return: The failure_policy of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :rtype: str
- """
- return self._failure_policy
-
- @failure_policy.setter
- def failure_policy(self, failure_policy):
- """Sets the failure_policy of this V1beta1ValidatingAdmissionPolicySpec.
-
- failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource. failurePolicy does not define how validations that evaluate to false are handled. When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced. Allowed values are Ignore or Fail. Defaults to Fail. # noqa: E501
-
- :param failure_policy: The failure_policy of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :type: str
- """
-
- self._failure_policy = failure_policy
-
- @property
- def match_conditions(self):
- """Gets the match_conditions of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
-
- MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped # noqa: E501
-
- :return: The match_conditions of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :rtype: list[V1beta1MatchCondition]
- """
- return self._match_conditions
-
- @match_conditions.setter
- def match_conditions(self, match_conditions):
- """Sets the match_conditions of this V1beta1ValidatingAdmissionPolicySpec.
-
- MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped # noqa: E501
-
- :param match_conditions: The match_conditions of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :type: list[V1beta1MatchCondition]
- """
-
- self._match_conditions = match_conditions
-
- @property
- def match_constraints(self):
- """Gets the match_constraints of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
-
-
- :return: The match_constraints of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :rtype: V1beta1MatchResources
- """
- return self._match_constraints
-
- @match_constraints.setter
- def match_constraints(self, match_constraints):
- """Sets the match_constraints of this V1beta1ValidatingAdmissionPolicySpec.
-
-
- :param match_constraints: The match_constraints of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :type: V1beta1MatchResources
- """
-
- self._match_constraints = match_constraints
-
- @property
- def param_kind(self):
- """Gets the param_kind of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
-
-
- :return: The param_kind of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :rtype: V1beta1ParamKind
- """
- return self._param_kind
-
- @param_kind.setter
- def param_kind(self, param_kind):
- """Sets the param_kind of this V1beta1ValidatingAdmissionPolicySpec.
-
-
- :param param_kind: The param_kind of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :type: V1beta1ParamKind
- """
-
- self._param_kind = param_kind
-
- @property
- def validations(self):
- """Gets the validations of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
-
- Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required. # noqa: E501
-
- :return: The validations of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :rtype: list[V1beta1Validation]
- """
- return self._validations
-
- @validations.setter
- def validations(self, validations):
- """Sets the validations of this V1beta1ValidatingAdmissionPolicySpec.
-
- Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required. # noqa: E501
-
- :param validations: The validations of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :type: list[V1beta1Validation]
- """
-
- self._validations = validations
-
- @property
- def variables(self):
- """Gets the variables of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
-
- Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. # noqa: E501
-
- :return: The variables of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :rtype: list[V1beta1Variable]
- """
- return self._variables
-
- @variables.setter
- def variables(self, variables):
- """Sets the variables of this V1beta1ValidatingAdmissionPolicySpec.
-
- Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. # noqa: E501
-
- :param variables: The variables of this V1beta1ValidatingAdmissionPolicySpec. # noqa: E501
- :type: list[V1beta1Variable]
- """
-
- self._variables = variables
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value
- ))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict") else item,
- value.items()
- ))
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicySpec):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicySpec):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_status.py
deleted file mode 100644
index f5496b252fc..00000000000
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_status.py
+++ /dev/null
@@ -1,176 +0,0 @@
-# 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.33
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from kubernetes.client.configuration import Configuration
-
-
-class V1beta1ValidatingAdmissionPolicyStatus(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'conditions': 'list[V1Condition]',
- 'observed_generation': 'int',
- 'type_checking': 'V1beta1TypeChecking'
- }
-
- attribute_map = {
- 'conditions': 'conditions',
- 'observed_generation': 'observedGeneration',
- 'type_checking': 'typeChecking'
- }
-
- def __init__(self, conditions=None, observed_generation=None, type_checking=None, local_vars_configuration=None): # noqa: E501
- """V1beta1ValidatingAdmissionPolicyStatus - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._conditions = None
- self._observed_generation = None
- self._type_checking = None
- self.discriminator = None
-
- if conditions is not None:
- self.conditions = conditions
- if observed_generation is not None:
- self.observed_generation = observed_generation
- if type_checking is not None:
- self.type_checking = type_checking
-
- @property
- def conditions(self):
- """Gets the conditions of this V1beta1ValidatingAdmissionPolicyStatus. # noqa: E501
-
- The conditions represent the latest available observations of a policy's current state. # noqa: E501
-
- :return: The conditions of this V1beta1ValidatingAdmissionPolicyStatus. # noqa: E501
- :rtype: list[V1Condition]
- """
- return self._conditions
-
- @conditions.setter
- def conditions(self, conditions):
- """Sets the conditions of this V1beta1ValidatingAdmissionPolicyStatus.
-
- The conditions represent the latest available observations of a policy's current state. # noqa: E501
-
- :param conditions: The conditions of this V1beta1ValidatingAdmissionPolicyStatus. # noqa: E501
- :type: list[V1Condition]
- """
-
- self._conditions = conditions
-
- @property
- def observed_generation(self):
- """Gets the observed_generation of this V1beta1ValidatingAdmissionPolicyStatus. # noqa: E501
-
- The generation observed by the controller. # noqa: E501
-
- :return: The observed_generation of this V1beta1ValidatingAdmissionPolicyStatus. # noqa: E501
- :rtype: int
- """
- return self._observed_generation
-
- @observed_generation.setter
- def observed_generation(self, observed_generation):
- """Sets the observed_generation of this V1beta1ValidatingAdmissionPolicyStatus.
-
- The generation observed by the controller. # noqa: E501
-
- :param observed_generation: The observed_generation of this V1beta1ValidatingAdmissionPolicyStatus. # noqa: E501
- :type: int
- """
-
- self._observed_generation = observed_generation
-
- @property
- def type_checking(self):
- """Gets the type_checking of this V1beta1ValidatingAdmissionPolicyStatus. # noqa: E501
-
-
- :return: The type_checking of this V1beta1ValidatingAdmissionPolicyStatus. # noqa: E501
- :rtype: V1beta1TypeChecking
- """
- return self._type_checking
-
- @type_checking.setter
- def type_checking(self, type_checking):
- """Sets the type_checking of this V1beta1ValidatingAdmissionPolicyStatus.
-
-
- :param type_checking: The type_checking of this V1beta1ValidatingAdmissionPolicyStatus. # noqa: E501
- :type: V1beta1TypeChecking
- """
-
- self._type_checking = type_checking
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value
- ))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict") else item,
- value.items()
- ))
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyStatus):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1ValidatingAdmissionPolicyStatus):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validation.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validation.py
deleted file mode 100644
index 4dbd490b5b5..00000000000
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validation.py
+++ /dev/null
@@ -1,207 +0,0 @@
-# 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.33
- Generated by: https://openapi-generator.tech
-"""
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-from kubernetes.client.configuration import Configuration
-
-
-class V1beta1Validation(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- 'expression': 'str',
- 'message': 'str',
- 'message_expression': 'str',
- 'reason': 'str'
- }
-
- attribute_map = {
- 'expression': 'expression',
- 'message': 'message',
- 'message_expression': 'messageExpression',
- 'reason': 'reason'
- }
-
- def __init__(self, expression=None, message=None, message_expression=None, reason=None, local_vars_configuration=None): # noqa: E501
- """V1beta1Validation - a model defined in OpenAPI""" # noqa: E501
- if local_vars_configuration is None:
- local_vars_configuration = Configuration()
- self.local_vars_configuration = local_vars_configuration
-
- self._expression = None
- self._message = None
- self._message_expression = None
- self._reason = None
- self.discriminator = None
-
- self.expression = expression
- if message is not None:
- self.message = message
- if message_expression is not None:
- self.message_expression = message_expression
- if reason is not None:
- self.reason = reason
-
- @property
- def expression(self):
- """Gets the expression of this V1beta1Validation. # noqa: E501
-
- Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required. # noqa: E501
-
- :return: The expression of this V1beta1Validation. # noqa: E501
- :rtype: str
- """
- return self._expression
-
- @expression.setter
- def expression(self, expression):
- """Sets the expression of this V1beta1Validation.
-
- Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required. # noqa: E501
-
- :param expression: The expression of this V1beta1Validation. # noqa: E501
- :type: str
- """
- if self.local_vars_configuration.client_side_validation and expression is None: # noqa: E501
- raise ValueError("Invalid value for `expression`, must not be `None`") # noqa: E501
-
- self._expression = expression
-
- @property
- def message(self):
- """Gets the message of this V1beta1Validation. # noqa: E501
-
- Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\". # noqa: E501
-
- :return: The message of this V1beta1Validation. # noqa: E501
- :rtype: str
- """
- return self._message
-
- @message.setter
- def message(self, message):
- """Sets the message of this V1beta1Validation.
-
- Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\". # noqa: E501
-
- :param message: The message of this V1beta1Validation. # noqa: E501
- :type: str
- """
-
- self._message = message
-
- @property
- def message_expression(self):
- """Gets the message_expression of this V1beta1Validation. # noqa: E501
-
- messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\" # noqa: E501
-
- :return: The message_expression of this V1beta1Validation. # noqa: E501
- :rtype: str
- """
- return self._message_expression
-
- @message_expression.setter
- def message_expression(self, message_expression):
- """Sets the message_expression of this V1beta1Validation.
-
- messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\" # noqa: E501
-
- :param message_expression: The message_expression of this V1beta1Validation. # noqa: E501
- :type: str
- """
-
- self._message_expression = message_expression
-
- @property
- def reason(self):
- """Gets the reason of this V1beta1Validation. # noqa: E501
-
- Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client. # noqa: E501
-
- :return: The reason of this V1beta1Validation. # noqa: E501
- :rtype: str
- """
- return self._reason
-
- @reason.setter
- def reason(self, reason):
- """Sets the reason of this V1beta1Validation.
-
- Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client. # noqa: E501
-
- :param reason: The reason of this V1beta1Validation. # noqa: E501
- :type: str
- """
-
- self._reason = reason
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value
- ))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict") else item,
- value.items()
- ))
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, V1beta1Validation):
- return False
-
- return self.to_dict() == other.to_dict()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- if not isinstance(other, V1beta1Validation):
- return True
-
- return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_variable.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_variable.py
index b0dcc163d03..9dcaab5a8f6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_variable.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_variable.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class.py
index 8b24a5d261f..75b2ae91f61 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class_list.py
index 6208555a4f5..646ade264f2 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_volume_attributes_class_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocated_device_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocated_device_status.py
index 16d04113d04..4c0931bd9be 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocated_device_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocated_device_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -38,7 +38,8 @@ class V1beta2AllocatedDeviceStatus(object):
'device': 'str',
'driver': 'str',
'network_data': 'V1beta2NetworkDeviceData',
- 'pool': 'str'
+ 'pool': 'str',
+ 'share_id': 'str'
}
attribute_map = {
@@ -47,10 +48,11 @@ class V1beta2AllocatedDeviceStatus(object):
'device': 'device',
'driver': 'driver',
'network_data': 'networkData',
- 'pool': 'pool'
+ 'pool': 'pool',
+ 'share_id': 'shareID'
}
- def __init__(self, conditions=None, data=None, device=None, driver=None, network_data=None, pool=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, conditions=None, data=None, device=None, driver=None, network_data=None, pool=None, share_id=None, local_vars_configuration=None): # noqa: E501
"""V1beta2AllocatedDeviceStatus - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -62,6 +64,7 @@ class V1beta2AllocatedDeviceStatus(object):
self._driver = None
self._network_data = None
self._pool = None
+ self._share_id = None
self.discriminator = None
if conditions is not None:
@@ -73,6 +76,8 @@ class V1beta2AllocatedDeviceStatus(object):
if network_data is not None:
self.network_data = network_data
self.pool = pool
+ if share_id is not None:
+ self.share_id = share_id
@property
def conditions(self):
@@ -216,6 +221,29 @@ class V1beta2AllocatedDeviceStatus(object):
self._pool = pool
+ @property
+ def share_id(self):
+ """Gets the share_id of this V1beta2AllocatedDeviceStatus. # noqa: E501
+
+ ShareID uniquely identifies an individual allocation share of the device. # noqa: E501
+
+ :return: The share_id of this V1beta2AllocatedDeviceStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._share_id
+
+ @share_id.setter
+ def share_id(self, share_id):
+ """Sets the share_id of this V1beta2AllocatedDeviceStatus.
+
+ ShareID uniquely identifies an individual allocation share of the device. # noqa: E501
+
+ :param share_id: The share_id of this V1beta2AllocatedDeviceStatus. # noqa: E501
+ :type: str
+ """
+
+ self._share_id = share_id
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocation_result.py
index c67374469f2..b81981510dd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_allocation_result.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -33,31 +33,59 @@ class V1beta2AllocationResult(object):
and the value is json key in definition.
"""
openapi_types = {
+ 'allocation_timestamp': 'datetime',
'devices': 'V1beta2DeviceAllocationResult',
'node_selector': 'V1NodeSelector'
}
attribute_map = {
+ 'allocation_timestamp': 'allocationTimestamp',
'devices': 'devices',
'node_selector': 'nodeSelector'
}
- def __init__(self, devices=None, node_selector=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, allocation_timestamp=None, devices=None, node_selector=None, local_vars_configuration=None): # noqa: E501
"""V1beta2AllocationResult - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._allocation_timestamp = None
self._devices = None
self._node_selector = None
self.discriminator = None
+ if allocation_timestamp is not None:
+ self.allocation_timestamp = allocation_timestamp
if devices is not None:
self.devices = devices
if node_selector is not None:
self.node_selector = node_selector
@property
+ def allocation_timestamp(self):
+ """Gets the allocation_timestamp of this V1beta2AllocationResult. # noqa: E501
+
+ AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E501
+
+ :return: The allocation_timestamp of this V1beta2AllocationResult. # noqa: E501
+ :rtype: datetime
+ """
+ return self._allocation_timestamp
+
+ @allocation_timestamp.setter
+ def allocation_timestamp(self, allocation_timestamp):
+ """Sets the allocation_timestamp of this V1beta2AllocationResult.
+
+ AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E501
+
+ :param allocation_timestamp: The allocation_timestamp of this V1beta2AllocationResult. # noqa: E501
+ :type: datetime
+ """
+
+ self._allocation_timestamp = allocation_timestamp
+
+ @property
def devices(self):
"""Gets the devices of this V1beta2AllocationResult. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_request_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_request_policy.py
new file mode 100644
index 00000000000..5de01c1dd7e
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_request_policy.py
@@ -0,0 +1,176 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta2CapacityRequestPolicy(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'default': 'str',
+ 'valid_range': 'V1beta2CapacityRequestPolicyRange',
+ 'valid_values': 'list[str]'
+ }
+
+ attribute_map = {
+ 'default': 'default',
+ 'valid_range': 'validRange',
+ 'valid_values': 'validValues'
+ }
+
+ def __init__(self, default=None, valid_range=None, valid_values=None, local_vars_configuration=None): # noqa: E501
+ """V1beta2CapacityRequestPolicy - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._default = None
+ self._valid_range = None
+ self._valid_values = None
+ self.discriminator = None
+
+ if default is not None:
+ self.default = default
+ if valid_range is not None:
+ self.valid_range = valid_range
+ if valid_values is not None:
+ self.valid_values = valid_values
+
+ @property
+ def default(self):
+ """Gets the default of this V1beta2CapacityRequestPolicy. # noqa: E501
+
+ Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity. # noqa: E501
+
+ :return: The default of this V1beta2CapacityRequestPolicy. # noqa: E501
+ :rtype: str
+ """
+ return self._default
+
+ @default.setter
+ def default(self, default):
+ """Sets the default of this V1beta2CapacityRequestPolicy.
+
+ Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity. # noqa: E501
+
+ :param default: The default of this V1beta2CapacityRequestPolicy. # noqa: E501
+ :type: str
+ """
+
+ self._default = default
+
+ @property
+ def valid_range(self):
+ """Gets the valid_range of this V1beta2CapacityRequestPolicy. # noqa: E501
+
+
+ :return: The valid_range of this V1beta2CapacityRequestPolicy. # noqa: E501
+ :rtype: V1beta2CapacityRequestPolicyRange
+ """
+ return self._valid_range
+
+ @valid_range.setter
+ def valid_range(self, valid_range):
+ """Sets the valid_range of this V1beta2CapacityRequestPolicy.
+
+
+ :param valid_range: The valid_range of this V1beta2CapacityRequestPolicy. # noqa: E501
+ :type: V1beta2CapacityRequestPolicyRange
+ """
+
+ self._valid_range = valid_range
+
+ @property
+ def valid_values(self):
+ """Gets the valid_values of this V1beta2CapacityRequestPolicy. # noqa: E501
+
+ ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. # noqa: E501
+
+ :return: The valid_values of this V1beta2CapacityRequestPolicy. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._valid_values
+
+ @valid_values.setter
+ def valid_values(self, valid_values):
+ """Sets the valid_values of this V1beta2CapacityRequestPolicy.
+
+ ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. # noqa: E501
+
+ :param valid_values: The valid_values of this V1beta2CapacityRequestPolicy. # noqa: E501
+ :type: list[str]
+ """
+
+ self._valid_values = valid_values
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta2CapacityRequestPolicy):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta2CapacityRequestPolicy):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_request_policy_range.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_request_policy_range.py
new file mode 100644
index 00000000000..6e45976998a
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_request_policy_range.py
@@ -0,0 +1,179 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta2CapacityRequestPolicyRange(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'max': 'str',
+ 'min': 'str',
+ 'step': 'str'
+ }
+
+ attribute_map = {
+ 'max': 'max',
+ 'min': 'min',
+ 'step': 'step'
+ }
+
+ def __init__(self, max=None, min=None, step=None, local_vars_configuration=None): # noqa: E501
+ """V1beta2CapacityRequestPolicyRange - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._max = None
+ self._min = None
+ self._step = None
+ self.discriminator = None
+
+ if max is not None:
+ self.max = max
+ self.min = min
+ if step is not None:
+ self.step = step
+
+ @property
+ def max(self):
+ """Gets the max of this V1beta2CapacityRequestPolicyRange. # noqa: E501
+
+ Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. # noqa: E501
+
+ :return: The max of this V1beta2CapacityRequestPolicyRange. # noqa: E501
+ :rtype: str
+ """
+ return self._max
+
+ @max.setter
+ def max(self, max):
+ """Sets the max of this V1beta2CapacityRequestPolicyRange.
+
+ Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. # noqa: E501
+
+ :param max: The max of this V1beta2CapacityRequestPolicyRange. # noqa: E501
+ :type: str
+ """
+
+ self._max = max
+
+ @property
+ def min(self):
+ """Gets the min of this V1beta2CapacityRequestPolicyRange. # noqa: E501
+
+ Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. # noqa: E501
+
+ :return: The min of this V1beta2CapacityRequestPolicyRange. # noqa: E501
+ :rtype: str
+ """
+ return self._min
+
+ @min.setter
+ def min(self, min):
+ """Sets the min of this V1beta2CapacityRequestPolicyRange.
+
+ Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. # noqa: E501
+
+ :param min: The min of this V1beta2CapacityRequestPolicyRange. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and min is None: # noqa: E501
+ raise ValueError("Invalid value for `min`, must not be `None`") # noqa: E501
+
+ self._min = min
+
+ @property
+ def step(self):
+ """Gets the step of this V1beta2CapacityRequestPolicyRange. # noqa: E501
+
+ Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value. # noqa: E501
+
+ :return: The step of this V1beta2CapacityRequestPolicyRange. # noqa: E501
+ :rtype: str
+ """
+ return self._step
+
+ @step.setter
+ def step(self, step):
+ """Sets the step of this V1beta2CapacityRequestPolicyRange.
+
+ Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value. # noqa: E501
+
+ :param step: The step of this V1beta2CapacityRequestPolicyRange. # noqa: E501
+ :type: str
+ """
+
+ self._step = step
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta2CapacityRequestPolicyRange):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta2CapacityRequestPolicyRange):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_requirements.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_requirements.py
new file mode 100644
index 00000000000..20120ff172d
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_capacity_requirements.py
@@ -0,0 +1,122 @@
+# 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.34
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1beta2CapacityRequirements(object):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ openapi_types = {
+ 'requests': 'dict(str, str)'
+ }
+
+ attribute_map = {
+ 'requests': 'requests'
+ }
+
+ def __init__(self, requests=None, local_vars_configuration=None): # noqa: E501
+ """V1beta2CapacityRequirements - a model defined in OpenAPI""" # noqa: E501
+ if local_vars_configuration is None:
+ local_vars_configuration = Configuration()
+ self.local_vars_configuration = local_vars_configuration
+
+ self._requests = None
+ self.discriminator = None
+
+ if requests is not None:
+ self.requests = requests
+
+ @property
+ def requests(self):
+ """Gets the requests of this V1beta2CapacityRequirements. # noqa: E501
+
+ Requests represent individual device resource requests for distinct resources, all of which must be provided by the device. This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[<domain>].<name>.compareTo(quantity(<request quantity>)) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. # noqa: E501
+
+ :return: The requests of this V1beta2CapacityRequirements. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._requests
+
+ @requests.setter
+ def requests(self, requests):
+ """Sets the requests of this V1beta2CapacityRequirements.
+
+ Requests represent individual device resource requests for distinct resources, all of which must be provided by the device. This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[<domain>].<name>.compareTo(quantity(<request quantity>)) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. # noqa: E501
+
+ :param requests: The requests of this V1beta2CapacityRequirements. # noqa: E501
+ :type: dict(str, str)
+ """
+
+ self._requests = requests
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.openapi_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, V1beta2CapacityRequirements):
+ return False
+
+ return self.to_dict() == other.to_dict()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ if not isinstance(other, V1beta2CapacityRequirements):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_cel_device_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_cel_device_selector.py
index 03d793a5eb6..ac71d42d49f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_cel_device_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_cel_device_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -55,7 +55,7 @@ class V1beta2CELDeviceSelector(object):
def expression(self):
"""Gets the expression of this V1beta2CELDeviceSelector. # noqa: E501
- Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
+ Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
:return: The expression of this V1beta2CELDeviceSelector. # noqa: E501
:rtype: str
@@ -66,7 +66,7 @@ class V1beta2CELDeviceSelector(object):
def expression(self, expression):
"""Sets the expression of this V1beta2CELDeviceSelector.
- Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
+ Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501
:param expression: The expression of this V1beta2CELDeviceSelector. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter.py
index d45ac2f69dc..d09897adfa0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter_set.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter_set.py
index ed3608b00ac..2ba6f7abdd8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter_set.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_counter_set.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device.py
index efb1fe22e03..cfc80b81c53 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -34,7 +34,11 @@ class V1beta2Device(object):
"""
openapi_types = {
'all_nodes': 'bool',
+ 'allow_multiple_allocations': 'bool',
'attributes': 'dict(str, V1beta2DeviceAttribute)',
+ 'binding_conditions': 'list[str]',
+ 'binding_failure_conditions': 'list[str]',
+ 'binds_to_node': 'bool',
'capacity': 'dict(str, V1beta2DeviceCapacity)',
'consumes_counters': 'list[V1beta2DeviceCounterConsumption]',
'name': 'str',
@@ -45,7 +49,11 @@ class V1beta2Device(object):
attribute_map = {
'all_nodes': 'allNodes',
+ 'allow_multiple_allocations': 'allowMultipleAllocations',
'attributes': 'attributes',
+ 'binding_conditions': 'bindingConditions',
+ 'binding_failure_conditions': 'bindingFailureConditions',
+ 'binds_to_node': 'bindsToNode',
'capacity': 'capacity',
'consumes_counters': 'consumesCounters',
'name': 'name',
@@ -54,14 +62,18 @@ class V1beta2Device(object):
'taints': 'taints'
}
- def __init__(self, all_nodes=None, attributes=None, capacity=None, consumes_counters=None, name=None, node_name=None, node_selector=None, taints=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, all_nodes=None, allow_multiple_allocations=None, attributes=None, binding_conditions=None, binding_failure_conditions=None, binds_to_node=None, capacity=None, consumes_counters=None, name=None, node_name=None, node_selector=None, taints=None, local_vars_configuration=None): # noqa: E501
"""V1beta2Device - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._all_nodes = None
+ self._allow_multiple_allocations = None
self._attributes = None
+ self._binding_conditions = None
+ self._binding_failure_conditions = None
+ self._binds_to_node = None
self._capacity = None
self._consumes_counters = None
self._name = None
@@ -72,8 +84,16 @@ class V1beta2Device(object):
if all_nodes is not None:
self.all_nodes = all_nodes
+ if allow_multiple_allocations is not None:
+ self.allow_multiple_allocations = allow_multiple_allocations
if attributes is not None:
self.attributes = attributes
+ if binding_conditions is not None:
+ self.binding_conditions = binding_conditions
+ if binding_failure_conditions is not None:
+ self.binding_failure_conditions = binding_failure_conditions
+ if binds_to_node is not None:
+ self.binds_to_node = binds_to_node
if capacity is not None:
self.capacity = capacity
if consumes_counters is not None:
@@ -110,6 +130,29 @@ class V1beta2Device(object):
self._all_nodes = all_nodes
@property
+ def allow_multiple_allocations(self):
+ """Gets the allow_multiple_allocations of this V1beta2Device. # noqa: E501
+
+ AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. # noqa: E501
+
+ :return: The allow_multiple_allocations of this V1beta2Device. # noqa: E501
+ :rtype: bool
+ """
+ return self._allow_multiple_allocations
+
+ @allow_multiple_allocations.setter
+ def allow_multiple_allocations(self, allow_multiple_allocations):
+ """Sets the allow_multiple_allocations of this V1beta2Device.
+
+ AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. # noqa: E501
+
+ :param allow_multiple_allocations: The allow_multiple_allocations of this V1beta2Device. # noqa: E501
+ :type: bool
+ """
+
+ self._allow_multiple_allocations = allow_multiple_allocations
+
+ @property
def attributes(self):
"""Gets the attributes of this V1beta2Device. # noqa: E501
@@ -133,6 +176,75 @@ class V1beta2Device(object):
self._attributes = attributes
@property
+ def binding_conditions(self):
+ """Gets the binding_conditions of this V1beta2Device. # noqa: E501
+
+ BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_conditions of this V1beta2Device. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_conditions
+
+ @binding_conditions.setter
+ def binding_conditions(self, binding_conditions):
+ """Sets the binding_conditions of this V1beta2Device.
+
+ BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_conditions: The binding_conditions of this V1beta2Device. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_conditions = binding_conditions
+
+ @property
+ def binding_failure_conditions(self):
+ """Gets the binding_failure_conditions of this V1beta2Device. # noqa: E501
+
+ BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is set to \"True\", a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_failure_conditions of this V1beta2Device. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_failure_conditions
+
+ @binding_failure_conditions.setter
+ def binding_failure_conditions(self, binding_failure_conditions):
+ """Sets the binding_failure_conditions of this V1beta2Device.
+
+ BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is set to \"True\", a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_failure_conditions: The binding_failure_conditions of this V1beta2Device. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_failure_conditions = binding_failure_conditions
+
+ @property
+ def binds_to_node(self):
+ """Gets the binds_to_node of this V1beta2Device. # noqa: E501
+
+ BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binds_to_node of this V1beta2Device. # noqa: E501
+ :rtype: bool
+ """
+ return self._binds_to_node
+
+ @binds_to_node.setter
+ def binds_to_node(self, binds_to_node):
+ """Sets the binds_to_node of this V1beta2Device.
+
+ BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binds_to_node: The binds_to_node of this V1beta2Device. # noqa: E501
+ :type: bool
+ """
+
+ self._binds_to_node = binds_to_node
+
+ @property
def capacity(self):
"""Gets the capacity of this V1beta2Device. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_configuration.py
index 571811e47dd..7da14f5f7b0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_result.py
index 60377c4b89d..cafcb10bf8f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_allocation_result.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_attribute.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_attribute.py
index 10ef98c34c3..e8890a71480 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_attribute.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_attribute.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_capacity.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_capacity.py
index 3f6891c5d07..e8e001ad965 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_capacity.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_capacity.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -33,29 +33,55 @@ class V1beta2DeviceCapacity(object):
and the value is json key in definition.
"""
openapi_types = {
+ 'request_policy': 'V1beta2CapacityRequestPolicy',
'value': 'str'
}
attribute_map = {
+ 'request_policy': 'requestPolicy',
'value': 'value'
}
- def __init__(self, value=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, request_policy=None, value=None, local_vars_configuration=None): # noqa: E501
"""V1beta2DeviceCapacity - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._request_policy = None
self._value = None
self.discriminator = None
+ if request_policy is not None:
+ self.request_policy = request_policy
self.value = value
@property
+ def request_policy(self):
+ """Gets the request_policy of this V1beta2DeviceCapacity. # noqa: E501
+
+
+ :return: The request_policy of this V1beta2DeviceCapacity. # noqa: E501
+ :rtype: V1beta2CapacityRequestPolicy
+ """
+ return self._request_policy
+
+ @request_policy.setter
+ def request_policy(self, request_policy):
+ """Sets the request_policy of this V1beta2DeviceCapacity.
+
+
+ :param request_policy: The request_policy of this V1beta2DeviceCapacity. # noqa: E501
+ :type: V1beta2CapacityRequestPolicy
+ """
+
+ self._request_policy = request_policy
+
+ @property
def value(self):
"""Gets the value of this V1beta2DeviceCapacity. # noqa: E501
- Value defines how much of a certain device capacity is available. # noqa: E501
+ Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value. # noqa: E501
:return: The value of this V1beta2DeviceCapacity. # noqa: E501
:rtype: str
@@ -66,7 +92,7 @@ class V1beta2DeviceCapacity(object):
def value(self, value):
"""Sets the value of this V1beta2DeviceCapacity.
- Value defines how much of a certain device capacity is available. # noqa: E501
+ Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value. # noqa: E501
:param value: The value of this V1beta2DeviceCapacity. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim.py
index 62b9def46e2..eedf20ad129 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim_configuration.py
index c2099f40893..07d35a687ce 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_claim_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class.py
index 531489b965a..74645cbf61b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_configuration.py
index 1a002051482..e18d2eb2da9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_list.py
index 65499133484..8d1e59cd8cb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_spec.py
index 472a84d05e9..8c906c06d33 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_class_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -34,26 +34,31 @@ class V1beta2DeviceClassSpec(object):
"""
openapi_types = {
'config': 'list[V1beta2DeviceClassConfiguration]',
+ 'extended_resource_name': 'str',
'selectors': 'list[V1beta2DeviceSelector]'
}
attribute_map = {
'config': 'config',
+ 'extended_resource_name': 'extendedResourceName',
'selectors': 'selectors'
}
- def __init__(self, config=None, selectors=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, config=None, extended_resource_name=None, selectors=None, local_vars_configuration=None): # noqa: E501
"""V1beta2DeviceClassSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._config = None
+ self._extended_resource_name = None
self._selectors = None
self.discriminator = None
if config is not None:
self.config = config
+ if extended_resource_name is not None:
+ self.extended_resource_name = extended_resource_name
if selectors is not None:
self.selectors = selectors
@@ -81,6 +86,29 @@ class V1beta2DeviceClassSpec(object):
self._config = config
@property
+ def extended_resource_name(self):
+ """Gets the extended_resource_name of this V1beta2DeviceClassSpec. # noqa: E501
+
+ ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E501
+
+ :return: The extended_resource_name of this V1beta2DeviceClassSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._extended_resource_name
+
+ @extended_resource_name.setter
+ def extended_resource_name(self, extended_resource_name):
+ """Sets the extended_resource_name of this V1beta2DeviceClassSpec.
+
+ ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E501
+
+ :param extended_resource_name: The extended_resource_name of this V1beta2DeviceClassSpec. # noqa: E501
+ :type: str
+ """
+
+ self._extended_resource_name = extended_resource_name
+
+ @property
def selectors(self):
"""Gets the selectors of this V1beta2DeviceClassSpec. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_constraint.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_constraint.py
index 4739349ae76..84c61887881 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_constraint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_constraint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -33,31 +33,59 @@ class V1beta2DeviceConstraint(object):
and the value is json key in definition.
"""
openapi_types = {
+ 'distinct_attribute': 'str',
'match_attribute': 'str',
'requests': 'list[str]'
}
attribute_map = {
+ 'distinct_attribute': 'distinctAttribute',
'match_attribute': 'matchAttribute',
'requests': 'requests'
}
- def __init__(self, match_attribute=None, requests=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, distinct_attribute=None, match_attribute=None, requests=None, local_vars_configuration=None): # noqa: E501
"""V1beta2DeviceConstraint - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
+ self._distinct_attribute = None
self._match_attribute = None
self._requests = None
self.discriminator = None
+ if distinct_attribute is not None:
+ self.distinct_attribute = distinct_attribute
if match_attribute is not None:
self.match_attribute = match_attribute
if requests is not None:
self.requests = requests
@property
+ def distinct_attribute(self):
+ """Gets the distinct_attribute of this V1beta2DeviceConstraint. # noqa: E501
+
+ DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices. This acts as the inverse of MatchAttribute. This constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation. This is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs. # noqa: E501
+
+ :return: The distinct_attribute of this V1beta2DeviceConstraint. # noqa: E501
+ :rtype: str
+ """
+ return self._distinct_attribute
+
+ @distinct_attribute.setter
+ def distinct_attribute(self, distinct_attribute):
+ """Sets the distinct_attribute of this V1beta2DeviceConstraint.
+
+ DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices. This acts as the inverse of MatchAttribute. This constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation. This is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs. # noqa: E501
+
+ :param distinct_attribute: The distinct_attribute of this V1beta2DeviceConstraint. # noqa: E501
+ :type: str
+ """
+
+ self._distinct_attribute = distinct_attribute
+
+ @property
def match_attribute(self):
"""Gets the match_attribute of this V1beta2DeviceConstraint. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_counter_consumption.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_counter_consumption.py
index 4ab85bfac55..6e5de3d799a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_counter_consumption.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_counter_consumption.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request.py
index eea80ef36e7..a254789ffa5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request_allocation_result.py
index ad66e21ecfd..3d724ebf12b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_request_allocation_result.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -34,42 +34,62 @@ class V1beta2DeviceRequestAllocationResult(object):
"""
openapi_types = {
'admin_access': 'bool',
+ 'binding_conditions': 'list[str]',
+ 'binding_failure_conditions': 'list[str]',
+ 'consumed_capacity': 'dict(str, str)',
'device': 'str',
'driver': 'str',
'pool': 'str',
'request': 'str',
+ 'share_id': 'str',
'tolerations': 'list[V1beta2DeviceToleration]'
}
attribute_map = {
'admin_access': 'adminAccess',
+ 'binding_conditions': 'bindingConditions',
+ 'binding_failure_conditions': 'bindingFailureConditions',
+ 'consumed_capacity': 'consumedCapacity',
'device': 'device',
'driver': 'driver',
'pool': 'pool',
'request': 'request',
+ 'share_id': 'shareID',
'tolerations': 'tolerations'
}
- def __init__(self, admin_access=None, device=None, driver=None, pool=None, request=None, tolerations=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, admin_access=None, binding_conditions=None, binding_failure_conditions=None, consumed_capacity=None, device=None, driver=None, pool=None, request=None, share_id=None, tolerations=None, local_vars_configuration=None): # noqa: E501
"""V1beta2DeviceRequestAllocationResult - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._admin_access = None
+ self._binding_conditions = None
+ self._binding_failure_conditions = None
+ self._consumed_capacity = None
self._device = None
self._driver = None
self._pool = None
self._request = None
+ self._share_id = None
self._tolerations = None
self.discriminator = None
if admin_access is not None:
self.admin_access = admin_access
+ if binding_conditions is not None:
+ self.binding_conditions = binding_conditions
+ if binding_failure_conditions is not None:
+ self.binding_failure_conditions = binding_failure_conditions
+ if consumed_capacity is not None:
+ self.consumed_capacity = consumed_capacity
self.device = device
self.driver = driver
self.pool = pool
self.request = request
+ if share_id is not None:
+ self.share_id = share_id
if tolerations is not None:
self.tolerations = tolerations
@@ -97,6 +117,75 @@ class V1beta2DeviceRequestAllocationResult(object):
self._admin_access = admin_access
@property
+ def binding_conditions(self):
+ """Gets the binding_conditions of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+
+ BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_conditions of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_conditions
+
+ @binding_conditions.setter
+ def binding_conditions(self, binding_conditions):
+ """Sets the binding_conditions of this V1beta2DeviceRequestAllocationResult.
+
+ BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_conditions: The binding_conditions of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_conditions = binding_conditions
+
+ @property
+ def binding_failure_conditions(self):
+ """Gets the binding_failure_conditions of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+
+ BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :return: The binding_failure_conditions of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._binding_failure_conditions
+
+ @binding_failure_conditions.setter
+ def binding_failure_conditions(self, binding_failure_conditions):
+ """Sets the binding_failure_conditions of this V1beta2DeviceRequestAllocationResult.
+
+ BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501
+
+ :param binding_failure_conditions: The binding_failure_conditions of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+ :type: list[str]
+ """
+
+ self._binding_failure_conditions = binding_failure_conditions
+
+ @property
+ def consumed_capacity(self):
+ """Gets the consumed_capacity of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+
+ ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). The total consumed capacity for each device must not exceed the DeviceCapacity's Value. This field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero. # noqa: E501
+
+ :return: The consumed_capacity of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+ :rtype: dict(str, str)
+ """
+ return self._consumed_capacity
+
+ @consumed_capacity.setter
+ def consumed_capacity(self, consumed_capacity):
+ """Sets the consumed_capacity of this V1beta2DeviceRequestAllocationResult.
+
+ ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). The total consumed capacity for each device must not exceed the DeviceCapacity's Value. This field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero. # noqa: E501
+
+ :param consumed_capacity: The consumed_capacity of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+ :type: dict(str, str)
+ """
+
+ self._consumed_capacity = consumed_capacity
+
+ @property
def device(self):
"""Gets the device of this V1beta2DeviceRequestAllocationResult. # noqa: E501
@@ -197,6 +286,29 @@ class V1beta2DeviceRequestAllocationResult(object):
self._request = request
@property
+ def share_id(self):
+ """Gets the share_id of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+
+ ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device. # noqa: E501
+
+ :return: The share_id of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+ :rtype: str
+ """
+ return self._share_id
+
+ @share_id.setter
+ def share_id(self, share_id):
+ """Sets the share_id of this V1beta2DeviceRequestAllocationResult.
+
+ ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device. # noqa: E501
+
+ :param share_id: The share_id of this V1beta2DeviceRequestAllocationResult. # noqa: E501
+ :type: str
+ """
+
+ self._share_id = share_id
+
+ @property
def tolerations(self):
"""Gets the tolerations of this V1beta2DeviceRequestAllocationResult. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_selector.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_selector.py
index fc474bdc833..d6b471a5992 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_selector.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_selector.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_sub_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_sub_request.py
index 62344df3c9a..380cb38b3dc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_sub_request.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_sub_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -34,6 +34,7 @@ class V1beta2DeviceSubRequest(object):
"""
openapi_types = {
'allocation_mode': 'str',
+ 'capacity': 'V1beta2CapacityRequirements',
'count': 'int',
'device_class_name': 'str',
'name': 'str',
@@ -43,6 +44,7 @@ class V1beta2DeviceSubRequest(object):
attribute_map = {
'allocation_mode': 'allocationMode',
+ 'capacity': 'capacity',
'count': 'count',
'device_class_name': 'deviceClassName',
'name': 'name',
@@ -50,13 +52,14 @@ class V1beta2DeviceSubRequest(object):
'tolerations': 'tolerations'
}
- def __init__(self, allocation_mode=None, count=None, device_class_name=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, allocation_mode=None, capacity=None, count=None, device_class_name=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
"""V1beta2DeviceSubRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._allocation_mode = None
+ self._capacity = None
self._count = None
self._device_class_name = None
self._name = None
@@ -66,6 +69,8 @@ class V1beta2DeviceSubRequest(object):
if allocation_mode is not None:
self.allocation_mode = allocation_mode
+ if capacity is not None:
+ self.capacity = capacity
if count is not None:
self.count = count
self.device_class_name = device_class_name
@@ -99,6 +104,27 @@ class V1beta2DeviceSubRequest(object):
self._allocation_mode = allocation_mode
@property
+ def capacity(self):
+ """Gets the capacity of this V1beta2DeviceSubRequest. # noqa: E501
+
+
+ :return: The capacity of this V1beta2DeviceSubRequest. # noqa: E501
+ :rtype: V1beta2CapacityRequirements
+ """
+ return self._capacity
+
+ @capacity.setter
+ def capacity(self, capacity):
+ """Sets the capacity of this V1beta2DeviceSubRequest.
+
+
+ :param capacity: The capacity of this V1beta2DeviceSubRequest. # noqa: E501
+ :type: V1beta2CapacityRequirements
+ """
+
+ self._capacity = capacity
+
+ @property
def count(self):
"""Gets the count of this V1beta2DeviceSubRequest. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_taint.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_taint.py
index 5eeb33f0b6a..0cf636b3681 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_taint.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_taint.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_toleration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_toleration.py
index 283d2fbca5b..dc641bdd47f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_toleration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_device_toleration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_exact_device_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_exact_device_request.py
index 282d21aae66..43de79f7b3c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_exact_device_request.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_exact_device_request.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
@@ -35,6 +35,7 @@ class V1beta2ExactDeviceRequest(object):
openapi_types = {
'admin_access': 'bool',
'allocation_mode': 'str',
+ 'capacity': 'V1beta2CapacityRequirements',
'count': 'int',
'device_class_name': 'str',
'selectors': 'list[V1beta2DeviceSelector]',
@@ -44,13 +45,14 @@ class V1beta2ExactDeviceRequest(object):
attribute_map = {
'admin_access': 'adminAccess',
'allocation_mode': 'allocationMode',
+ 'capacity': 'capacity',
'count': 'count',
'device_class_name': 'deviceClassName',
'selectors': 'selectors',
'tolerations': 'tolerations'
}
- def __init__(self, admin_access=None, allocation_mode=None, count=None, device_class_name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, admin_access=None, allocation_mode=None, capacity=None, count=None, device_class_name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501
"""V1beta2ExactDeviceRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -58,6 +60,7 @@ class V1beta2ExactDeviceRequest(object):
self._admin_access = None
self._allocation_mode = None
+ self._capacity = None
self._count = None
self._device_class_name = None
self._selectors = None
@@ -68,6 +71,8 @@ class V1beta2ExactDeviceRequest(object):
self.admin_access = admin_access
if allocation_mode is not None:
self.allocation_mode = allocation_mode
+ if capacity is not None:
+ self.capacity = capacity
if count is not None:
self.count = count
self.device_class_name = device_class_name
@@ -123,6 +128,27 @@ class V1beta2ExactDeviceRequest(object):
self._allocation_mode = allocation_mode
@property
+ def capacity(self):
+ """Gets the capacity of this V1beta2ExactDeviceRequest. # noqa: E501
+
+
+ :return: The capacity of this V1beta2ExactDeviceRequest. # noqa: E501
+ :rtype: V1beta2CapacityRequirements
+ """
+ return self._capacity
+
+ @capacity.setter
+ def capacity(self, capacity):
+ """Sets the capacity of this V1beta2ExactDeviceRequest.
+
+
+ :param capacity: The capacity of this V1beta2ExactDeviceRequest. # noqa: E501
+ :type: V1beta2CapacityRequirements
+ """
+
+ self._capacity = capacity
+
+ @property
def count(self):
"""Gets the count of this V1beta2ExactDeviceRequest. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_network_device_data.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_network_device_data.py
index a6a9e07188c..be24b0ca93c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_network_device_data.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_network_device_data.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_opaque_device_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_opaque_device_configuration.py
index 0165cb7c42b..88070e1f3c4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_opaque_device_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_opaque_device_configuration.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim.py
index 33071399c1e..5900cdfc6f9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_consumer_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_consumer_reference.py
index a465e13289c..2ec7222076a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_consumer_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_consumer_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_list.py
index 6c0fc4a25bc..2f48f31c3df 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_spec.py
index ba32d55f5da..117b886c711 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_status.py
index 382042f235a..9f275f23a3b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template.py
index e05a48adf9f..c76d4a47c3e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_list.py
index f6d2c15c025..e99164c4aef 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_spec.py
index 05068448e53..6be38d7e733 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_claim_template_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_pool.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_pool.py
index 65ce903ea16..d1713cd2ee9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_pool.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_pool.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice.py
index 73508c00470..e77b5e1388f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_list.py
index 9dffa3ab482..1dd610594a9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_spec.py
index 5bbe485f232..dc69b3d513c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta2_resource_slice_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_source.py b/contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_source.py
index 13a9797254f..6d473addefd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_status.py b/contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_status.py
index f718f70a71b..e649a8b075a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_container_resource_metric_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_cross_version_object_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v2_cross_version_object_reference.py
index b0fa259474d..3d6b12996f1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_cross_version_object_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_cross_version_object_reference.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_source.py b/contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_source.py
index e980a58d41d..ede3f181f31 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_status.py b/contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_status.py
index 46e4278af7f..88790c35ee9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_external_metric_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler.py b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler.py
index 86b491f635b..e95a59bfc47 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_behavior.py b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_behavior.py
index ff299b0231d..1b3cab9f8cb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_behavior.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_behavior.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_condition.py
index 823f852d2a7..0fdf46238b6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_condition.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_list.py b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_list.py
index 93a7e8470e4..22ce4c78284 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_list.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_spec.py
index 58ecbef2591..abd3aad76f7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_status.py b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_status.py
index b522da2891e..3285be2d999 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_horizontal_pod_autoscaler_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_policy.py
index 21019e0a0a2..3cd91575f8f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_policy.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_rules.py b/contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_rules.py
index f80c6637ff1..8459ca8873d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_rules.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_hpa_scaling_rules.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_identifier.py b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_identifier.py
index 36df80006f4..b4eb29b0ebd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_identifier.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_identifier.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_spec.py
index ce50416566c..12765139b5c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_spec.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_status.py b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_status.py
index 84a41eab063..b6a81216e2b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_target.py b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_target.py
index e6c0f93182d..275154ce032 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_target.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_target.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_value_status.py b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_value_status.py
index 5a674bd2767..2d8a801ec94 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_metric_value_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_metric_value_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_source.py b/contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_source.py
index 0d037f87f81..a41a8f25552 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_status.py b/contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_status.py
index c2f4a89d4bf..7b71fa5d7d9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_object_metric_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_source.py b/contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_source.py
index ec0a2e494fc..4ebe0334c4a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_status.py b/contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_status.py
index 7dd8a436d8f..b7aed9d273d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_pods_metric_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_source.py b/contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_source.py
index d60aa737f27..7197a23284f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_source.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_status.py b/contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_status.py
index 996504ee3cf..e962bb99dbe 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v2_resource_metric_status.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/version_info.py b/contrib/python/kubernetes/kubernetes/client/models/version_info.py
index d13e8c0f43f..17387e9d645 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/version_info.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/version_info.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/rest.py b/contrib/python/kubernetes/kubernetes/client/rest.py
index b5a33fd2d1f..bb97dfe3c74 100644
--- a/contrib/python/kubernetes/kubernetes/client/rest.py
+++ b/contrib/python/kubernetes/kubernetes/client/rest.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.33
+ The version of the OpenAPI document: release-1.34
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/config/exec_provider.py b/contrib/python/kubernetes/kubernetes/config/exec_provider.py
index ae7049ada3f..95168f7f6ef 100644
--- a/contrib/python/kubernetes/kubernetes/config/exec_provider.py
+++ b/contrib/python/kubernetes/kubernetes/config/exec_provider.py
@@ -81,6 +81,11 @@ class ExecProvider(object):
kubernetes_exec_info['spec']['response'] = previous_response
if self.cluster:
kubernetes_exec_info['spec']['cluster'] = self.cluster.value
+ if self.cluster.value.get("extensions"):
+ for extension in self.cluster.value["extensions"]:
+ if extension["name"] == "client.authentication.k8s.io/exec":
+ kubernetes_exec_info["spec"]["cluster"]["config"] = extension["extension"]
+ break
self.env['KUBERNETES_EXEC_INFO'] = json.dumps(kubernetes_exec_info)
process = subprocess.Popen(
diff --git a/contrib/python/kubernetes/kubernetes/dynamic/discovery.py b/contrib/python/kubernetes/kubernetes/dynamic/discovery.py
index c00dfa3ef8b..3dd28af2683 100644
--- a/contrib/python/kubernetes/kubernetes/dynamic/discovery.py
+++ b/contrib/python/kubernetes/kubernetes/dynamic/discovery.py
@@ -22,6 +22,7 @@ from functools import partial
from collections import defaultdict
from abc import abstractmethod, abstractproperty
+from json.decoder import JSONDecodeError
from urllib3.exceptions import ProtocolError, MaxRetryError
from kubernetes import __version__
@@ -164,7 +165,8 @@ class Discoverer(object):
path = '/'.join(filter(None, [prefix, group, version]))
try:
resources_response = self.client.request('GET', path).resources or []
- except ServiceUnavailableError:
+ except (ServiceUnavailableError, JSONDecodeError):
+ # Handle both service unavailable errors and JSON decode errors
resources_response = []
resources_raw = list(filter(lambda resource: '/' not in resource['name'], resources_response))
diff --git a/contrib/python/kubernetes/kubernetes/watch/watch.py b/contrib/python/kubernetes/kubernetes/watch/watch.py
index 2ede8638c9a..e8fe6c63e61 100644
--- a/contrib/python/kubernetes/kubernetes/watch/watch.py
+++ b/contrib/python/kubernetes/kubernetes/watch/watch.py
@@ -179,6 +179,7 @@ class Watch(object):
# We want to ensure we are returning within that timeout.
disable_retries = ('timeout_seconds' in kwargs)
retry_after_410 = False
+ deserialize = kwargs.pop('deserialize', True)
while True:
resp = func(*args, **kwargs)
try:
@@ -186,7 +187,11 @@ class Watch(object):
# unmarshal when we are receiving events from watch,
# return raw string when we are streaming log
if watch_arg == "watch":
- event = self.unmarshal_event(line, return_type)
+ if deserialize:
+ event = self.unmarshal_event(line, return_type)
+ else:
+ # Only do basic JSON parsing, no deserialize
+ event = json.loads(line)
if isinstance(event, dict) \
and event['type'] == 'ERROR':
obj = event['raw_object']
diff --git a/contrib/python/kubernetes/ya.make b/contrib/python/kubernetes/ya.make
index 6b2c6fd83ba..d3b903fc5be 100644
--- a/contrib/python/kubernetes/ya.make
+++ b/contrib/python/kubernetes/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(33.1.0)
+VERSION(34.1.0)
LICENSE(Apache-2.0)
@@ -11,7 +11,6 @@ PEERDIR(
contrib/python/certifi
contrib/python/durationpy
contrib/python/google-auth
- contrib/python/oauthlib
contrib/python/python-dateutil
contrib/python/requests
contrib/python/requests-oauthlib
@@ -78,6 +77,7 @@ PY_SRCS(
kubernetes/client/api/rbac_authorization_api.py
kubernetes/client/api/rbac_authorization_v1_api.py
kubernetes/client/api/resource_api.py
+ kubernetes/client/api/resource_v1_api.py
kubernetes/client/api/resource_v1alpha3_api.py
kubernetes/client/api/resource_v1beta1_api.py
kubernetes/client/api/resource_v1beta2_api.py
@@ -106,15 +106,19 @@ PY_SRCS(
kubernetes/client/models/core_v1_event.py
kubernetes/client/models/core_v1_event_list.py
kubernetes/client/models/core_v1_event_series.py
+ kubernetes/client/models/core_v1_resource_claim.py
kubernetes/client/models/discovery_v1_endpoint_port.py
kubernetes/client/models/events_v1_event.py
kubernetes/client/models/events_v1_event_list.py
kubernetes/client/models/events_v1_event_series.py
kubernetes/client/models/flowcontrol_v1_subject.py
kubernetes/client/models/rbac_v1_subject.py
+ kubernetes/client/models/resource_v1_resource_claim.py
kubernetes/client/models/storage_v1_token_request.py
kubernetes/client/models/v1_affinity.py
kubernetes/client/models/v1_aggregation_rule.py
+ kubernetes/client/models/v1_allocated_device_status.py
+ kubernetes/client/models/v1_allocation_result.py
kubernetes/client/models/v1_api_group.py
kubernetes/client/models/v1_api_group_list.py
kubernetes/client/models/v1_api_resource.py
@@ -135,6 +139,10 @@ PY_SRCS(
kubernetes/client/models/v1_binding.py
kubernetes/client/models/v1_bound_object_reference.py
kubernetes/client/models/v1_capabilities.py
+ kubernetes/client/models/v1_capacity_request_policy.py
+ kubernetes/client/models/v1_capacity_request_policy_range.py
+ kubernetes/client/models/v1_capacity_requirements.py
+ kubernetes/client/models/v1_cel_device_selector.py
kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py
kubernetes/client/models/v1_ceph_fs_volume_source.py
kubernetes/client/models/v1_certificate_signing_request.py
@@ -162,9 +170,12 @@ PY_SRCS(
kubernetes/client/models/v1_config_map_projection.py
kubernetes/client/models/v1_config_map_volume_source.py
kubernetes/client/models/v1_container.py
+ kubernetes/client/models/v1_container_extended_resource_request.py
kubernetes/client/models/v1_container_image.py
kubernetes/client/models/v1_container_port.py
kubernetes/client/models/v1_container_resize_policy.py
+ kubernetes/client/models/v1_container_restart_rule.py
+ kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py
kubernetes/client/models/v1_container_state.py
kubernetes/client/models/v1_container_state_running.py
kubernetes/client/models/v1_container_state_terminated.py
@@ -173,6 +184,8 @@ PY_SRCS(
kubernetes/client/models/v1_container_user.py
kubernetes/client/models/v1_controller_revision.py
kubernetes/client/models/v1_controller_revision_list.py
+ kubernetes/client/models/v1_counter.py
+ kubernetes/client/models/v1_counter_set.py
kubernetes/client/models/v1_cron_job.py
kubernetes/client/models/v1_cron_job_list.py
kubernetes/client/models/v1_cron_job_spec.py
@@ -215,6 +228,25 @@ PY_SRCS(
kubernetes/client/models/v1_deployment_spec.py
kubernetes/client/models/v1_deployment_status.py
kubernetes/client/models/v1_deployment_strategy.py
+ kubernetes/client/models/v1_device.py
+ kubernetes/client/models/v1_device_allocation_configuration.py
+ kubernetes/client/models/v1_device_allocation_result.py
+ kubernetes/client/models/v1_device_attribute.py
+ kubernetes/client/models/v1_device_capacity.py
+ kubernetes/client/models/v1_device_claim.py
+ kubernetes/client/models/v1_device_claim_configuration.py
+ kubernetes/client/models/v1_device_class.py
+ kubernetes/client/models/v1_device_class_configuration.py
+ kubernetes/client/models/v1_device_class_list.py
+ kubernetes/client/models/v1_device_class_spec.py
+ kubernetes/client/models/v1_device_constraint.py
+ kubernetes/client/models/v1_device_counter_consumption.py
+ kubernetes/client/models/v1_device_request.py
+ kubernetes/client/models/v1_device_request_allocation_result.py
+ kubernetes/client/models/v1_device_selector.py
+ kubernetes/client/models/v1_device_sub_request.py
+ kubernetes/client/models/v1_device_taint.py
+ kubernetes/client/models/v1_device_toleration.py
kubernetes/client/models/v1_downward_api_projection.py
kubernetes/client/models/v1_downward_api_volume_file.py
kubernetes/client/models/v1_downward_api_volume_source.py
@@ -235,6 +267,7 @@ PY_SRCS(
kubernetes/client/models/v1_ephemeral_volume_source.py
kubernetes/client/models/v1_event_source.py
kubernetes/client/models/v1_eviction.py
+ kubernetes/client/models/v1_exact_device_request.py
kubernetes/client/models/v1_exec_action.py
kubernetes/client/models/v1_exempt_priority_level_configuration.py
kubernetes/client/models/v1_expression_warning.py
@@ -242,6 +275,7 @@ PY_SRCS(
kubernetes/client/models/v1_fc_volume_source.py
kubernetes/client/models/v1_field_selector_attributes.py
kubernetes/client/models/v1_field_selector_requirement.py
+ kubernetes/client/models/v1_file_key_selector.py
kubernetes/client/models/v1_flex_persistent_volume_source.py
kubernetes/client/models/v1_flex_volume_source.py
kubernetes/client/models/v1_flocker_volume_source.py
@@ -335,6 +369,7 @@ PY_SRCS(
kubernetes/client/models/v1_namespace_list.py
kubernetes/client/models/v1_namespace_spec.py
kubernetes/client/models/v1_namespace_status.py
+ kubernetes/client/models/v1_network_device_data.py
kubernetes/client/models/v1_network_policy.py
kubernetes/client/models/v1_network_policy_egress_rule.py
kubernetes/client/models/v1_network_policy_ingress_rule.py
@@ -367,6 +402,7 @@ PY_SRCS(
kubernetes/client/models/v1_object_field_selector.py
kubernetes/client/models/v1_object_meta.py
kubernetes/client/models/v1_object_reference.py
+ kubernetes/client/models/v1_opaque_device_configuration.py
kubernetes/client/models/v1_overhead.py
kubernetes/client/models/v1_owner_reference.py
kubernetes/client/models/v1_param_kind.py
@@ -388,6 +424,7 @@ PY_SRCS(
kubernetes/client/models/v1_pod_affinity.py
kubernetes/client/models/v1_pod_affinity_term.py
kubernetes/client/models/v1_pod_anti_affinity.py
+ kubernetes/client/models/v1_pod_certificate_projection.py
kubernetes/client/models/v1_pod_condition.py
kubernetes/client/models/v1_pod_disruption_budget.py
kubernetes/client/models/v1_pod_disruption_budget_list.py
@@ -395,6 +432,7 @@ PY_SRCS(
kubernetes/client/models/v1_pod_disruption_budget_status.py
kubernetes/client/models/v1_pod_dns_config.py
kubernetes/client/models/v1_pod_dns_config_option.py
+ kubernetes/client/models/v1_pod_extended_resource_claim_status.py
kubernetes/client/models/v1_pod_failure_policy.py
kubernetes/client/models/v1_pod_failure_policy_on_exit_codes_requirement.py
kubernetes/client/models/v1_pod_failure_policy_on_pod_conditions_pattern.py
@@ -443,16 +481,26 @@ PY_SRCS(
kubernetes/client/models/v1_replication_controller_spec.py
kubernetes/client/models/v1_replication_controller_status.py
kubernetes/client/models/v1_resource_attributes.py
- kubernetes/client/models/v1_resource_claim.py
+ kubernetes/client/models/v1_resource_claim_consumer_reference.py
+ kubernetes/client/models/v1_resource_claim_list.py
+ kubernetes/client/models/v1_resource_claim_spec.py
+ kubernetes/client/models/v1_resource_claim_status.py
+ kubernetes/client/models/v1_resource_claim_template.py
+ kubernetes/client/models/v1_resource_claim_template_list.py
+ kubernetes/client/models/v1_resource_claim_template_spec.py
kubernetes/client/models/v1_resource_field_selector.py
kubernetes/client/models/v1_resource_health.py
kubernetes/client/models/v1_resource_policy_rule.py
+ kubernetes/client/models/v1_resource_pool.py
kubernetes/client/models/v1_resource_quota.py
kubernetes/client/models/v1_resource_quota_list.py
kubernetes/client/models/v1_resource_quota_spec.py
kubernetes/client/models/v1_resource_quota_status.py
kubernetes/client/models/v1_resource_requirements.py
kubernetes/client/models/v1_resource_rule.py
+ kubernetes/client/models/v1_resource_slice.py
+ kubernetes/client/models/v1_resource_slice_list.py
+ kubernetes/client/models/v1_resource_slice_spec.py
kubernetes/client/models/v1_resource_status.py
kubernetes/client/models/v1_role.py
kubernetes/client/models/v1_role_binding.py
@@ -565,6 +613,8 @@ PY_SRCS(
kubernetes/client/models/v1_volume_attachment_source.py
kubernetes/client/models/v1_volume_attachment_spec.py
kubernetes/client/models/v1_volume_attachment_status.py
+ kubernetes/client/models/v1_volume_attributes_class.py
+ kubernetes/client/models/v1_volume_attributes_class_list.py
kubernetes/client/models/v1_volume_device.py
kubernetes/client/models/v1_volume_error.py
kubernetes/client/models/v1_volume_mount.py
@@ -597,6 +647,10 @@ PY_SRCS(
kubernetes/client/models/v1alpha1_named_rule_with_operations.py
kubernetes/client/models/v1alpha1_param_kind.py
kubernetes/client/models/v1alpha1_param_ref.py
+ kubernetes/client/models/v1alpha1_pod_certificate_request.py
+ kubernetes/client/models/v1alpha1_pod_certificate_request_list.py
+ kubernetes/client/models/v1alpha1_pod_certificate_request_spec.py
+ kubernetes/client/models/v1alpha1_pod_certificate_request_status.py
kubernetes/client/models/v1alpha1_server_storage_version.py
kubernetes/client/models/v1alpha1_storage_version.py
kubernetes/client/models/v1alpha1_storage_version_condition.py
@@ -612,52 +666,20 @@ PY_SRCS(
kubernetes/client/models/v1alpha2_lease_candidate.py
kubernetes/client/models/v1alpha2_lease_candidate_list.py
kubernetes/client/models/v1alpha2_lease_candidate_spec.py
- kubernetes/client/models/v1alpha3_allocated_device_status.py
- kubernetes/client/models/v1alpha3_allocation_result.py
- kubernetes/client/models/v1alpha3_basic_device.py
kubernetes/client/models/v1alpha3_cel_device_selector.py
- kubernetes/client/models/v1alpha3_counter.py
- kubernetes/client/models/v1alpha3_counter_set.py
- kubernetes/client/models/v1alpha3_device.py
- kubernetes/client/models/v1alpha3_device_allocation_configuration.py
- kubernetes/client/models/v1alpha3_device_allocation_result.py
- kubernetes/client/models/v1alpha3_device_attribute.py
- kubernetes/client/models/v1alpha3_device_claim.py
- kubernetes/client/models/v1alpha3_device_claim_configuration.py
- kubernetes/client/models/v1alpha3_device_class.py
- kubernetes/client/models/v1alpha3_device_class_configuration.py
- kubernetes/client/models/v1alpha3_device_class_list.py
- kubernetes/client/models/v1alpha3_device_class_spec.py
- kubernetes/client/models/v1alpha3_device_constraint.py
- kubernetes/client/models/v1alpha3_device_counter_consumption.py
- kubernetes/client/models/v1alpha3_device_request.py
- kubernetes/client/models/v1alpha3_device_request_allocation_result.py
kubernetes/client/models/v1alpha3_device_selector.py
- kubernetes/client/models/v1alpha3_device_sub_request.py
kubernetes/client/models/v1alpha3_device_taint.py
kubernetes/client/models/v1alpha3_device_taint_rule.py
kubernetes/client/models/v1alpha3_device_taint_rule_list.py
kubernetes/client/models/v1alpha3_device_taint_rule_spec.py
kubernetes/client/models/v1alpha3_device_taint_selector.py
- kubernetes/client/models/v1alpha3_device_toleration.py
- kubernetes/client/models/v1alpha3_network_device_data.py
- kubernetes/client/models/v1alpha3_opaque_device_configuration.py
- kubernetes/client/models/v1alpha3_resource_claim.py
- kubernetes/client/models/v1alpha3_resource_claim_consumer_reference.py
- kubernetes/client/models/v1alpha3_resource_claim_list.py
- kubernetes/client/models/v1alpha3_resource_claim_spec.py
- kubernetes/client/models/v1alpha3_resource_claim_status.py
- kubernetes/client/models/v1alpha3_resource_claim_template.py
- kubernetes/client/models/v1alpha3_resource_claim_template_list.py
- kubernetes/client/models/v1alpha3_resource_claim_template_spec.py
- kubernetes/client/models/v1alpha3_resource_pool.py
- kubernetes/client/models/v1alpha3_resource_slice.py
- kubernetes/client/models/v1alpha3_resource_slice_list.py
- kubernetes/client/models/v1alpha3_resource_slice_spec.py
kubernetes/client/models/v1beta1_allocated_device_status.py
kubernetes/client/models/v1beta1_allocation_result.py
- kubernetes/client/models/v1beta1_audit_annotation.py
+ kubernetes/client/models/v1beta1_apply_configuration.py
kubernetes/client/models/v1beta1_basic_device.py
+ kubernetes/client/models/v1beta1_capacity_request_policy.py
+ kubernetes/client/models/v1beta1_capacity_request_policy_range.py
+ kubernetes/client/models/v1beta1_capacity_requirements.py
kubernetes/client/models/v1beta1_cel_device_selector.py
kubernetes/client/models/v1beta1_cluster_trust_bundle.py
kubernetes/client/models/v1beta1_cluster_trust_bundle_list.py
@@ -683,15 +705,22 @@ PY_SRCS(
kubernetes/client/models/v1beta1_device_sub_request.py
kubernetes/client/models/v1beta1_device_taint.py
kubernetes/client/models/v1beta1_device_toleration.py
- kubernetes/client/models/v1beta1_expression_warning.py
kubernetes/client/models/v1beta1_ip_address.py
kubernetes/client/models/v1beta1_ip_address_list.py
kubernetes/client/models/v1beta1_ip_address_spec.py
+ kubernetes/client/models/v1beta1_json_patch.py
kubernetes/client/models/v1beta1_lease_candidate.py
kubernetes/client/models/v1beta1_lease_candidate_list.py
kubernetes/client/models/v1beta1_lease_candidate_spec.py
kubernetes/client/models/v1beta1_match_condition.py
kubernetes/client/models/v1beta1_match_resources.py
+ kubernetes/client/models/v1beta1_mutating_admission_policy.py
+ kubernetes/client/models/v1beta1_mutating_admission_policy_binding.py
+ kubernetes/client/models/v1beta1_mutating_admission_policy_binding_list.py
+ kubernetes/client/models/v1beta1_mutating_admission_policy_binding_spec.py
+ kubernetes/client/models/v1beta1_mutating_admission_policy_list.py
+ kubernetes/client/models/v1beta1_mutating_admission_policy_spec.py
+ kubernetes/client/models/v1beta1_mutation.py
kubernetes/client/models/v1beta1_named_rule_with_operations.py
kubernetes/client/models/v1beta1_network_device_data.py
kubernetes/client/models/v1beta1_opaque_device_configuration.py
@@ -714,20 +743,14 @@ PY_SRCS(
kubernetes/client/models/v1beta1_service_cidr_list.py
kubernetes/client/models/v1beta1_service_cidr_spec.py
kubernetes/client/models/v1beta1_service_cidr_status.py
- kubernetes/client/models/v1beta1_type_checking.py
- kubernetes/client/models/v1beta1_validating_admission_policy.py
- kubernetes/client/models/v1beta1_validating_admission_policy_binding.py
- kubernetes/client/models/v1beta1_validating_admission_policy_binding_list.py
- kubernetes/client/models/v1beta1_validating_admission_policy_binding_spec.py
- kubernetes/client/models/v1beta1_validating_admission_policy_list.py
- kubernetes/client/models/v1beta1_validating_admission_policy_spec.py
- kubernetes/client/models/v1beta1_validating_admission_policy_status.py
- kubernetes/client/models/v1beta1_validation.py
kubernetes/client/models/v1beta1_variable.py
kubernetes/client/models/v1beta1_volume_attributes_class.py
kubernetes/client/models/v1beta1_volume_attributes_class_list.py
kubernetes/client/models/v1beta2_allocated_device_status.py
kubernetes/client/models/v1beta2_allocation_result.py
+ kubernetes/client/models/v1beta2_capacity_request_policy.py
+ kubernetes/client/models/v1beta2_capacity_request_policy_range.py
+ kubernetes/client/models/v1beta2_capacity_requirements.py
kubernetes/client/models/v1beta2_cel_device_selector.py
kubernetes/client/models/v1beta2_counter.py
kubernetes/client/models/v1beta2_counter_set.py
diff --git a/contrib/python/simplejson/py2/.dist-info/METADATA b/contrib/python/simplejson/py2/.dist-info/METADATA
index 9a1e6c550b6..e95da1917c6 100644
--- a/contrib/python/simplejson/py2/.dist-info/METADATA
+++ b/contrib/python/simplejson/py2/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: simplejson
-Version: 3.20.1
+Version: 3.20.2
Summary: Simple, fast, extensible JSON encoder/decoder for Python
Home-page: https://github.com/simplejson/simplejson
Author: Bob Ippolito
diff --git a/contrib/python/simplejson/py2/simplejson/__init__.py b/contrib/python/simplejson/py2/simplejson/__init__.py
index 8bb46f15ed9..a526d8c7823 100644
--- a/contrib/python/simplejson/py2/simplejson/__init__.py
+++ b/contrib/python/simplejson/py2/simplejson/__init__.py
@@ -118,7 +118,7 @@ Serializing multiple objects to JSON lines (newline-delimited JSON)::
"""
from __future__ import absolute_import
-__version__ = '3.20.1'
+__version__ = '3.20.2'
__all__ = [
'dump', 'dumps', 'load', 'loads',
'JSONDecoder', 'JSONDecodeError', 'JSONEncoder',
diff --git a/contrib/python/simplejson/py2/simplejson/tests/__init__.py b/contrib/python/simplejson/py2/simplejson/tests/__init__.py
index 79d1d1706f7..d9986d033a0 100644
--- a/contrib/python/simplejson/py2/simplejson/tests/__init__.py
+++ b/contrib/python/simplejson/py2/simplejson/tests/__init__.py
@@ -18,6 +18,8 @@ class TestMissingSpeedups(unittest.TestCase):
def runTest(self):
if hasattr(sys, "pypy_translation_info"):
"PyPy doesn't need speedups! :)"
+ elif getattr(getattr(sys, "implementation", None), "name", None) == "graalpy":
+ "GraalPy doesn't need speedups! :)"
elif hasattr(self, "skipTest"):
self.skipTest("_speedups.so is missing!")
diff --git a/contrib/python/simplejson/py2/simplejson/tests/test_float.py b/contrib/python/simplejson/py2/simplejson/tests/test_float.py
index a9779694728..fed1bd97cd6 100644
--- a/contrib/python/simplejson/py2/simplejson/tests/test_float.py
+++ b/contrib/python/simplejson/py2/simplejson/tests/test_float.py
@@ -1,3 +1,4 @@
+import sys
import math
from unittest import TestCase
from simplejson.compat import long_type, text_type
@@ -36,3 +37,10 @@ class TestFloat(TestCase):
self.assertEqual(int(json.dumps(num)), num)
self.assertEqual(json.loads(json.dumps(num)), num)
self.assertEqual(json.loads(text_type(json.dumps(num))), num)
+
+ def test_float_range(self):
+ try:
+ float_range = [sys.float_info.min, sys.float_info.max]
+ except AttributeError:
+ float_range = [2.2250738585072014e-308, 1.7976931348623157e+308]
+ self.assertEqual(json.loads(json.dumps(float_range)), float_range)
diff --git a/contrib/python/simplejson/py2/ya.make b/contrib/python/simplejson/py2/ya.make
index f565e0ee790..27c6bf9e27f 100644
--- a/contrib/python/simplejson/py2/ya.make
+++ b/contrib/python/simplejson/py2/ya.make
@@ -2,7 +2,7 @@
PY2_LIBRARY()
-VERSION(3.20.1)
+VERSION(3.20.2)
LICENSE(MIT)
diff --git a/contrib/python/simplejson/py3/.dist-info/METADATA b/contrib/python/simplejson/py3/.dist-info/METADATA
index bee5586b12d..f685f2bb485 100644
--- a/contrib/python/simplejson/py3/.dist-info/METADATA
+++ b/contrib/python/simplejson/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: simplejson
-Version: 3.20.1
+Version: 3.20.2
Summary: Simple, fast, extensible JSON encoder/decoder for Python
Home-page: https://github.com/simplejson/simplejson
Author: Bob Ippolito
diff --git a/contrib/python/simplejson/py3/simplejson/__init__.py b/contrib/python/simplejson/py3/simplejson/__init__.py
index 8bb46f15ed9..a526d8c7823 100644
--- a/contrib/python/simplejson/py3/simplejson/__init__.py
+++ b/contrib/python/simplejson/py3/simplejson/__init__.py
@@ -118,7 +118,7 @@ Serializing multiple objects to JSON lines (newline-delimited JSON)::
"""
from __future__ import absolute_import
-__version__ = '3.20.1'
+__version__ = '3.20.2'
__all__ = [
'dump', 'dumps', 'load', 'loads',
'JSONDecoder', 'JSONDecodeError', 'JSONEncoder',
diff --git a/contrib/python/simplejson/py3/simplejson/tests/__init__.py b/contrib/python/simplejson/py3/simplejson/tests/__init__.py
index 79d1d1706f7..d9986d033a0 100644
--- a/contrib/python/simplejson/py3/simplejson/tests/__init__.py
+++ b/contrib/python/simplejson/py3/simplejson/tests/__init__.py
@@ -18,6 +18,8 @@ class TestMissingSpeedups(unittest.TestCase):
def runTest(self):
if hasattr(sys, "pypy_translation_info"):
"PyPy doesn't need speedups! :)"
+ elif getattr(getattr(sys, "implementation", None), "name", None) == "graalpy":
+ "GraalPy doesn't need speedups! :)"
elif hasattr(self, "skipTest"):
self.skipTest("_speedups.so is missing!")
diff --git a/contrib/python/simplejson/py3/simplejson/tests/test_float.py b/contrib/python/simplejson/py3/simplejson/tests/test_float.py
index a9779694728..fed1bd97cd6 100644
--- a/contrib/python/simplejson/py3/simplejson/tests/test_float.py
+++ b/contrib/python/simplejson/py3/simplejson/tests/test_float.py
@@ -1,3 +1,4 @@
+import sys
import math
from unittest import TestCase
from simplejson.compat import long_type, text_type
@@ -36,3 +37,10 @@ class TestFloat(TestCase):
self.assertEqual(int(json.dumps(num)), num)
self.assertEqual(json.loads(json.dumps(num)), num)
self.assertEqual(json.loads(text_type(json.dumps(num))), num)
+
+ def test_float_range(self):
+ try:
+ float_range = [sys.float_info.min, sys.float_info.max]
+ except AttributeError:
+ float_range = [2.2250738585072014e-308, 1.7976931348623157e+308]
+ self.assertEqual(json.loads(json.dumps(float_range)), float_range)
diff --git a/contrib/python/simplejson/py3/ya.make b/contrib/python/simplejson/py3/ya.make
index 1d192847a5b..85e677db4bd 100644
--- a/contrib/python/simplejson/py3/ya.make
+++ b/contrib/python/simplejson/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(3.20.1)
+VERSION(3.20.2)
LICENSE(MIT)
diff --git a/contrib/python/textual/.dist-info/METADATA b/contrib/python/textual/.dist-info/METADATA
index b4de5592de7..850f9446219 100644
--- a/contrib/python/textual/.dist-info/METADATA
+++ b/contrib/python/textual/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: textual
-Version: 0.85.2
+Version: 0.86.3
Summary: Modern Text User Interface framework
Home-page: https://github.com/Textualize/textual
License: MIT
diff --git a/contrib/python/textual/textual/_arrange.py b/contrib/python/textual/textual/_arrange.py
index 347e8ce09e6..8c2469670f1 100644
--- a/contrib/python/textual/textual/_arrange.py
+++ b/contrib/python/textual/textual/_arrange.py
@@ -6,7 +6,7 @@ from operator import attrgetter
from typing import TYPE_CHECKING, Iterable, Mapping, Sequence
from textual._partition import partition
-from textual.geometry import Region, Size, Spacing
+from textual.geometry import NULL_OFFSET, NULL_SPACING, Region, Size, Spacing
from textual.layout import DockArrangeResult, WidgetPlacement
if TYPE_CHECKING:
@@ -133,7 +133,8 @@ def _arrange_dock_widgets(
region_offset = region.offset
size = region.size
width, height = size
- null_spacing = Spacing()
+ null_spacing = NULL_SPACING
+ null_offset = NULL_OFFSET
top = right = bottom = left = 0
@@ -173,6 +174,7 @@ def _arrange_dock_widgets(
append_placement(
_WidgetPlacement(
dock_region.translate(region_offset),
+ null_offset,
null_spacing,
dock_widget,
top_z,
@@ -202,7 +204,8 @@ def _arrange_split_widgets(
placements: list[WidgetPlacement] = []
append_placement = placements.append
view_region = size.region
- null_spacing = Spacing()
+ null_spacing = NULL_SPACING
+ null_offset = NULL_OFFSET
for split_widget in split_widgets:
split = split_widget.styles.split
@@ -226,7 +229,9 @@ def _arrange_split_widgets(
raise AssertionError("invalid value for split edge") # pragma: no-cover
append_placement(
- _WidgetPlacement(split_region, null_spacing, split_widget, 1, True)
+ _WidgetPlacement(
+ split_region, null_offset, null_spacing, split_widget, 1, True
+ )
)
return placements, view_region
diff --git a/contrib/python/textual/textual/_compositor.py b/contrib/python/textual/textual/_compositor.py
index 13869c838a4..7aac04393c4 100644
--- a/contrib/python/textual/textual/_compositor.py
+++ b/contrib/python/textual/textual/_compositor.py
@@ -33,7 +33,7 @@ from textual import errors
from textual._cells import cell_len
from textual._context import visible_screen_stack
from textual._loop import loop_last
-from textual.geometry import NULL_OFFSET, NULL_SPACING, Offset, Region, Size, Spacing
+from textual.geometry import NULL_SPACING, Offset, Region, Size, Spacing
from textual.map_geometry import MapGeometry
from textual.strip import Strip, StripRenderable
@@ -535,8 +535,6 @@ class Compositor:
Compositor map and set of widgets.
"""
- ORIGIN = NULL_OFFSET
-
map: CompositorMap = {}
widgets: set[Widget] = set()
add_new_widget = widgets.add
@@ -580,15 +578,9 @@ class Compositor:
add_new_widget(widget)
else:
add_new_invisible_widget(widget)
- styles_offset = styles.offset
- layout_offset = (
- styles_offset.resolve(region.size, clip.size)
- if styles_offset
- else ORIGIN
- )
# Container region is minus border
- container_region = region.shrink(styles.gutter).translate(layout_offset)
+ container_region = region.shrink(styles.gutter)
container_size = container_region.size
# Widgets with scrollbars (containers or scroll view) require additional processing
@@ -643,15 +635,25 @@ class Compositor:
)
# Add all the widgets
- for sub_region, _, sub_widget, z, fixed, overlay in reversed(
- placements
- ):
+ for (
+ sub_region,
+ sub_region_offset,
+ _,
+ sub_widget,
+ z,
+ fixed,
+ overlay,
+ ) in reversed(placements):
layer_index = get_layer_index(sub_widget.layer, 0)
# Combine regions with children to calculate the "virtual size"
if fixed:
- widget_region = sub_region + placement_offset
+ widget_region = (
+ sub_region + sub_region_offset + placement_offset
+ )
else:
- widget_region = sub_region + placement_scroll_offset
+ widget_region = (
+ sub_region + sub_region_offset + placement_scroll_offset
+ )
widget_order = order + ((layer_index, z, layer_order),)
@@ -699,7 +701,7 @@ class Compositor:
)
map[widget] = _MapGeometry(
- region + layout_offset,
+ region,
order,
clip,
total_region.size,
@@ -711,19 +713,15 @@ class Compositor:
elif visible:
# Add the widget to the map
- widget_region = region + layout_offset
-
if widget.absolute_offset is not None:
margin = styles.margin
- widget_region = widget_region.at_offset(
- widget.absolute_offset + margin.top_left
- )
- widget_region = widget_region.translate(
- styles.offset.resolve(widget_region.grow(margin).size, size)
+ region = region.at_offset(widget.absolute_offset + margin.top_left)
+ region = region.translate(
+ styles.offset.resolve(region.grow(margin).size, size)
)
has_rule = styles.has_rule
if has_rule("constrain_x") or has_rule("constrain_y"):
- widget_region = widget_region.constrain(
+ region = region.constrain(
styles.constrain_x,
styles.constrain_y,
styles.margin,
@@ -731,7 +729,7 @@ class Compositor:
)
map[widget._render_widget] = _MapGeometry(
- widget_region,
+ region,
order,
clip,
region.size,
diff --git a/contrib/python/textual/textual/_segment_tools.py b/contrib/python/textual/textual/_segment_tools.py
index 7f3f93c8da2..de6a656a707 100644
--- a/contrib/python/textual/textual/_segment_tools.py
+++ b/contrib/python/textual/textual/_segment_tools.py
@@ -231,8 +231,6 @@ def align_lines(
if top_blank_lines:
yield from blank_lines(top_blank_lines)
- horizontal_excess_space = max(0, width - shape_width)
-
if horizontal == "left":
for cell_length, line in zip(line_lengths, lines):
if cell_length == width:
@@ -241,7 +239,7 @@ def align_lines(
yield line_pad(line, 0, width - cell_length, style)
elif horizontal == "center":
- left_space = horizontal_excess_space // 2
+ left_space = max(0, width - shape_width) // 2
for cell_length, line in zip(line_lengths, lines):
if cell_length == width:
yield line
diff --git a/contrib/python/textual/textual/_spatial_map.py b/contrib/python/textual/textual/_spatial_map.py
index 86debb1ddc2..8f6175321ab 100644
--- a/contrib/python/textual/textual/_spatial_map.py
+++ b/contrib/python/textual/textual/_spatial_map.py
@@ -6,7 +6,7 @@ from typing import Generic, Iterable, TypeVar
from typing_extensions import TypeAlias
-from textual.geometry import Region
+from textual.geometry import Offset, Region
ValueType = TypeVar("ValueType")
GridCoordinate: TypeAlias = "tuple[int, int]"
@@ -57,7 +57,7 @@ class SpatialMap(Generic[ValueType]):
)
def insert(
- self, regions_and_values: Iterable[tuple[Region, bool, bool, ValueType]]
+ self, regions_and_values: Iterable[tuple[Region, Offset, bool, bool, ValueType]]
) -> None:
"""Insert values into the Spatial map.
@@ -65,19 +65,19 @@ class SpatialMap(Generic[ValueType]):
indicates fixed regions. Fixed regions don't scroll and are always visible.
Args:
- regions_and_values: An iterable of (REGION, FIXED, OVERLAY, VALUE).
+ regions_and_values: An iterable of (REGION, OFFSET, FIXED, OVERLAY, VALUE).
"""
append_fixed = self._fixed.append
get_grid_list = self._map.__getitem__
_region_to_grid = self._region_to_grid_coordinates
total_region = self.total_region
- for region, fixed, overlay, value in regions_and_values:
+ for region, offset, fixed, overlay, value in regions_and_values:
if fixed:
append_fixed(value)
else:
if not overlay:
total_region = total_region.union(region)
- for grid in _region_to_grid(region):
+ for grid in _region_to_grid(region + offset):
get_grid_list(grid).append(value)
self.total_region = total_region
diff --git a/contrib/python/textual/textual/_text_area_theme.py b/contrib/python/textual/textual/_text_area_theme.py
index ad2e607f849..e315716f30a 100644
--- a/contrib/python/textual/textual/_text_area_theme.py
+++ b/contrib/python/textual/textual/_text_area_theme.py
@@ -5,9 +5,7 @@ from typing import TYPE_CHECKING
from rich.style import Style
-from textual.app import DEFAULT_COLORS
from textual.color import Color
-from textual.design import DEFAULT_DARK_SURFACE
if TYPE_CHECKING:
from textual.widgets import TextArea
@@ -92,9 +90,11 @@ class TextAreaTheme:
if self.base_style.color is None:
self.base_style = Style(color="#f3f3f3", bgcolor=self.base_style.bgcolor)
+ app_theme = text_area.app.current_theme
+
if self.base_style.bgcolor is None:
self.base_style = Style(
- color=self.base_style.color, bgcolor=DEFAULT_DARK_SURFACE
+ color=self.base_style.color, bgcolor=app_theme.surface
)
configured = self._theme_configured_attributes.__contains__
@@ -148,7 +148,7 @@ class TextAreaTheme:
self.selection_style = selection_style
else:
selection_background_color = background_color.blend(
- DEFAULT_COLORS["dark"].primary, factor=0.75
+ app_theme.primary, factor=0.75
)
self.selection_style = Style.from_color(
bgcolor=selection_background_color.rich_color
diff --git a/contrib/python/textual/textual/_xterm_parser.py b/contrib/python/textual/textual/_xterm_parser.py
index 2b27c5eb615..6382413c779 100644
--- a/contrib/python/textual/textual/_xterm_parser.py
+++ b/contrib/python/textual/textual/_xterm_parser.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+import os
import re
from typing import Any, Generator, Iterable
@@ -15,7 +16,7 @@ from textual.message import Message
# When trying to determine whether the current sequence is a supported/valid
# escape sequence, at which length should we give up and consider our search
# to be unsuccessful?
-_MAX_SEQUENCE_SEARCH_THRESHOLD = 20
+_MAX_SEQUENCE_SEARCH_THRESHOLD = 32
_re_mouse_event = re.compile("^" + re.escape("\x1b[") + r"(<?[\d;]+[mM]|M...)\Z")
_re_terminal_mode_response = re.compile(
@@ -37,6 +38,12 @@ SPECIAL_SEQUENCES = {BRACKETED_PASTE_START, BRACKETED_PASTE_END, FOCUSIN, FOCUSO
"""Set of special sequences."""
_re_extended_key: Final = re.compile(r"\x1b\[(?:(\d+)(?:;(\d+))?)?([u~ABCDEFHPQRS])")
+_re_in_band_window_resize: Final = re.compile(
+ r"\x1b\[48;(\d+(?:\:.*?)?);(\d+(?:\:.*?)?);(\d+(?:\:.*?)?);(\d+(?:\:.*?)?)t"
+)
+
+
+IS_ITERM = os.environ.get("TERM_PROGRAM", "") == "iTerm.app"
class XTermParser(Parser[Message]):
@@ -86,6 +93,7 @@ class XTermParser(Parser[Message]):
event_class = events.MouseDown if state == "M" else events.MouseUp
event = event_class(
+ None,
x,
y,
delta_x,
@@ -212,6 +220,16 @@ class XTermParser(Parser[Message]):
elif sequence == BRACKETED_PASTE_END:
bracketed_paste = False
break
+ if match := _re_in_band_window_resize.fullmatch(sequence):
+ height, width, pixel_height, pixel_width = [
+ group.partition(":")[0] for group in match.groups()
+ ]
+ resize_event = events.Resize.from_dimensions(
+ (int(width), int(height)),
+ (int(pixel_width), int(pixel_height)),
+ )
+ on_token(resize_event)
+ break
if not bracketed_paste:
# Check cursor position report
@@ -246,9 +264,15 @@ class XTermParser(Parser[Message]):
mode_report_match = _re_terminal_mode_response.match(sequence)
if mode_report_match is not None:
mode_id = mode_report_match["mode_id"]
- setting_parameter = mode_report_match["setting_parameter"]
- if mode_id == "2026" and int(setting_parameter) > 0:
+ setting_parameter = int(mode_report_match["setting_parameter"])
+ if mode_id == "2026" and setting_parameter > 0:
on_token(messages.TerminalSupportsSynchronizedOutput())
+ elif mode_id == "2048" and not IS_ITERM:
+ # TODO: remove "and not IS_ITERM" when https://gitlab.com/gnachman/iterm2/-/issues/11961 is fixed
+ in_band_event = messages.TerminalSupportInBandWindowResize.from_setting_parameter(
+ setting_parameter
+ )
+ on_token(in_band_event)
break
if self._debug_log_file is not None:
@@ -265,7 +289,7 @@ class XTermParser(Parser[Message]):
Keys
"""
- if (match := _re_extended_key.match(sequence)) is not None:
+ if (match := _re_extended_key.fullmatch(sequence)) is not None:
number, modifiers, end = match.groups()
number = number or 1
if not (key := FUNCTIONAL_KEYS.get(f"{number}{end}", "")):
diff --git a/contrib/python/textual/textual/app.py b/contrib/python/textual/textual/app.py
index 16ed1acdec5..e94c9595b08 100644
--- a/contrib/python/textual/textual/app.py
+++ b/contrib/python/textual/textual/app.py
@@ -92,11 +92,10 @@ from textual.actions import ActionParseResult, SkipAction
from textual.await_complete import AwaitComplete
from textual.await_remove import AwaitRemove
from textual.binding import Binding, BindingsMap, BindingType, Keymap
-from textual.command import CommandPalette, Provider
+from textual.command import CommandListItem, CommandPalette, Provider, SimpleProvider
from textual.css.errors import StylesheetError
from textual.css.query import NoMatches
from textual.css.stylesheet import RulesMap, Stylesheet
-from textual.design import ColorSystem
from textual.dom import DOMNode, NoScreen
from textual.driver import Driver
from textual.errors import NoWidget
@@ -122,6 +121,7 @@ from textual.screen import (
SystemModalScreen,
)
from textual.signal import Signal
+from textual.theme import BUILTIN_THEMES, Theme, ThemeProvider
from textual.timer import Timer
from textual.widget import AwaitMount, Widget
from textual.widgets._toast import ToastRack
@@ -151,44 +151,9 @@ if constants.DEBUG:
# `asyncio.get_event_loop()` is deprecated since Python 3.10:
_ASYNCIO_GET_EVENT_LOOP_IS_DEPRECATED = sys.version_info >= (3, 10, 0)
-LayoutDefinition = "dict[str, Any]"
-
-DEFAULT_COLORS = {
- "dark": ColorSystem(
- primary="#004578",
- secondary="#ffa62b",
- warning="#ffa62b",
- error="#ba3c5b",
- success="#4EBF71",
- accent="#0178D4",
- dark=True,
- ),
- "light": ColorSystem(
- primary="#004578",
- secondary="#ffa62b",
- warning="#ffa62b",
- error="#ba3c5b",
- success="#4EBF71",
- accent="#0178D4",
- dark=False,
- ),
- "ansi": ColorSystem(
- "ansi_blue",
- secondary="ansi_cyan",
- warning="ansi_yellow",
- error="ansi_red",
- success="ansi_green",
- accent="ansi_bright_blue",
- foreground="ansi_default",
- background="ansi_default",
- surface="ansi_default",
- panel="ansi_default",
- boost="ansi_default",
- ),
-}
-
ComposeResult = Iterable[Widget]
-RenderResult = RenderableType
+RenderResult = "RenderableType | Visual | SupportsTextualize"
+"""Result of Widget.render()"""
AutopilotCallbackType: TypeAlias = (
"Callable[[Pilot[object]], Coroutine[Any, Any, None]]"
@@ -266,6 +231,10 @@ class SuspendNotSupported(Exception):
"""
+class InvalidThemeError(Exception):
+ """Raised when an invalid theme is set."""
+
+
ReturnType = TypeVar("ReturnType")
CallThreadReturnType = TypeVar("CallThreadReturnType")
@@ -331,7 +300,7 @@ class App(Generic[ReturnType], DOMNode):
DEFAULT_CSS = """
App {
background: $background;
- color: $text;
+ color: $foreground;
&:ansi {
background: ansi_default;
@@ -493,14 +462,11 @@ class App(Generic[ReturnType], DOMNode):
SUSPENDED_SCREEN_CLASS: ClassVar[str] = ""
"""Class to apply to suspended screens, or empty string for no class."""
- HOVER_EFFECTS_SCROLL_PAUSE: ClassVar[float] = 0.2
- """Seconds to pause hover effects for when scrolling."""
-
- _PSEUDO_CLASSES: ClassVar[dict[str, Callable[[App], bool]]] = {
+ _PSEUDO_CLASSES: ClassVar[dict[str, Callable[[App[Any]], bool]]] = {
"focus": lambda app: app.app_focus,
"blur": lambda app: not app.app_focus,
- "dark": lambda app: app.dark,
- "light": lambda app: not app.dark,
+ "dark": lambda app: app.current_theme.dark,
+ "light": lambda app: not app.current_theme.dark,
"inline": lambda app: app.is_inline,
"ansi": lambda app: app.ansi_color,
"nocolor": lambda app: app.no_color,
@@ -511,16 +477,6 @@ class App(Generic[ReturnType], DOMNode):
sub_title: Reactive[str] = Reactive("", compute=False)
"""The app's sub-title, combined with [`title`][textual.app.App.title] in the header."""
- dark: Reactive[bool] = Reactive(True, compute=False)
- """Use a dark theme if `True`, otherwise use a light theme.
-
- Modify this attribute to switch between light and dark themes.
-
- Example:
- ```python
- self.app.dark = not self.app.dark # Toggle dark mode
- ```
- """
app_focus = Reactive(True, compute=False)
"""Indicates if the app has focus.
@@ -528,11 +484,14 @@ class App(Generic[ReturnType], DOMNode):
get focus when the terminal widget has focus.
"""
+ theme: Reactive[str] = Reactive(constants.DEFAULT_THEME)
+ """The name of the currently active theme."""
+
ansi_theme_dark = Reactive(MONOKAI, init=False)
- """Maps ANSI colors to hex colors using a Rich TerminalTheme object while in dark mode."""
+ """Maps ANSI colors to hex colors using a Rich TerminalTheme object while using a dark theme."""
ansi_theme_light = Reactive(ALABASTER, init=False)
- """Maps ANSI colors to hex colors using a Rich TerminalTheme object while in light mode."""
+ """Maps ANSI colors to hex colors using a Rich TerminalTheme object while using a light theme."""
ansi_color = Reactive(False)
"""Allow ANSI colors in UI?"""
@@ -563,7 +522,17 @@ class App(Generic[ReturnType], DOMNode):
super().__init__()
self.features: frozenset[FeatureFlag] = parse_features(os.getenv("TEXTUAL", ""))
- ansi_theme = self.ansi_theme_dark if self.dark else self.ansi_theme_light
+ self._registered_themes: dict[str, Theme] = {}
+ """Themes that have been registered with the App using `App.register_theme`.
+
+ This excludes the built-in themes."""
+
+ for theme in BUILTIN_THEMES.values():
+ self.register_theme(theme)
+
+ ansi_theme = (
+ self.ansi_theme_dark if self.current_theme.dark else self.ansi_theme_light
+ )
self.set_reactive(App.ansi_color, ansi_color)
self._filters: list[LineFilter] = [
ANSIToTruecolor(ansi_theme, enabled=not ansi_color)
@@ -665,9 +634,13 @@ class App(Generic[ReturnType], DOMNode):
self._refresh_required = False
- self.design = DEFAULT_COLORS
-
self._css_has_errors = False
+
+ self.theme_variables: dict[str, str] = {}
+ """Variables generated from the current theme."""
+
+ # Note that the theme must be set *before* self.get_css_variables() is called
+ # to ensure that the variables are retrieved from the currently active theme.
self.stylesheet = Stylesheet(variables=self.get_css_variables())
css_path = css_path or self.CSS_PATH
@@ -744,6 +717,12 @@ class App(Generic[ReturnType], DOMNode):
self._original_stderr = sys.__stderr__
"""The original stderr stream (before redirection etc)."""
+ self.theme_changed_signal: Signal[Theme] = Signal(self, "theme-changed")
+ """Signal that is published when the App's theme is changed.
+
+ Subscribers will receive the new theme object as an argument to the callback.
+ """
+
self.app_suspend_signal: Signal[App] = Signal(self, "app-suspend")
"""The signal that is published when the app is suspended.
@@ -762,8 +741,8 @@ class App(Generic[ReturnType], DOMNode):
perform work after the app has resumed.
"""
- self.set_class(self.dark, "-dark-mode")
- self.set_class(not self.dark, "-light-mode")
+ self.set_class(self.current_theme.dark, "-dark-mode")
+ self.set_class(not self.current_theme.dark, "-light-mode")
self.animation_level: AnimationLevel = constants.TEXTUAL_ANIMATIONS
"""Determines what type of animations the app will display.
@@ -781,11 +760,14 @@ class App(Generic[ReturnType], DOMNode):
self._previous_inline_height: int | None = None
"""Size of previous inline update."""
- self._paused_hover_effects: bool = False
- """Have the hover effects been paused?"""
-
self._hover_effects_timer: Timer | None = None
+ self._resize_event: events.Resize | None = None
+ """A pending resize event, sent on idle."""
+
+ self._css_update_count: int = 0
+ """Incremented when CSS is invalidated."""
+
if self.ENABLE_COMMAND_PALETTE:
for _key, binding in self._bindings:
if binding.action in {"command_palette", "app.command_palette"}:
@@ -1103,19 +1085,11 @@ class App(Generic[ReturnType], DOMNode):
[SystemCommand][textual.app.SystemCommand] instances.
"""
if not self.ansi_color:
- if self.dark:
- yield SystemCommand(
- "Light mode",
- "Switch to a light background",
- self.action_toggle_dark,
- )
- else:
- yield SystemCommand(
- "Dark mode",
- "Switch to a dark background",
- self.action_toggle_dark,
- )
-
+ yield SystemCommand(
+ "Change theme",
+ "Change the current theme",
+ self.action_change_theme,
+ )
yield SystemCommand(
"Quit the application",
"Quit the application as soon as possible",
@@ -1172,6 +1146,25 @@ class App(Generic[ReturnType], DOMNode):
"""
yield from ()
+ def get_theme_variable_defaults(self) -> dict[str, str]:
+ """Get the default values for the `variables` used in a theme.
+
+ If the currently specified theme doesn't define a value for a variable,
+ the value specified here will be used as a fallback.
+
+ If a variable is referenced in CSS but does not appear either here
+ or in the theme, the CSS will fail to parse on startup.
+
+ This method allows applications to define their own variables, beyond
+ those offered by Textual, which can then be overridden by a Theme.
+
+ Returns:
+ A mapping of variable name (e.g. "my-button-background-color") to value.
+ Values can be any valid CSS value, e.g. "red 50%", "auto 90%",
+ "#ff0000", "rgb(255, 0, 0)", etc.
+ """
+ return {}
+
def get_css_variables(self) -> dict[str, str]:
"""Get a mapping of variables used to pre-populate CSS.
@@ -1180,34 +1173,111 @@ class App(Generic[ReturnType], DOMNode):
Returns:
A mapping of variable name to value.
"""
+ theme = self.current_theme
+ # Build the Textual color system from the theme.
+ # This will contain $secondary, $primary, $background, etc.
+ variables = theme.to_color_system().generate()
+ # Apply the additional variables from the theme
+ variables = {**variables, **(theme.variables)}
+ theme_variables = self.get_theme_variable_defaults()
- if self.dark:
- design = self.design["dark"]
- else:
- design = self.design["light"]
+ combined_variables = {**theme_variables, **variables}
+ self.theme_variables = combined_variables
+ return combined_variables
+
+ def get_theme(self, theme_name: str) -> Theme | None:
+ """Get a theme by name.
+
+ Args:
+ theme_name: The name of the theme to get. May also be a comma
+ separated list of names, to pick the first available theme.
- variables = design.generate()
- return variables
+ Returns:
+ A Theme instance and None if the theme doesn't exist.
+ """
+ theme_names = [token.strip() for token in theme_name.split(",")]
+ for theme_name in theme_names:
+ if theme_name in self.available_themes:
+ return self.available_themes[theme_name]
+ return None
- def watch_dark(self, dark: bool) -> None:
- """Watches the dark bool.
+ def register_theme(self, theme: Theme) -> None:
+ """Register a theme with the app.
- This method handles the transition between light and dark mode when you
- change the [dark][textual.app.App.dark] attribute.
+ If the theme already exists, it will be overridden.
+
+ After registering a theme, you can activate it by setting the
+ `App.theme` attribute. To retrieve a registered theme, use the
+ `App.get_theme` method.
+
+ Args:
+ theme: The theme to register.
"""
+ self._registered_themes[theme.name] = theme
+
+ def unregister_theme(self, theme_name: str) -> None:
+ """Unregister a theme with the app.
+
+ Args:
+ theme_name: The name of the theme to unregister.
+ """
+ if theme_name in self._registered_themes:
+ del self._registered_themes[theme_name]
+
+ @property
+ def available_themes(self) -> dict[str, Theme]:
+ """All available themes (all built-in themes plus any that have been registered).
+
+ A dictionary mapping theme names to Theme instances.
+ """
+ return {**self._registered_themes}
+
+ @property
+ def current_theme(self) -> Theme:
+ theme = self.get_theme(self.theme)
+ if theme is None:
+ theme = self.get_theme("textual-dark")
+ assert theme is not None # validated by _validate_theme
+ return theme
+
+ def _validate_theme(self, theme_name: str) -> str:
+ if theme_name not in self.available_themes:
+ message = (
+ f"Theme {theme_name!r} has not been registered. "
+ "Call 'App.register_theme' before setting the 'App.theme' attribute."
+ )
+ raise InvalidThemeError(message)
+ return theme_name
+
+ def _watch_theme(self, theme_name: str) -> None:
+ """Apply a theme to the application.
+
+ This method is called when the theme reactive attribute is set.
+ """
+ theme = self.current_theme
+ dark = theme.dark
+ self.ansi_color = theme_name == "textual-ansi"
self.set_class(dark, "-dark-mode", update=False)
self.set_class(not dark, "-light-mode", update=False)
self._refresh_truecolor_filter(self.ansi_theme)
+ self._invalidate_css()
self.call_next(self.refresh_css)
+ self.call_next(self.theme_changed_signal.publish, theme)
+
+ def _invalidate_css(self) -> None:
+ """Invalidate CSS, so it will be refreshed."""
+ self._css_update_count += 1
def watch_ansi_theme_dark(self, theme: TerminalTheme) -> None:
- if self.dark:
+ if self.current_theme.dark:
self._refresh_truecolor_filter(theme)
+ self._invalidate_css()
self.call_next(self.refresh_css)
def watch_ansi_theme_light(self, theme: TerminalTheme) -> None:
- if not self.dark:
+ if not self.current_theme.dark:
self._refresh_truecolor_filter(theme)
+ self._invalidate_css()
self.call_next(self.refresh_css)
@property
@@ -1217,7 +1287,9 @@ class App(Generic[ReturnType], DOMNode):
Defines how colors defined as ANSI (e.g. `magenta`) inside Rich renderables
are mapped to hex codes.
"""
- return self.ansi_theme_dark if self.dark else self.ansi_theme_light
+ return (
+ self.ansi_theme_dark if self.current_theme.dark else self.ansi_theme_light
+ )
def _refresh_truecolor_filter(self, theme: TerminalTheme) -> None:
"""Update the ANSI to Truecolor filter, if available, with a new theme mapping.
@@ -1486,9 +1558,9 @@ class App(Generic[ReturnType], DOMNode):
result = future.result()
return result
- def action_toggle_dark(self) -> None:
- """An [action](/guide/actions) to toggle dark mode."""
- self.dark = not self.dark
+ def action_change_theme(self) -> None:
+ """An [action](/guide/actions) to change the current theme."""
+ self.search_themes()
def action_screenshot(
self, filename: str | None = None, path: str | None = None
@@ -1600,6 +1672,39 @@ class App(Generic[ReturnType], DOMNode):
name="screenshot",
)
+ def search_commands(
+ self,
+ commands: Sequence[CommandListItem],
+ placeholder: str = "Search for commands…",
+ ) -> AwaitMount:
+ """Show a list of commands in the app.
+
+ Args:
+ commands: A list of SimpleCommand instances.
+ placeholder: Placeholder text for the search field.
+
+ Returns:
+ AwaitMount: An awaitable that resolves when the commands are shown.
+ """
+ return self.push_screen(
+ CommandPalette(
+ providers=[SimpleProvider(self.screen, commands)],
+ placeholder=placeholder,
+ )
+ )
+
+ def search_themes(self) -> None:
+ """Show a fuzzy search command palette containing all registered themes.
+
+ Selecting a theme in the list will change the app's theme.
+ """
+ self.push_screen(
+ CommandPalette(
+ providers=[ThemeProvider],
+ placeholder="Search for themes…",
+ ),
+ )
+
def bind(
self,
keys: str,
@@ -1675,7 +1780,7 @@ class App(Generic[ReturnType], DOMNode):
char = key if len(key) == 1 else None
key_event = events.Key(key, char)
key_event.set_sender(app)
- driver.send_event(key_event)
+ driver.send_message(key_event)
await wait_for_idle(0)
await app._animator.wait_until_complete()
await wait_for_idle(0)
@@ -2203,7 +2308,9 @@ class App(Generic[ReturnType], DOMNode):
screen, await_mount = self._get_screen(new_screen)
stack.append(screen)
self._load_screen_css(screen)
- self.refresh_css()
+ if screen._css_update_count != self._css_update_count:
+ self.refresh_css()
+
screen.post_message(events.ScreenResume())
else:
# Mode is not defined
@@ -2248,6 +2355,8 @@ class App(Generic[ReturnType], DOMNode):
await_mount = AwaitMount(self.screen, [])
self._current_mode = mode
+ if self.screen._css_update_count != self._css_update_count:
+ self.refresh_css()
self.screen._screen_resized(self.size)
self.screen.post_message(events.ScreenResume())
@@ -2709,43 +2818,12 @@ class App(Generic[ReturnType], DOMNode):
"""
self.screen.set_focus(widget, scroll_visible)
- def _pause_hover_effects(self):
- """Pause any hover effects based on Enter and Leave events for 200ms."""
- if not self.HOVER_EFFECTS_SCROLL_PAUSE or self.is_headless:
- return
- self._paused_hover_effects = True
- if self._hover_effects_timer is None:
- self._hover_effects_timer = self.set_interval(
- self.HOVER_EFFECTS_SCROLL_PAUSE, self._resume_hover_effects
- )
- else:
- self._hover_effects_timer.reset()
- self._hover_effects_timer.resume()
-
- def _resume_hover_effects(self):
- """Resume sending Enter and Leave for hover effects."""
- if not self.HOVER_EFFECTS_SCROLL_PAUSE or self.is_headless:
- return
- if self._paused_hover_effects:
- self._paused_hover_effects = False
- if self._hover_effects_timer is not None:
- self._hover_effects_timer.pause()
- try:
- widget, _ = self.screen.get_widget_at(*self.mouse_position)
- except NoWidget:
- pass
- else:
- if widget is not self.mouse_over:
- self._set_mouse_over(widget)
-
def _set_mouse_over(self, widget: Widget | None) -> None:
"""Called when the mouse is over another widget.
Args:
widget: Widget under mouse, or None for no widgets.
"""
- if self._paused_hover_effects:
- return
if widget is None:
if self.mouse_over is not None:
try:
@@ -3364,6 +3442,7 @@ class App(Generic[ReturnType], DOMNode):
stylesheet.update(self.app, animate=animate)
try:
self.screen._refresh_layout(self.size)
+ self.screen._css_update_count = self._css_update_count
except ScreenError:
pass
# The other screens in the stack will need to know about some style
@@ -3372,6 +3451,7 @@ class App(Generic[ReturnType], DOMNode):
for screen in self.screen_stack:
if screen != self.screen:
stylesheet.update(screen, animate=animate)
+ screen._css_update_count = self._css_update_count
def _display(self, screen: Screen, renderable: RenderableType | None) -> None:
"""Display a renderable within a sync.
@@ -3602,7 +3682,9 @@ class App(Generic[ReturnType], DOMNode):
self.get_widget_at(event.x, event.y)[0]
is self._mouse_down_widget
):
- click_event = events.Click.from_event(event)
+ click_event = events.Click.from_event(
+ self._mouse_down_widget, event
+ )
self.screen._forward_event(click_event)
except NoWidget:
pass
@@ -3678,7 +3760,7 @@ class App(Generic[ReturnType], DOMNode):
raise ActionError(f"Action namespace {destination} is not known")
action_target = getattr(self, destination, None)
if action_target is None:
- raise ActionError("Action target {destination!r} not available")
+ raise ActionError(f"Action target {destination!r} not available")
return (
(default_namespace if action_target is None else action_target),
action_name,
@@ -3825,9 +3907,7 @@ class App(Generic[ReturnType], DOMNode):
async def _on_resize(self, event: events.Resize) -> None:
event.stop()
- self.screen.post_message(event)
- for screen in self._background_screens:
- screen.post_message(event)
+ self._resize_event = event
async def _on_app_focus(self, event: events.AppFocus) -> None:
"""App has focus."""
@@ -4014,6 +4094,15 @@ class App(Generic[ReturnType], DOMNode):
"""
self.screen.query(selector).toggle_class(class_name)
+ def action_toggle_dark(self) -> None:
+ """An [action](/guide/actions) to toggle the theme between textual-light
+ and textual-dark. This is offered as a convenience to simplify backwards
+ compatibility with previous versions of Textual which only had light mode
+ and dark mode."""
+ self.theme = (
+ "textual-dark" if self.theme == "textual-light" else "textual-light"
+ )
+
def action_focus_next(self) -> None:
"""An [action](/guide/actions) to focus the next widget."""
self.screen.focus_next()
@@ -4151,7 +4240,7 @@ class App(Generic[ReturnType], DOMNode):
def action_command_palette(self) -> None:
"""Show the Textual command palette."""
if self.use_command_palette and not CommandPalette.is_open(self):
- self.push_screen(CommandPalette())
+ self.push_screen(CommandPalette(id="--command-palette"))
def _suspend_signal(self) -> None:
"""Signal that the application is being suspended."""
@@ -4457,3 +4546,21 @@ class App(Generic[ReturnType], DOMNode):
self.notify(
"Failed to save screenshot", title="Screenshot", severity="error"
)
+
+ @on(messages.TerminalSupportInBandWindowResize)
+ def _on_terminal_supports_in_band_window_resize(
+ self, message: messages.TerminalSupportInBandWindowResize
+ ) -> None:
+ """There isn't much we can do with this information currently, so
+ we will just log it.
+ """
+ self.log.debug(message)
+
+ def _on_idle(self) -> None:
+ """Send app resize events on idle, so we don't do more resizing that necessary."""
+ event = self._resize_event
+ if event is not None:
+ self._resize_event = None
+ self.screen.post_message(event)
+ for screen in self._background_screens:
+ screen.post_message(event)
diff --git a/contrib/python/textual/textual/color.py b/contrib/python/textual/textual/color.py
index 2de8aa1bf5f..c5f5abcf3f4 100644
--- a/contrib/python/textual/textual/color.py
+++ b/contrib/python/textual/textual/color.py
@@ -167,9 +167,16 @@ class Color(NamedTuple):
"""Alpha (opacity) component in range 0 to 1."""
ansi: int | None = None
"""ANSI color index. `-1` means default color. `None` if not an ANSI color."""
+ auto: bool = False
+ """Is the color automatic? (automatic colors may be white or black, to provide maximum contrast)"""
@classmethod
- def from_rich_color(cls, rich_color: RichColor) -> Color:
+ def automatic(cls, alpha_percentage: float = 100.0) -> Color:
+ """Create an automatic color."""
+ return cls(0, 0, 0, alpha_percentage / 100.0, auto=True)
+
+ @classmethod
+ def from_rich_color(cls, rich_color: RichColor | None) -> Color:
"""Create a new color from Rich's Color class.
Args:
@@ -178,6 +185,8 @@ class Color(NamedTuple):
Returns:
A new Color instance.
"""
+ if rich_color is None:
+ return TRANSPARENT
r, g, b = rich_color.get_truecolor()
return cls(r, g, b)
@@ -203,7 +212,7 @@ class Color(NamedTuple):
Returns:
Inverse color.
"""
- r, g, b, a, _ = self
+ r, g, b, a, _, _ = self
return Color(255 - r, 255 - g, 255 - b, a)
@property
@@ -214,14 +223,15 @@ class Color(NamedTuple):
@property
def clamped(self) -> Color:
"""A clamped color (this color with all values in expected range)."""
- r, g, b, a, _ = self
+ r, g, b, a, ansi, auto = self
_clamp = clamp
color = Color(
_clamp(r, 0, 255),
_clamp(g, 0, 255),
_clamp(b, 0, 255),
_clamp(a, 0.0, 1.0),
- self.ansi,
+ ansi,
+ auto,
)
return color
@@ -233,7 +243,7 @@ class Color(NamedTuple):
Returns:
A color object as used by Rich.
"""
- r, g, b, _a, ansi = self
+ r, g, b, _a, ansi, _ = self
if ansi is not None:
return RichColor.parse("default") if ansi < 0 else RichColor.from_ansi(ansi)
return RichColor(
@@ -247,13 +257,13 @@ class Color(NamedTuple):
Returns:
Normalized components.
"""
- r, g, b, _a, _ = self
+ r, g, b, _a, _, _ = self
return (r / 255, g / 255, b / 255)
@property
def rgb(self) -> tuple[int, int, int]:
"""The red, green, and blue color components as a tuple of ints."""
- r, g, b, _, _ = self
+ r, g, b, _, _, _ = self
return (r, g, b)
@property
@@ -286,7 +296,7 @@ class Color(NamedTuple):
For example, `"#46b3de"` for an RGB color, or `"#3342457f"` for a color with alpha.
"""
- r, g, b, a, ansi = self.clamped
+ r, g, b, a, ansi, _ = self.clamped
if ansi is not None:
return "ansi_default" if ansi == -1 else f"ansi_{ANSI_COLORS[ansi]}"
return (
@@ -301,7 +311,7 @@ class Color(NamedTuple):
For example, `"#46b3de"`.
"""
- r, g, b, _a, _ = self.clamped
+ r, g, b, _a, _, _ = self.clamped
return f"#{r:02X}{g:02X}{b:02X}"
@property
@@ -310,7 +320,12 @@ class Color(NamedTuple):
For example, `"rgb(10,20,30)"` for an RGB color, or `"rgb(50,70,80,0.5)"` for an RGBA color.
"""
- r, g, b, a, ansi = self
+ r, g, b, a, ansi, auto = self
+ if auto:
+ alpha_percentage = clamp(a, 0.0, 1.0) * 100.0
+ if not alpha_percentage % 1:
+ return f"auto {int(alpha_percentage)}%"
+ return f"auto {alpha_percentage:.1f}%"
if ansi is not None:
return "ansi_default" if ansi == -1 else f"ansi_{ANSI_COLORS[ansi]}"
return f"rgb({r},{g},{b})" if a == 1 else f"rgba({r},{g},{b},{a})"
@@ -322,17 +337,18 @@ class Color(NamedTuple):
Returns:
The monochrome (black and white) version of this color.
"""
- r, g, b, a, _ = self
+ r, g, b, a, _, _ = self
gray = round(r * 0.2126 + g * 0.7152 + b * 0.0722)
return Color(gray, gray, gray, a)
def __rich_repr__(self) -> rich.repr.Result:
- r, g, b, a, ansi = self
+ r, g, b, a, ansi, auto = self
yield r
yield g
yield b
yield "a", a, 1.0
yield "ansi", ansi, None
+ yield "auto", auto, False
def with_alpha(self, alpha: float) -> Color:
"""Create a new color with the given alpha.
@@ -343,7 +359,7 @@ class Color(NamedTuple):
Returns:
A new color.
"""
- r, g, b, _, _ = self
+ r, g, b, _, _, _ = self
return Color(r, g, b, alpha)
def multiply_alpha(self, alpha: float) -> Color:
@@ -357,7 +373,7 @@ class Color(NamedTuple):
"""
if self.ansi is not None:
return self
- r, g, b, a, _ = self
+ r, g, b, a, _, _ = self
return Color(r, g, b, a * alpha)
@lru_cache(maxsize=1024)
@@ -378,14 +394,16 @@ class Color(NamedTuple):
Returns:
A new color.
"""
+ if destination.auto:
+ destination = self.get_contrast_text(destination.a)
if destination.ansi is not None:
return destination
if factor <= 0:
return self
elif factor >= 1:
return destination
- r1, g1, b1, a1, _ = self
- r2, g2, b2, a2, _ = destination
+ r1, g1, b1, a1, _, _ = self
+ r2, g2, b2, a2, _, _ = destination
if alpha is None:
new_alpha = a1 + (a2 - a1) * factor
@@ -412,10 +430,10 @@ class Color(NamedTuple):
New color
"""
- r1, g1, b1, a1, ansi1 = self
+ r1, g1, b1, a1, ansi1, _ = self
if ansi1 is not None:
return self
- r2, g2, b2, a2, ansi2 = color
+ r2, g2, b2, a2, ansi2, _ = color
if ansi2 is not None:
return self
return Color(
@@ -551,7 +569,7 @@ class Color(NamedTuple):
l = percentage_string_to_float(l)
a = clamp(float(a), 0.0, 1.0)
color = Color.from_hsl(h, s, l).with_alpha(a)
- else:
+ else: # pragma: no-cover
raise AssertionError( # pragma: no-cover
"Can't get here if RE_COLOR matches"
)
diff --git a/contrib/python/textual/textual/command.py b/contrib/python/textual/textual/command.py
index f2b54ea8260..68677ba0018 100644
--- a/contrib/python/textual/textual/command.py
+++ b/contrib/python/textual/textual/command.py
@@ -21,11 +21,19 @@ from dataclasses import dataclass
from functools import total_ordering
from inspect import isclass
from time import monotonic
-from typing import TYPE_CHECKING, Any, AsyncGenerator, AsyncIterator, ClassVar, Iterable
+from typing import (
+ TYPE_CHECKING,
+ Any,
+ AsyncGenerator,
+ AsyncIterator,
+ Callable,
+ ClassVar,
+ Iterable,
+ NamedTuple,
+)
import rich.repr
from rich.align import Align
-from rich.console import Group, RenderableType
from rich.style import Style
from rich.text import Text
from typing_extensions import Final, TypeAlias
@@ -33,6 +41,7 @@ from typing_extensions import Final, TypeAlias
from textual import on, work
from textual.binding import Binding, BindingType
from textual.containers import Horizontal, Vertical
+from textual.content import Content
from textual.events import Click, Mount
from textual.fuzzy import Matcher
from textual.message import Message
@@ -40,6 +49,8 @@ from textual.reactive import var
from textual.screen import Screen, SystemModalScreen
from textual.timer import Timer
from textual.types import IgnoreReturnCallbackType
+from textual.visual import Style as VisualStyle
+from textual.visual import VisualType
from textual.widget import Widget
from textual.widgets import Button, Input, LoadingIndicator, OptionList, Static
from textual.widgets.option_list import Option
@@ -68,7 +79,7 @@ class Hit:
The value should be between 0 (no match) and 1 (complete match).
"""
- match_display: RenderableType
+ match_display: VisualType
"""A string or Rich renderable representation of the hit."""
command: IgnoreReturnCallbackType
@@ -85,7 +96,7 @@ class Hit:
"""Optional help text for the command."""
@property
- def prompt(self) -> RenderableType:
+ def prompt(self) -> VisualType:
"""The prompt to use when displaying the hit in the command palette."""
return self.match_display
@@ -102,21 +113,14 @@ class Hit:
def __post_init__(self) -> None:
"""Ensure 'text' is populated."""
if self.text is None:
- if isinstance(self.match_display, str):
- self.text = self.match_display
- elif isinstance(self.match_display, Text):
- self.text = self.match_display.plain
- else:
- raise ValueError(
- "A value for 'text' is required if 'match_display' is not a str or Text"
- )
+ self.text = str(self.match_display)
@dataclass
class DiscoveryHit:
"""Holds the details of a single command search hit."""
- display: RenderableType
+ display: VisualType
"""A string or Rich renderable representation of the hit."""
command: IgnoreReturnCallbackType
@@ -133,7 +137,7 @@ class DiscoveryHit:
"""Optional help text for the command."""
@property
- def prompt(self) -> RenderableType:
+ def prompt(self) -> VisualType:
"""The prompt to use when displaying the discovery hit in the command palette."""
return self.display
@@ -162,19 +166,15 @@ class DiscoveryHit:
def __post_init__(self) -> None:
"""Ensure 'text' is populated."""
if self.text is None:
- if isinstance(self.display, str):
- self.text = self.display
- elif isinstance(self.display, Text):
- self.text = self.display.plain
- else:
- raise ValueError(
- "A value for 'text' is required if 'display' is not a str or Text"
- )
+ self.text = str(self.display)
Hits: TypeAlias = AsyncIterator["DiscoveryHit | Hit"]
"""Return type for the command provider's `search` method."""
+ProviderSource: TypeAlias = "Iterable[type[Provider] | Callable[[], type[Provider]]]"
+"""The type used to declare the providers for a CommandPalette."""
+
class Provider(ABC):
"""Base class for command palette command providers.
@@ -319,6 +319,78 @@ class Provider(ABC):
"""
+class SimpleCommand(NamedTuple):
+ """A simple command."""
+
+ name: str
+ """The name of the command."""
+ callback: IgnoreReturnCallbackType
+ """The callback to invoke when the command is selected."""
+ help_text: str | None = None
+ """The description of the command."""
+
+
+CommandListItem: TypeAlias = (
+ "SimpleCommand | tuple[str, IgnoreReturnCallbackType, str | None] | tuple[str, IgnoreReturnCallbackType]"
+)
+
+
+class SimpleProvider(Provider):
+ """A simple provider which the caller can pass commands to."""
+
+ def __init__(
+ self,
+ screen: Screen[Any],
+ commands: list[CommandListItem],
+ ) -> None:
+ # Convert all commands to SimpleCommand instances
+ super().__init__(screen, None)
+ self._commands: list[SimpleCommand] = []
+ for command in commands:
+ if isinstance(command, SimpleCommand):
+ self._commands.append(command)
+ elif len(command) == 2:
+ self._commands.append(SimpleCommand(*command, None))
+ elif len(command) == 3:
+ self._commands.append(SimpleCommand(*command))
+ else:
+ raise ValueError(f"Invalid command: {command}")
+
+ def __call__(
+ self, screen: Screen[Any], match_style: Style | None = None
+ ) -> SimpleProvider:
+ self.__match_style = match_style
+ return self
+
+ @property
+ def match_style(self) -> Style | None:
+ return self.__match_style
+
+ async def search(self, query: str) -> Hits:
+ matcher = self.matcher(query)
+ for name, callback, help_text in self._commands:
+ if (match := matcher.match(name)) > 0:
+ yield Hit(
+ match,
+ matcher.highlight(name),
+ callback,
+ help=help_text,
+ )
+
+ async def discover(self) -> Hits:
+ """Handle a request for the discovery commands for this provider.
+
+ Yields:
+ Commands that can be discovered.
+ """
+ for name, callback, help_text in self._commands:
+ yield DiscoveryHit(
+ name,
+ callback,
+ help=help_text,
+ )
+
+
@rich.repr.auto
@total_ordering
class Command(Option):
@@ -326,7 +398,7 @@ class Command(Option):
def __init__(
self,
- prompt: RenderableType,
+ prompt: VisualType,
hit: DiscoveryHit | Hit,
id: str | None = None,
disabled: bool = False,
@@ -361,14 +433,13 @@ class CommandList(OptionList, can_focus=False):
CommandList {
visibility: hidden;
border-top: blank;
- border-bottom: hkey $primary;
+ border-bottom: hkey $border;
border-left: none;
border-right: none;
height: auto;
max-height: 70vh;
background: transparent;
padding: 0;
- text-style: bold;
}
CommandList:focus {
@@ -384,7 +455,9 @@ class CommandList(OptionList, can_focus=False):
}
CommandList > .option-list--option-highlighted {
- background: $primary;
+ color: $block-cursor-foreground;
+ background: $block-cursor-background;
+ text-style: $block-cursor-text-style;
}
CommandList:nocolor > .option-list--option-highlighted {
@@ -392,7 +465,9 @@ class CommandList(OptionList, can_focus=False):
}
CommandList > .option-list--option {
- padding-left: 2;
+ padding: 0 2;
+ color: $foreground;
+ text-style: bold;
}
"""
@@ -412,7 +487,7 @@ class SearchIcon(Static, inherit_css=False):
icon: var[str] = var("🔎")
"""The icon to display."""
- def render(self) -> RenderableType:
+ def render(self) -> VisualType:
"""Render the icon.
Returns:
@@ -428,13 +503,14 @@ class CommandInput(Input):
CommandInput, CommandInput:focus {
border: blank;
width: 1fr;
- background: transparent;
padding-left: 0;
+ background: transparent;
+ background-tint: 0%;
}
"""
-class CommandPalette(SystemModalScreen):
+class CommandPalette(SystemModalScreen[None]):
"""The Textual command palette."""
AUTO_FOCUS = "CommandInput"
@@ -457,6 +533,7 @@ class CommandPalette(SystemModalScreen):
min-height: 20;
}
CommandPalette {
+ color: $foreground;
background: $background 60%;
align-horizontal: center;
@@ -475,19 +552,15 @@ class CommandPalette(SystemModalScreen):
}
}
- CommandPalette > .command-palette--help-text {
- text-style: dim not bold;
- }
-
- CommandPalette:dark > .command-palette--highlight {
- text-style: bold;
- color: $warning;
+ CommandPalette > .command-palette--help-text {
+ color: $text-muted;
+ background: transparent;
+ text-style: not bold;
}
+
CommandPalette > .command-palette--highlight {
- text-style: bold;
- color: $warning-darken-2;
-
- }
+ text-style: bold underline;
+ }
CommandPalette:nocolor > .command-palette--highlight {
text-style: underline;
@@ -497,13 +570,14 @@ class CommandPalette(SystemModalScreen):
margin-top: 3;
height: 100%;
visibility: hidden;
- background: $primary 20%;
+ background: $surface;
+ &:dark { background: $panel-darken-1; }
}
CommandPalette #--input {
height: auto;
visibility: visible;
- border: hkey $primary;
+ border: hkey $border;
}
CommandPalette #--input.--list-visible {
@@ -528,7 +602,7 @@ class CommandPalette(SystemModalScreen):
CommandPalette LoadingIndicator {
height: auto;
visibility: hidden;
- border-bottom: hkey $primary;
+ border-bottom: hkey $border;
}
CommandPalette LoadingIndicator.--visible {
@@ -586,9 +660,6 @@ class CommandPalette(SystemModalScreen):
_calling_screen: var[Screen[Any] | None] = var(None)
"""A record of the screen that was active when we were called."""
- _PALETTE_ID: Final[str] = "--command-palette"
- """The internal ID for the command palette."""
-
@dataclass
class OptionHighlighted(Message):
"""Posted to App when an option is highlighted in the command palette."""
@@ -607,31 +678,53 @@ class CommandPalette(SystemModalScreen):
option_selected: bool
"""True if an option was selected, False if the palette was closed without selecting an option."""
- def __init__(self) -> None:
- """Initialise the command palette."""
- super().__init__(id=self._PALETTE_ID)
+ def __init__(
+ self,
+ providers: ProviderSource | None = None,
+ *,
+ placeholder: str = "Search for commands…",
+ name: str | None = None,
+ id: str | None = None,
+ classes: str | None = None,
+ ) -> None:
+ """Initialise the command palette.
+
+ Args:
+ providers: An optional list of providers to use. If None, the providers supplied
+ in the App or Screen will be used.
+ placeholder: The placeholder text for the command palette.
+ """
+ super().__init__(
+ id=id,
+ classes=classes,
+ name=name,
+ )
+ self.add_class("--textual-command-palette")
+
self._selected_command: DiscoveryHit | Hit | None = None
"""The command that was selected by the user."""
self._busy_timer: Timer | None = None
"""Keeps track of if there's a busy indication timer in effect."""
self._no_matches_timer: Timer | None = None
"""Keeps track of if there are 'No matches found' message waiting to be displayed."""
+ self._supplied_providers: ProviderSource | None = providers
self._providers: list[Provider] = []
"""List of Provider instances involved in searches."""
self._hit_count: int = 0
"""Number of hits displayed."""
+ self._placeholder = placeholder
@staticmethod
- def is_open(app: App) -> bool:
- """Is the command palette current open?
+ def is_open(app: App[object]) -> bool:
+ """Is a command palette current open?
Args:
app: The app to test.
Returns:
- `True` if the command palette is currently open, `False` if not.
+ `True` if a command palette is currently open, `False` if not.
"""
- return app.screen.id == CommandPalette._PALETTE_ID
+ return app.screen.has_class("--textual-command-palette")
@property
def _provider_classes(self) -> set[type[Provider]]:
@@ -642,27 +735,36 @@ class CommandPalette(SystemModalScreen):
the current screen][textual.screen.Screen.COMMANDS].
"""
- def get_providers(root: App | Screen) -> Iterable[type[Provider]]:
- """Get providers from app or screen.
+ def get_providers(
+ provider_source: ProviderSource,
+ ) -> Iterable[type[Provider]]:
+ """Load the providers from a source (typically from the COMMANDS class variable)
+ at the App or Screen level.
Args:
- root: The app or screen.
+ provider_source: The source of providers.
Returns:
An iterable of providers.
"""
- for provider in root.COMMANDS:
- if isclass(provider) and issubclass(provider, Provider):
+ for provider in provider_source:
+ if isinstance(provider, SimpleProvider):
+ yield provider
+ elif isclass(provider) and issubclass(provider, Provider):
yield provider
else:
# Lazy loaded providers
yield provider() # type: ignore
- return (
- set()
- if self._calling_screen is None
- else {*get_providers(self.app), *get_providers(self._calling_screen)}
- )
+ if self._calling_screen is None:
+ return set()
+ elif self._supplied_providers is None:
+ return {
+ *get_providers(self.app.COMMANDS),
+ *get_providers(self._calling_screen.COMMANDS),
+ }
+ else:
+ return {*get_providers(self._supplied_providers)}
def compose(self) -> ComposeResult:
"""Compose the command palette.
@@ -673,7 +775,7 @@ class CommandPalette(SystemModalScreen):
with Vertical(id="--container"):
with Horizontal(id="--input"):
yield SearchIcon()
- yield CommandInput(placeholder="Search for commands…")
+ yield CommandInput(placeholder=self._placeholder)
if not self.run_on_select:
yield Button("\u25b6")
with Vertical(id="--results"):
@@ -952,13 +1054,6 @@ class CommandPalette(SystemModalScreen):
Args:
search_value: The value to search for.
"""
-
- # We'll potentially use the help text style a lot so let's grab it
- # the once for use in the loop further down.
- help_style = self.get_component_rich_style(
- "command-palette--help-text", partial=True
- )
-
# The list to hold on to the commands we've gathered from the
# command providers.
gathered_commands: list[Command] = []
@@ -1015,26 +1110,25 @@ class CommandPalette(SystemModalScreen):
while hit:
# Turn the command into something for display, and add it to the
# list of commands that have been gathered so far.
- prompt = hit.prompt
- if hit.help:
- help_text = Text.from_markup(hit.help)
- help_text.stylize(help_style)
- prompt = Group(prompt, help_text)
+
+ def build_prompt() -> Iterable[Content]:
+ """Generator for prompt content."""
+ assert hit is not None
+ yield Content.from_rich_text(hit.prompt)
+ # Optional help text
+ if hit.help:
+ help_style = VisualStyle.from_styles(
+ self.get_component_styles("command-palette--help-text")
+ )
+ yield Content.styled(hit.help, help_style)
+
+ prompt = Content("\n").join(build_prompt())
+
gathered_commands.append(Command(prompt, hit, id=str(command_id)))
- # Before we go making any changes to the UI, we do a quick
- # double-check that the worker hasn't been cancelled. There's
- # little point in doing UI work on a value that isn't needed any
- # more.
if worker.is_cancelled:
break
- # Having made it this far, it's safe to update the list of
- # commands that match the input. Note that we batch up the
- # results and only refresh the list once every so often; this
- # helps reduce how much UI work needs to be done, but at the
- # same time we keep the update frequency often enough so that it
- # looks like things are moving along.
now = monotonic()
if (now - last_update) > self._RESULT_BATCH_TIME:
self._refresh_command_list(
@@ -1043,7 +1137,6 @@ class CommandPalette(SystemModalScreen):
clear_current = False
last_update = now
- # Bump the ID.
command_id += 1
# Finally, get the available command from the incoming queue;
diff --git a/contrib/python/textual/textual/constants.py b/contrib/python/textual/textual/constants.py
index f4d1673888f..7cc88938fbd 100644
--- a/contrib/python/textual/textual/constants.py
+++ b/contrib/python/textual/textual/constants.py
@@ -152,3 +152,8 @@ SLOW_THRESHOLD: int = _get_environ_int("TEXTUAL_SLOW_THRESHOLD", 500, minimum=10
"""The time threshold (in milliseconds) after which a warning is logged
if message processing exceeds this duration.
"""
+
+DEFAULT_THEME: Final[str] = get_environ("TEXTUAL_THEME", "textual-dark")
+"""Textual theme to make default. More than one theme may be specified in a comma separated list.
+Textual will use the first theme that exists.
+"""
diff --git a/contrib/python/textual/textual/containers.py b/contrib/python/textual/textual/containers.py
index 70986b9e479..18a46d14553 100644
--- a/contrib/python/textual/textual/containers.py
+++ b/contrib/python/textual/textual/containers.py
@@ -73,6 +73,49 @@ class ScrollableContainer(Widget, can_focus=True, inherit_bindings=False):
| ctrl+pagedown | Scroll right one page, if horizontal scrolling is available. |
"""
+ def __init__(
+ self,
+ *children: Widget,
+ name: str | None = None,
+ id: str | None = None,
+ classes: str | None = None,
+ disabled: bool = False,
+ can_focus: bool | None = None,
+ can_focus_children: bool | None = None,
+ can_maximize: bool | None = None,
+ ) -> None:
+ """
+
+ Args:
+ *children: Child widgets.
+ name: The name of the widget.
+ id: The ID of the widget in the DOM.
+ classes: The CSS classes for the widget.
+ disabled: Whether the widget is disabled or not.
+ can_focus: Can this container be focused?
+ can_focus_children: Can this container's children be focused?
+ can_maximized: Allow this container to maximize? `None` to use default logic.,
+ """
+
+ super().__init__(
+ *children,
+ name=name,
+ id=id,
+ classes=classes,
+ disabled=disabled,
+ )
+ if can_focus is not None:
+ self.can_focus = can_focus
+ if can_focus_children is not None:
+ self.can_focus_children = can_focus_children
+ self.can_maximize = can_maximize
+
+ @property
+ def allow_maximize(self) -> bool:
+ if self.can_maximize is None:
+ return super().allow_maximize
+ return self.can_maximize
+
class Vertical(Widget, inherit_bindings=False):
"""An expanding container with vertical layout and no scrollbars."""
diff --git a/contrib/python/textual/textual/content.py b/contrib/python/textual/textual/content.py
new file mode 100644
index 00000000000..6df51e99cee
--- /dev/null
+++ b/contrib/python/textual/textual/content.py
@@ -0,0 +1,1001 @@
+"""
+Content is Textual's equivalent to Rich's Text object, with support for transparency.
+
+The interface is (will be) similar, with the major difference that is *immutable*.
+This will make some operations slower, but dramatically improve cache-ability.
+
+TBD: Is this a public facing API or an internal one?
+
+"""
+
+from __future__ import annotations
+
+import re
+from operator import itemgetter
+from typing import TYPE_CHECKING, Callable, Iterable, NamedTuple, Sequence
+
+import rich.repr
+from rich._wrap import divide_line
+from rich.cells import set_cell_size
+from rich.console import OverflowMethod
+from rich.segment import Segment, Segments
+from rich.text import Text
+
+from textual._cells import cell_len
+from textual._loop import loop_last
+from textual.color import Color
+from textual.css.types import TextAlign
+from textual.strip import Strip
+from textual.visual import Style, Visual
+
+if TYPE_CHECKING:
+ from textual.widget import Widget
+
+_re_whitespace = re.compile(r"\s+$")
+
+
+def _align_lines(
+ lines: list[Content],
+ width: int,
+ align: TextAlign = "left",
+ overflow: "OverflowMethod" = "fold",
+) -> list[Content]:
+ """Align and overflow text.
+
+ Args:
+ width (int): Number of cells available per line.
+ align (str, optional): Desired text alignment.
+ overflow (str, optional): Default overflow for text: "crop", "fold", or "ellipsis". Defaults to "fold".
+
+ Returns:
+ List of new lines.
+
+ """
+
+ for line in lines:
+ assert isinstance(line._spans, list)
+
+ if align == "left":
+ lines = [line.truncate(width, overflow=overflow, pad=True) for line in lines]
+ elif align == "center":
+ lines = [line.center(width) for line in lines]
+ elif align == "right":
+ lines = [line.right(width) for line in lines]
+ elif align == "full":
+ new_lines = lines.copy()
+ for line_index, line in enumerate(new_lines):
+ if line_index == len(lines) - 1:
+ break
+ words = line.split(" ", include_separator=True)
+ words_size = sum(cell_len(word.plain.rstrip(" ")) for word in words)
+ num_spaces = len(words) - 1
+ spaces = [0 for _ in range(num_spaces)]
+ index = 0
+ if spaces:
+ while words_size + num_spaces < width:
+ spaces[len(spaces) - index - 1] += 1
+ num_spaces += 1
+ index = (index + 1) % len(spaces)
+ tokens = [
+ word.extend_right(spaces[index]) if index < len(spaces) else word
+ for index, word in enumerate(words)
+ ]
+ new_lines[line_index] = Content("").join(tokens)
+
+ return new_lines
+ return lines
+
+
+ANSI_DEFAULT = Style(
+ background=Color(0, 0, 0, 0, ansi=-1), foreground=Color(0, 0, 0, 0, ansi=-1)
+)
+
+TRANSPARENT_STYLE = Style()
+
+
+class Span(NamedTuple):
+ """A style applied to a range of character offsets."""
+
+ start: int
+ end: int
+ style: Style | str
+
+ def __rich_repr__(self) -> rich.repr.Result:
+ yield self.start
+ yield self.end
+ yield "style", self.style
+
+ def extend(self, cells: int) -> "Span":
+ """Extend the span by the given number of cells.
+
+ Args:
+ cells (int): Additional space to add to end of span.
+
+ Returns:
+ Span: A span.
+ """
+ if cells:
+ start, end, style = self
+ return Span(start, end + cells, style)
+ else:
+ return self
+
+
+class Content(Visual):
+ """Text content with marked up spans.
+
+ This object can be considered immutable, although it might update its internal state
+ in a way that is consistent with immutability.
+
+ """
+
+ __slots__ = ["_text", "_spans", "_cell_length"]
+
+ _NORMALIZE_TEXT_ALIGN = {"start": "left", "end": "right", "justify": "full"}
+
+ def __init__(
+ self,
+ text: str,
+ spans: list[Span] | None = None,
+ cell_length: int | None = None,
+ align: TextAlign = "left",
+ no_wrap: bool = False,
+ ellipsis: bool = False,
+ ) -> None:
+ """
+
+ Args:
+ text: text content.
+ spans: Optional list of spans.
+ cell_length: Cell length of text if known, otherwise `None`.
+ align: Align method.
+ no_wrap: Disable wrapping.
+ ellipsis: Add ellipsis when wrapping is disabled and text is cropped.
+ """
+ self._text: str = text
+ self._spans: list[Span] = [] if spans is None else spans
+ self._cell_length = cell_length
+ self._align = align
+ self._no_wrap = no_wrap
+ self._ellipsis = ellipsis
+
+ @classmethod
+ def from_rich_text(
+ cls,
+ text: str | Text,
+ align: TextAlign = "left",
+ no_wrap: bool = False,
+ ellipsis: bool = False,
+ ) -> Content:
+ """Create equivalent Visual Content for str or Text.
+
+ Args:
+ text: String or Rich Text.
+ align: Align method.
+ no_wrap: Disable wrapping.
+ ellipsis: Add ellipsis when wrapping is disabled and text is cropped.
+
+ Returns:
+ New Content.
+ """
+ if isinstance(text, str):
+ return cls(text, align=align, no_wrap=no_wrap, ellipsis=ellipsis)
+ spans = [
+ Span(
+ start,
+ end,
+ style if isinstance(style, str) else Style.from_rich_style(style),
+ )
+ for start, end, style in text._spans
+ ]
+ return cls(
+ text.plain,
+ spans,
+ align=align,
+ no_wrap=no_wrap,
+ ellipsis=ellipsis,
+ )
+
+ @classmethod
+ def styled(
+ cls,
+ text: str,
+ style: Style | str = "",
+ cell_length: int | None = None,
+ align: TextAlign = "left",
+ no_wrap: bool = False,
+ ellipsis: bool = False,
+ ) -> Content:
+ """Create a Content instance from a single styled piece of text.
+
+ Args:
+ text: String content.
+ style: Desired style.
+ cell_length: Cell length of text if known, otherwise `None`.
+ align: Text alignment.
+ no_wrap: Disable wrapping.
+ ellipsis: Add ellipsis when wrapping is disabled and text is cropped.
+
+ Returns:
+ New Content instance.
+ """
+ if not text:
+ return Content("", align=align, no_wrap=no_wrap, ellipsis=ellipsis)
+ span_length = cell_len(text) if cell_length is None else cell_length
+ new_content = cls(
+ text,
+ [Span(0, span_length, style)],
+ span_length,
+ align=align,
+ no_wrap=no_wrap,
+ ellipsis=ellipsis,
+ )
+ return new_content
+
+ def get_optimal_width(self, container_width: int) -> int:
+ lines = self.without_spans.split("\n")
+ return max(line.cell_length for line in lines)
+
+ def render_strips(
+ self,
+ widget: Widget,
+ width: int,
+ height: int | None,
+ style: Style,
+ ) -> list[Strip]:
+ if not width:
+ return []
+
+ lines = self.wrap(
+ width,
+ align=self._align,
+ overflow=(
+ ("ellipsis" if self._ellipsis else "crop") if self._no_wrap else "fold"
+ ),
+ no_wrap=False,
+ tab_size=8,
+ )
+ if height is not None:
+ lines = lines[:height]
+
+ return [Strip(line.render_segments(style), line.cell_length) for line in lines]
+
+ def get_height(self, width: int) -> int:
+ lines = self.wrap(width)
+ return len(lines)
+
+ def __len__(self) -> int:
+ return len(self.plain)
+
+ def __bool__(self) -> bool:
+ return self._text != ""
+
+ def __hash__(self) -> int:
+ return hash(self._text)
+
+ def __rich_repr__(self) -> rich.repr.Result:
+ yield self._text
+ yield "spans", self._spans, []
+
+ @property
+ def cell_length(self) -> int:
+ """The cell length of the content."""
+ if self._cell_length is None:
+ self._cell_length = cell_len(self.plain)
+ return self._cell_length
+
+ @property
+ def align(self) -> TextAlign:
+ """Text alignment."""
+ return self._align
+
+ @property
+ def no_wrap(self) -> bool:
+ """Disable text wrapping?"""
+ return self._no_wrap
+
+ @property
+ def ellipsis(self) -> bool:
+ """Crop text with ellipsis?"""
+ return self._ellipsis
+
+ @property
+ def plain(self) -> str:
+ """Get the text as a single string."""
+ return self._text
+
+ @property
+ def without_spans(self) -> Content:
+ """The content with no spans"""
+ return Content(
+ self.plain,
+ [],
+ self._cell_length,
+ align=self._align,
+ no_wrap=self._no_wrap,
+ ellipsis=self._ellipsis,
+ )
+
+ def __getitem__(self, slice: int | slice) -> Content:
+ def get_text_at(offset: int) -> "Content":
+ _Span = Span
+ content = Content(
+ self.plain[offset],
+ spans=[
+ _Span(0, 1, style)
+ for start, end, style in self._spans
+ if end > offset >= start
+ ],
+ )
+ return content
+
+ if isinstance(slice, int):
+ return get_text_at(slice)
+ else:
+ start, stop, step = slice.indices(len(self.plain))
+ if step == 1:
+ lines = self.divide([start, stop])
+ return lines[1]
+ else:
+ # This would be a bit of work to implement efficiently
+ # For now, its not required
+ raise TypeError("slices with step!=1 are not supported")
+
+ def __add__(self, other: object) -> Content:
+ if isinstance(other, str):
+ return Content(self._text + other, self._spans.copy())
+ if isinstance(other, Content):
+ offset = len(self.plain)
+ content = Content(
+ self.plain + other.plain,
+ [
+ *self._spans,
+ *[
+ Span(start + offset, end + offset, style)
+ for start, end, style in other._spans
+ ],
+ ],
+ (
+ self.cell_length + other._cell_length
+ if other._cell_length is not None
+ else None
+ ),
+ )
+ return content
+ return NotImplemented
+
+ @classmethod
+ def _trim_spans(cls, text: str, spans: list[Span]) -> list[Span]:
+ """Remove or modify any spans that are over the end of the text."""
+ max_offset = len(text)
+ _Span = Span
+ spans = [
+ (
+ span
+ if span.end < max_offset
+ else _Span(span.start, min(max_offset, span.end), span.style)
+ )
+ for span in spans
+ if span.start < max_offset
+ ]
+ return spans
+
+ def append(self, content: Content | str) -> Content:
+ """Append text or content to this content.
+
+ Note this is a little inefficient, if you have many strings to append, consider [`join`][textual.content.Content.join].
+
+ Args:
+ content: A content instance, or a string.
+
+ Returns:
+ New content.
+ """
+ if isinstance(content, str):
+ return Content(
+ f"{self.plain}{content}",
+ self._spans,
+ (
+ None
+ if self._cell_length is None
+ else self._cell_length + cell_len(content)
+ ),
+ align=self.align,
+ no_wrap=self.no_wrap,
+ ellipsis=self.ellipsis,
+ )
+ return Content("").join([self, content])
+
+ def append_text(self, text: str, style: Style | str = "") -> Content:
+ return self.append(Content.styled(text, style))
+
+ def join(self, lines: Iterable[Content]) -> Content:
+ """Join an iterable of content.
+
+ Args:
+ lines (_type_): An iterable of content instances.
+
+ Returns:
+ A single Content instance, containing all of the lines.
+
+ """
+ text: list[str] = []
+ spans: list[Span] = []
+
+ def iter_content() -> Iterable[Content]:
+ """Iterate the lines, optionally inserting the separator."""
+ if self.plain:
+ for last, line in loop_last(lines):
+ yield line
+ if not last:
+ yield self
+ else:
+ yield from lines
+
+ extend_text = text.extend
+ extend_spans = spans.extend
+ offset = 0
+ _Span = Span
+
+ total_cell_length: int | None = self._cell_length
+
+ for content in iter_content():
+ extend_text(content._text)
+ extend_spans(
+ _Span(offset + start, offset + end, style)
+ for start, end, style in content._spans
+ )
+ offset += len(content._text)
+ if total_cell_length is not None:
+ total_cell_length = (
+ None
+ if content._cell_length is None
+ else total_cell_length + content._cell_length
+ )
+
+ return Content("".join(text), spans, total_cell_length)
+
+ def get_style_at_offset(self, offset: int) -> Style:
+ """Get the style of a character at give offset.
+
+ Args:
+ offset (int): Offset in to text (negative indexing supported)
+
+ Returns:
+ Style: A Style instance.
+ """
+ # TODO: This is a little inefficient, it is only used by full justify
+ if offset < 0:
+ offset = len(self) + offset
+
+ style = Style()
+ for start, end, span_style in self._spans:
+ if end > offset >= start:
+ style += span_style
+ return style
+
+ def truncate(
+ self,
+ max_width: int,
+ *,
+ overflow: OverflowMethod = "fold",
+ pad: bool = False,
+ ) -> Content:
+ if overflow == "ignore":
+ return self
+
+ length = cell_len(self.plain)
+ text = self.plain
+ if length > max_width:
+ if overflow == "ellipsis":
+ text = set_cell_size(self.plain, max_width - 1) + "…"
+ else:
+ text = set_cell_size(self.plain, max_width)
+ if pad and length < max_width:
+ spaces = max_width - length
+ text = f"{self.plain}{' ' * spaces}"
+ length = len(self.plain)
+ spans = self._trim_spans(text, self._spans)
+ return Content(text, spans)
+
+ def pad_left(self, count: int, character: str = " ") -> Content:
+ """Pad the left with a given character.
+
+ Args:
+ count (int): Number of characters to pad.
+ character (str, optional): Character to pad with. Defaults to " ".
+ """
+ assert len(character) == 1, "Character must be a string of length 1"
+ if count:
+ text = f"{character * count}{self.plain}"
+ _Span = Span
+ spans = [
+ _Span(start + count, end + count, style)
+ for start, end, style in self._spans
+ ]
+ return Content(
+ text,
+ spans,
+ None if self._cell_length is None else self._cell_length + count,
+ )
+ return self
+
+ def extend_right(self, count: int, character: str = " ") -> Content:
+ """Add repeating characters (typically spaces) to the content with the style(s) of the last character.
+
+ Args:
+ count: Number of spaces.
+ character: Character to add with.
+
+ Returns:
+ A Content instance.
+ """
+ if count:
+ plain = self.plain
+ plain_len = len(plain)
+ return Content(
+ f"{plain}{character * count}",
+ [
+ (span.extend(count) if span.end == plain_len else span)
+ for span in self._spans
+ ],
+ None if self._cell_length is None else self._cell_length + count,
+ )
+ return self
+
+ def pad_right(self, count: int, character: str = " ") -> Content:
+ """Pad the right with a given character.
+
+ Args:
+ count (int): Number of characters to pad.
+ character (str, optional): Character to pad with. Defaults to " ".
+ """
+ assert len(character) == 1, "Character must be a string of length 1"
+ if count:
+ return Content(
+ f"{self.plain}{character * count}",
+ self._spans,
+ None if self._cell_length is None else self._cell_length + count,
+ )
+ return self
+
+ def center(self, width: int, ellipsis: bool = False) -> Content:
+ """Align a line to the center.
+
+ Args:
+ width: Desired width of output.
+ ellipsis: Insert ellipsis if content is truncated.
+
+ Returns:
+ New line Content.
+ """
+ content = self.rstrip().truncate(
+ width, overflow="ellipsis" if ellipsis else "fold"
+ )
+ left = (content.cell_length - width) // 2
+ right = width = left
+ content = content.pad_left(left).pad_right(right)
+ return content
+
+ def right(self, width: int, ellipsis: bool = False) -> Content:
+ """Align a line to the right.
+
+ Args:
+ width: Desired width of output.
+ ellipsis: Insert ellipsis if content is truncated.
+
+ Returns:
+ New line Content.
+ """
+ content = self.rstrip().truncate(
+ width, overflow="ellipsis" if ellipsis else "fold"
+ )
+ content = content.pad_left(width - content.cell_length)
+ return content
+
+ def right_crop(self, amount: int = 1) -> Content:
+ """Remove a number of characters from the end of the text."""
+ max_offset = len(self.plain) - amount
+ _Span = Span
+ spans = [
+ (
+ span
+ if span.end < max_offset
+ else _Span(span.start, min(max_offset, span.end), span.style)
+ )
+ for span in self._spans
+ if span.start < max_offset
+ ]
+ text = self.plain[:-amount]
+ length = None if self._cell_length is None else self._cell_length - amount
+ return Content(text, spans, length)
+
+ def stylize(
+ self, style: Style | str, start: int = 0, end: int | None = None
+ ) -> Content:
+ """Apply a style to the text, or a portion of the text.
+
+ Args:
+ style (Union[str, Style]): Style instance or style definition to apply.
+ start (int): Start offset (negative indexing is supported). Defaults to 0.
+ end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
+ """
+ if not style:
+ return self
+ length = len(self)
+ if start < 0:
+ start = length + start
+ if end is None:
+ end = length
+ if end < 0:
+ end = length + end
+ if start >= length or end <= start:
+ # Span not in text or not valid
+ return self
+ return Content(
+ self.plain,
+ [*self._spans, Span(start, length if length < end else end, style)],
+ )
+
+ def stylize_before(
+ self,
+ style: Style | str,
+ start: int = 0,
+ end: int | None = None,
+ ) -> Content:
+ """Apply a style to the text, or a portion of the text. Styles will be applied before other styles already present.
+
+ Args:
+ style (Union[str, Style]): Style instance or style definition to apply.
+ start (int): Start offset (negative indexing is supported). Defaults to 0.
+ end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
+ """
+ if not style:
+ return self
+ length = len(self)
+ if start < 0:
+ start = length + start
+ if end is None:
+ end = length
+ if end < 0:
+ end = length + end
+ if start >= length or end <= start:
+ # Span not in text or not valid
+ return self
+ return Content(
+ self.plain,
+ [Span(start, length if length < end else end, style), *self._spans],
+ )
+
+ def render(
+ self,
+ base_style: Style,
+ end: str = "\n",
+ parse_style: Callable[[str], Style] | None = None,
+ ) -> Iterable[tuple[str, Style]]:
+ if not self._spans:
+ yield self._text, base_style
+ if end:
+ yield end, base_style
+ return
+
+ if parse_style is None:
+
+ def get_style(style: str, /) -> Style:
+ return TRANSPARENT_STYLE if isinstance(style, str) else style
+
+ else:
+ get_style = parse_style
+
+ enumerated_spans = list(enumerate(self._spans, 1))
+ style_map = {
+ index: (
+ get_style(span.style) if isinstance(span.style, str) else span.style
+ )
+ for index, span in enumerated_spans
+ }
+ style_map[0] = base_style
+ text = self.plain
+
+ spans = [
+ (0, False, 0),
+ *((span.start, False, index) for index, span in enumerated_spans),
+ *((span.end, True, index) for index, span in enumerated_spans),
+ (len(text), True, 0),
+ ]
+ spans.sort(key=itemgetter(0, 1))
+
+ stack: list[int] = []
+ stack_append = stack.append
+ stack_pop = stack.remove
+
+ style_cache: dict[tuple[int, ...], Style] = {}
+ style_cache_get = style_cache.get
+ combine = Style.combine
+
+ def get_current_style() -> Style:
+ """Construct current style from stack."""
+ cache_key = tuple(stack)
+ cached_style = style_cache_get(cache_key)
+ if cached_style is not None:
+ return cached_style
+ styles = [style_map[_style_id] for _style_id in cache_key]
+ current_style = combine(styles)
+ style_cache[cache_key] = current_style
+ return current_style
+
+ for (offset, leaving, style_id), (next_offset, _, _) in zip(spans, spans[1:]):
+ if leaving:
+ stack_pop(style_id)
+ else:
+ stack_append(style_id)
+ if next_offset > offset:
+ yield text[offset:next_offset], get_current_style()
+ if end:
+ yield end, base_style
+
+ def render_segments(self, base_style: Style, end: str = "") -> list[Segment]:
+ _Segment = Segment
+ segments = [
+ _Segment(text, style.rich_style)
+ for text, style in self.render(base_style, end)
+ ]
+ return segments
+
+ def divide(self, offsets: Sequence[int]) -> list[Content]:
+ if not offsets:
+ return [self]
+
+ text = self.plain
+ text_length = len(text)
+ divide_offsets = [0, *offsets, text_length]
+ line_ranges = list(zip(divide_offsets, divide_offsets[1:]))
+
+ new_lines = [Content(text[start:end]) for start, end in line_ranges]
+ if not self._spans:
+ return new_lines
+
+ _line_appends = [line._spans.append for line in new_lines]
+ line_count = len(line_ranges)
+ _Span = Span
+
+ for span_start, span_end, style in self._spans:
+ lower_bound = 0
+ upper_bound = line_count
+ start_line_no = (lower_bound + upper_bound) // 2
+
+ while True:
+ line_start, line_end = line_ranges[start_line_no]
+ if span_start < line_start:
+ upper_bound = start_line_no - 1
+ elif span_start > line_end:
+ lower_bound = start_line_no + 1
+ else:
+ break
+ start_line_no = (lower_bound + upper_bound) // 2
+
+ if span_end < line_end:
+ end_line_no = start_line_no
+ else:
+ end_line_no = lower_bound = start_line_no
+ upper_bound = line_count
+
+ while True:
+ line_start, line_end = line_ranges[end_line_no]
+ if span_end < line_start:
+ upper_bound = end_line_no - 1
+ elif span_end > line_end:
+ lower_bound = end_line_no + 1
+ else:
+ break
+ end_line_no = (lower_bound + upper_bound) // 2
+
+ for line_no in range(start_line_no, end_line_no + 1):
+ line_start, line_end = line_ranges[line_no]
+ new_start = max(0, span_start - line_start)
+ new_end = min(span_end - line_start, line_end - line_start)
+ if new_end > new_start:
+ _line_appends[line_no](_Span(new_start, new_end, style))
+
+ return new_lines
+
+ def split(
+ self,
+ separator: str = "\n",
+ *,
+ include_separator: bool = False,
+ allow_blank: bool = False,
+ ) -> list[Content]:
+ """Split rich text in to lines, preserving styles.
+
+ Args:
+ separator (str, optional): String to split on. Defaults to "\\\\n".
+ include_separator (bool, optional): Include the separator in the lines. Defaults to False.
+ allow_blank (bool, optional): Return a blank line if the text ends with a separator. Defaults to False.
+
+ Returns:
+ List[Content]: A list of Content, one per line of the original.
+ """
+ assert separator, "separator must not be empty"
+
+ text = self.plain
+ if separator not in text:
+ return [self]
+
+ if include_separator:
+ lines = self.divide(
+ [match.end() for match in re.finditer(re.escape(separator), text)]
+ )
+ else:
+
+ def flatten_spans() -> Iterable[int]:
+ for match in re.finditer(re.escape(separator), text):
+ yield from match.span()
+
+ lines = [
+ line
+ for line in self.divide(list(flatten_spans()))
+ if line.plain != separator
+ ]
+
+ if not allow_blank and text.endswith(separator):
+ lines.pop()
+
+ return lines
+
+ def rstrip(self, chars: str | None = None) -> Content:
+ """Strip characters from end of text."""
+ text = self.plain.rstrip(chars)
+ return Content(text, self._trim_spans(text, self._spans))
+
+ def rstrip_end(self, size: int) -> Content:
+ """Remove whitespace beyond a certain width at the end of the text.
+
+ Args:
+ size (int): The desired size of the text.
+ """
+ text_length = len(self)
+ if text_length > size:
+ excess = text_length - size
+ whitespace_match = _re_whitespace.search(self.plain)
+ if whitespace_match is not None:
+ whitespace_count = len(whitespace_match.group(0))
+ return self.right_crop(min(whitespace_count, excess))
+ return self
+
+ def extend_style(self, spaces: int) -> Content:
+ """Extend the Text given number of spaces where the spaces have the same style as the last character.
+
+ Args:
+ spaces (int): Number of spaces to add to the Text.
+ """
+ if spaces <= 0:
+ return self
+ spans = self._spans
+ new_spaces = " " * spaces
+ if spans:
+ end_offset = len(self)
+ spans = [
+ span.extend(spaces) if span.end >= end_offset else span
+ for span in spans
+ ]
+ return Content(self._text + new_spaces, spans, self.cell_length + spaces)
+ return Content(self._text + new_spaces, self._spans, self._cell_length)
+
+ def expand_tabs(self, tab_size: int = 8) -> Content:
+ """Converts tabs to spaces.
+
+ Args:
+ tab_size (int, optional): Size of tabs. Defaults to 8.
+
+ """
+ if "\t" not in self.plain:
+ return self
+
+ new_text: list[Content] = []
+ append = new_text.append
+
+ for line in self.split("\n", include_separator=True):
+ if "\t" not in line.plain:
+ append(line)
+ else:
+ cell_position = 0
+ parts = line.split("\t", include_separator=True)
+ for part in parts:
+ if part.plain.endswith("\t"):
+ part = Content(
+ part._text[-1][:-1] + " ", part._spans, part._cell_length
+ )
+ cell_position += part.cell_length
+ tab_remainder = cell_position % tab_size
+ if tab_remainder:
+ spaces = tab_size - tab_remainder
+ part = part.extend_style(spaces)
+ cell_position += spaces
+ else:
+ cell_position += part.cell_length
+ append(part)
+
+ content = Content("").join(new_text)
+ return content
+
+ def wrap(
+ self,
+ width: int,
+ align: TextAlign = "left",
+ overflow: OverflowMethod = "fold",
+ no_wrap: bool = False,
+ tab_size: int = 8,
+ ) -> list[Content]:
+ lines: list[Content] = []
+ for line in self.split(allow_blank=True):
+ if "\t" in line._text:
+ line = line.expand_tabs(tab_size)
+ if no_wrap:
+ new_lines = [line]
+ else:
+ offsets = divide_line(line._text, width, fold=overflow == "fold")
+ new_lines = line.divide(offsets)
+ new_lines = [line.rstrip_end(width) for line in new_lines]
+ new_lines = _align_lines(new_lines, width, align=align, overflow=overflow)
+ new_lines = [line.truncate(width, overflow=overflow) for line in new_lines]
+ lines.extend(new_lines)
+ return lines
+
+ def highlight_regex(
+ self,
+ re_highlight: re.Pattern[str] | str,
+ style: Style,
+ ) -> Content:
+ spans: list[Span] = self._spans.copy()
+ append_span = spans.append
+ _Span = Span
+ plain = self.plain
+ if isinstance(re_highlight, str):
+ re_highlight = re.compile(re_highlight)
+ for match in re_highlight.finditer(plain):
+ start, end = match.span()
+ if end > start:
+ append_span(_Span(start, end, style))
+ return Content(self._text, spans)
+
+
+if __name__ == "__main__":
+ from rich import print
+
+ TEXT = """I must not fear.
+Fear is the mind-killer.
+Fear is the little-death that brings total obliteration.
+I will face my fear.
+I will permit it to pass over me and through me.
+And when it has gone past, I will turn the inner eye to see its path.
+Where the fear has gone there will be nothing. Only I will remain."""
+
+ content = Content(TEXT)
+ content = content.stylize(
+ Style(Color.parse("rgb(50,50,80)"), Color.parse("rgba(255,255,255,0.7)"))
+ )
+
+ content = content.highlight_regex(
+ "F..r", Style(background=Color.parse("rgba(255, 255, 255, 0.3)"))
+ )
+
+ content = content.highlight_regex(
+ "is", Style(background=Color.parse("rgba(20, 255, 255, 0.3)"))
+ )
+
+ content = content.highlight_regex(
+ "the", Style(background=Color.parse("rgba(255, 20, 255, 0.3)"))
+ )
+
+ content = content.highlight_regex(
+ "will", Style(background=Color.parse("rgba(255, 255, 20, 0.3)"))
+ )
+
+ lines = content.wrap(40, align="full")
+ print(lines)
+ print("x" * 40)
+ for line in lines:
+ segments = Segments(line.render_segments(ANSI_DEFAULT, end="\n"))
+ print(segments)
diff --git a/contrib/python/textual/textual/css/_style_properties.py b/contrib/python/textual/textual/css/_style_properties.py
index 3fb548de8a1..d7f8f8a70bb 100644
--- a/contrib/python/textual/textual/css/_style_properties.py
+++ b/contrib/python/textual/textual/css/_style_properties.py
@@ -808,8 +808,8 @@ class StringEnumProperty(Generic[EnumType]):
"""Get the string property, or the default value if it's not set.
Args:
- obj: The ``Styles`` object.
- objtype: The ``Styles`` class.
+ obj: The `Styles` object.
+ objtype: The `Styles` class.
Returns:
The string property value.
@@ -823,7 +823,7 @@ class StringEnumProperty(Generic[EnumType]):
"""Set the string property and ensure it is in the set of allowed values.
Args:
- obj: The ``Styles`` object.
+ obj: The `Styles` object.
value: The string value to set the property to.
Raises:
diff --git a/contrib/python/textual/textual/css/stylesheet.py b/contrib/python/textual/textual/css/stylesheet.py
index dd321a2fa49..fe3e3fac6ea 100644
--- a/contrib/python/textual/textual/css/stylesheet.py
+++ b/contrib/python/textual/textual/css/stylesheet.py
@@ -482,7 +482,10 @@ class Stylesheet:
node._has_hover_style = "hover" in all_pseudo_classes
node._has_focus_within = "focus-within" in all_pseudo_classes
node._has_order_style = not all_pseudo_classes.isdisjoint(
- {"first-of-type", "last-of-type", "odd", "even"}
+ {"first-of-type", "last-of-type"}
+ )
+ node._has_odd_or_even = (
+ "odd" in all_pseudo_classes or "even" in all_pseudo_classes
)
cache_key: tuple | None = None
diff --git a/contrib/python/textual/textual/demo/data.py b/contrib/python/textual/textual/demo/data.py
index 6023ec83e2a..01ca66e58dc 100644
--- a/contrib/python/textual/textual/demo/data.py
+++ b/contrib/python/textual/textual/demo/data.py
@@ -1,3 +1,5 @@
+import json
+
COUNTRIES = [
"Afghanistan",
"Albania",
@@ -196,3 +198,261 @@ COUNTRIES = [
"Zambia",
"Zimbabwe",
]
+# Sort by length for auto-complete
+COUNTRIES.sort(key=str.__len__)
+
+# Thanks, Claude
+MOVIES = """\
+Date,Title,Genre,Director,Box Office (millions),Rating,Runtime (min)
+1980-01-18,The Fog,Horror,John Carpenter,21,R,89
+1980-02-15,Coal Miner's Daughter,Biography,Michael Apted,67,PG,124
+1980-03-07,Little Miss Marker,Comedy,Walter Bernstein,12,PG,103
+1980-04-11,The Long Riders,Western,Walter Hill,15,R,100
+1980-05-21,The Empire Strikes Back,Sci-Fi,Irvin Kershner,538,PG,124
+1980-06-13,The Blues Brothers,Comedy,John Landis,115,R,133
+1980-07-02,Airplane!,Comedy,Jim Abrahams,83,PG,88
+1980-08-01,Caddyshack,Comedy,Harold Ramis,39,R,98
+1980-09-19,The Big Red One,War,Samuel Fuller,24,PG,113
+1980-10-10,Private Benjamin,Comedy,Howard Zieff,69,R,109
+1980-11-07,The Stunt Man,Action,Richard Rush,7,R,131
+1980-12-19,Nine to Five,Comedy,Colin Higgins,103,PG,109
+1981-01-23,Scanners,Horror,David Cronenberg,14,R,103
+1981-02-20,The Final Conflict,Horror,Graham Baker,20,R,108
+1981-03-20,Raiders of the Lost Ark,Action,Steven Spielberg,389,PG,115
+1981-04-10,Excalibur,Fantasy,John Boorman,35,R,140
+1981-05-22,Outland,Sci-Fi,Peter Hyams,17,R,109
+1981-06-19,Superman II,Action,Richard Lester,108,PG,127
+1981-07-17,Escape from New York,Sci-Fi,John Carpenter,25,R,99
+1981-08-07,An American Werewolf in London,Horror,John Landis,30,R,97
+1981-09-25,Continental Divide,Romance,Michael Apted,15,PG,103
+1981-10-16,True Confessions,Drama,Ulu Grosbard,12,R,108
+1981-11-20,Time Bandits,Fantasy,Terry Gilliam,42,PG,116
+1981-12-04,Rollover,Drama,Alan J. Pakula,11,R,116
+1982-01-15,The Beast Within,Horror,Philippe Mora,7,R,98
+1982-02-12,Quest for Fire,Adventure,Jean-Jacques Annaud,20,R,100
+1982-03-19,Porky's,Comedy,Bob Clark,105,R,94
+1982-04-16,The Sword and the Sorcerer,Fantasy,Albert Pyun,39,R,99
+1982-05-14,Conan the Barbarian,Fantasy,John Milius,68,R,129
+1982-06-04,Star Trek II: The Wrath of Khan,Sci-Fi,Nicholas Meyer,97,PG,113
+1982-06-11,E.T. the Extra-Terrestrial,Sci-Fi,Steven Spielberg,792,PG,115
+1982-06-25,Blade Runner,Sci-Fi,Ridley Scott,33,R,117
+1982-07-16,The World According to Garp,Comedy-Drama,George Roy Hill,29,R,136
+1982-08-13,Fast Times at Ridgemont High,Comedy,Amy Heckerling,27,R,90
+1982-09-17,The Challenge,Action,John Frankenheimer,9,R,108
+1982-10-22,First Blood,Action,Ted Kotcheff,47,R,93
+1982-11-12,The Man from Snowy River,Western,George Miller,20,PG,102
+1982-12-08,48 Hrs.,Action,Walter Hill,79,R,96
+1983-01-21,The Entity,Horror,Sidney J. Furie,13,R,125
+1983-02-18,The Year of Living Dangerously,Drama,Peter Weir,10,PG,115
+1983-03-25,The Outsiders,Drama,Francis Ford Coppola,25,PG,91
+1983-04-22,Something Wicked This Way Comes,Horror,Jack Clayton,5,PG,95
+1983-05-25,Return of the Jedi,Sci-Fi,Richard Marquand,475,PG,131
+1983-06-17,Superman III,Action,Richard Lester,60,PG,125
+1983-07-15,Class,Comedy,Lewis John Carlino,21,R,98
+1983-08-19,Curse of the Pink Panther,Comedy,Blake Edwards,9,PG,109
+1983-09-23,The Big Chill,Drama,Lawrence Kasdan,56,R,105
+1983-10-07,The Right Stuff,Drama,Philip Kaufman,21,PG,193
+1983-11-04,Deal of the Century,Comedy,William Friedkin,10,PG,99
+1983-12-09,Scarface,Crime,Brian De Palma,65,R,170
+1984-01-13,Terms of Endearment,Drama,James L. Brooks,108,PG,132
+1984-02-17,Unfaithfully Yours,Comedy,Howard Zieff,12,PG,96
+1984-03-16,Splash,Romance,Ron Howard,69,PG,111
+1984-04-13,Friday the 13th: The Final Chapter,Horror,Joseph Zito,32,R,91
+1984-05-04,Sixteen Candles,Comedy,John Hughes,23,PG,93
+1984-06-08,Ghostbusters,Comedy,Ivan Reitman,295,PG,105
+1984-07-06,The Last Starfighter,Sci-Fi,Nick Castle,28,PG,101
+1984-08-10,Red Dawn,Action,John Milius,38,PG-13,114
+1984-09-14,All of Me,Comedy,Carl Reiner,40,PG,93
+1984-10-26,The Terminator,Sci-Fi,James Cameron,78,R,107
+1984-11-16,Missing in Action,Action,Joseph Zito,22,R,101
+1984-12-14,Dune,Sci-Fi,David Lynch,30,PG-13,137
+1985-01-18,A Nightmare on Elm Street,Horror,Wes Craven,25,R,91
+1985-02-15,The Breakfast Club,Drama,John Hughes,45,R,97
+1985-03-29,Mask,Drama,Peter Bogdanovich,42,PG-13,120
+1985-04-26,Code of Silence,Action,Andrew Davis,20,R,101
+1985-05-22,Rambo: First Blood Part II,Action,George P. Cosmatos,150,R,96
+1985-06-07,The Goonies,Adventure,Richard Donner,61,PG,114
+1985-07-03,Back to the Future,Sci-Fi,Robert Zemeckis,381,PG,116
+1985-08-16,Year of the Dragon,Crime,Michael Cimino,18,R,134
+1985-09-20,Invasion U.S.A.,Action,Joseph Zito,17,R,107
+1985-10-18,Silver Bullet,Horror,Daniel Attias,12,R,95
+1985-11-22,Rocky IV,Drama,Sylvester Stallone,127,PG,91
+1985-12-20,The Color Purple,Drama,Steven Spielberg,142,PG-13,154
+1986-01-17,Iron Eagle,Action,Sidney J. Furie,24,PG-13,117
+1986-02-21,Crossroads,Drama,Walter Hill,5,R,99
+1986-03-21,Highlander,Fantasy,Russell Mulcahy,12,R,116
+1986-04-18,Legend,Fantasy,Ridley Scott,15,PG,89
+1986-05-16,Top Gun,Action,Tony Scott,357,PG,110
+1986-06-27,Running Scared,Action,Peter Hyams,38,R,107
+1986-07-18,Aliens,Sci-Fi,James Cameron,131,R,137
+1986-08-08,Stand By Me,Drama,Rob Reiner,52,R,89
+1986-09-19,Blue Velvet,Mystery,David Lynch,8,R,120
+1986-10-24,The Name of the Rose,Mystery,Jean-Jacques Annaud,7,R,130
+1986-11-21,An American Tail,Animation,Don Bluth,47,G,80
+1986-12-19,Star Trek IV: The Voyage Home,Sci-Fi,Leonard Nimoy,109,PG,119
+1987-01-23,Critical Condition,Comedy,Michael Apted,19,R,98
+1987-02-20,Death Before Dishonor,Action,Terry Leonard,3,R,91
+1987-03-13,Lethal Weapon,Action,Richard Donner,65,R,110
+1987-04-10,Project X,Drama,Jonathan Kaplan,28,PG,108
+1987-05-22,Beverly Hills Cop II,Action,Tony Scott,276,R,100
+1987-06-19,Predator,Sci-Fi,John McTiernan,98,R,107
+1987-07-17,RoboCop,Action,Paul Verhoeven,53,R,102
+1987-08-14,No Way Out,Thriller,Roger Donaldson,35,R,114
+1987-09-18,Fatal Beauty,Action,Tom Holland,12,R,104
+1987-10-23,Fatal Attraction,Thriller,Adrian Lyne,320,R,119
+1987-11-13,Running Man,Sci-Fi,Paul Michael Glaser,38,R,101
+1987-12-18,Wall Street,Drama,Oliver Stone,43,R,126
+1988-01-15,Return of the Living Dead Part II,Horror,Ken Wiederhorn,9,R,89
+1988-02-12,Action Jackson,Action,Craig R. Baxley,20,R,96
+1988-03-18,D.O.A.,Thriller,Rocky Morton,12,R,96
+1988-04-29,Colors,Crime,Dennis Hopper,46,R,120
+1988-05-20,Willow,Fantasy,Ron Howard,57,PG,126
+1988-06-21,Big,Comedy,Penny Marshall,151,PG,104
+1988-07-15,Die Hard,Action,John McTiernan,140,R,132
+1988-08-05,Young Guns,Western,Christopher Cain,45,R,107
+1988-09-16,Moon Over Parador,Comedy,Paul Mazursky,11,PG-13,103
+1988-10-21,Halloween 4,Horror,Dwight H. Little,17,R,88
+1988-11-11,Child's Play,Horror,Tom Holland,33,R,87
+1988-12-21,Rain Man,Drama,Barry Levinson,172,R,133
+1989-01-13,Deep Star Six,Sci-Fi,Sean S. Cunningham,8,R,99
+1989-02-17,Bill & Ted's Excellent Adventure,Comedy,Stephen Herek,40,PG,90
+1989-03-24,Leviathan,Sci-Fi,George P. Cosmatos,15,R,98
+1989-04-14,Major League,Comedy,David S. Ward,49,R,107
+1989-05-24,Indiana Jones and the Last Crusade,Action,Steven Spielberg,474,PG-13,127
+1989-06-23,Batman,Action,Tim Burton,411,PG-13,126
+1989-07-07,Lethal Weapon 2,Action,Richard Donner,227,R,114
+1989-08-11,A Nightmare on Elm Street 5,Horror,Stephen Hopkins,22,R,89
+1989-09-22,Black Rain,Action,Ridley Scott,46,R,125
+1989-10-20,Look Who's Talking,Comedy,Amy Heckerling,140,PG-13,93
+1989-11-17,All Dogs Go to Heaven,Animation,Don Bluth,27,G,84
+1989-12-20,Tango & Cash,Action,Andrei Konchalovsky,63,R,104
+"""
+
+MOVIES_JSON = """{
+ "decades": {
+ "1980s": {
+ "genres": {
+ "action": {
+ "franchises": {
+ "terminator": {
+ "name": "The Terminator",
+ "movies": [
+ {
+ "title": "The Terminator",
+ "year": 1984,
+ "director": "James Cameron",
+ "stars": ["Arnold Schwarzenegger", "Linda Hamilton", "Michael Biehn"],
+ "boxOffice": 78371200,
+ "quotes": ["I'll be back", "Come with me if you want to live"]
+ }
+ ]
+ },
+ "rambo": {
+ "name": "Rambo",
+ "movies": [
+ {
+ "title": "First Blood",
+ "year": 1982,
+ "director": "Ted Kotcheff",
+ "stars": ["Sylvester Stallone", "Richard Crenna", "Brian Dennehy"],
+ "boxOffice": 47212904
+ },
+ {
+ "title": "Rambo: First Blood Part II",
+ "year": 1985,
+ "director": "George P. Cosmatos",
+ "stars": ["Sylvester Stallone", "Richard Crenna", "Charles Napier"],
+ "boxOffice": 150415432
+ }
+ ]
+ }
+ },
+ "standalone_classics": {
+ "die_hard": {
+ "title": "Die Hard",
+ "year": 1988,
+ "director": "John McTiernan",
+ "stars": ["Bruce Willis", "Alan Rickman", "Reginald VelJohnson"],
+ "boxOffice": 140700000,
+ "location": "Nakatomi Plaza",
+ "quotes": ["Yippee-ki-yay, motherf***er"]
+ },
+ "predator": {
+ "title": "Predator",
+ "year": 1987,
+ "director": "John McTiernan",
+ "stars": ["Arnold Schwarzenegger", "Carl Weathers", "Jesse Ventura"],
+ "boxOffice": 98267558,
+ "location": "Val Verde jungle",
+ "quotes": ["Get to the chopper!"]
+ }
+ },
+ "common_themes": [
+ "Cold War politics",
+ "One man army",
+ "Revenge plots",
+ "Military operations",
+ "Law enforcement"
+ ],
+ "typical_elements": {
+ "weapons": ["M60 machine gun", "Desert Eagle", "Explosive arrows"],
+ "vehicles": ["Military helicopters", "Muscle cars", "Tanks"],
+ "locations": ["Urban jungle", "Actual jungle", "Industrial facilities"]
+ }
+ }
+ }
+ }
+ },
+ "metadata": {
+ "total_movies": 4,
+ "date_compiled": "2024",
+ "box_office_total": 467654094,
+ "most_frequent_actor": "Arnold Schwarzenegger",
+ "most_frequent_director": "John McTiernan"
+ }
+}"""
+
+MOVIES_TREE = json.loads(MOVIES_JSON)
+
+DUNE_BIOS = [
+ {
+ "name": "Paul Atreides",
+ "description": "Heir to House Atreides who becomes the Fremen messiah Muad'Dib. Born with extraordinary mental abilities due to Bene Gesserit breeding program.",
+ },
+ {
+ "name": "Lady Jessica",
+ "description": "Bene Gesserit concubine to Duke Leto and mother of Paul. Defied her order by bearing a son instead of a daughter, disrupting centuries of careful breeding.",
+ },
+ {
+ "name": "Baron Vladimir Harkonnen",
+ "description": "Cruel and corpulent leader of House Harkonnen, sworn enemy of House Atreides. Known for his cunning and brutality in pursuing power.",
+ },
+ {
+ "name": "Leto Atreides",
+ "description": "Noble Duke and father of Paul, known for his honor and just rule. Accepts governorship of Arrakis despite knowing it's likely a trap.",
+ },
+ {
+ "name": "Stilgar",
+ "description": "Leader of the Fremen Sietch Tabr, becomes a loyal supporter of Paul. Skilled warrior who helps train Paul in Fremen ways.",
+ },
+ {
+ "name": "Chani",
+ "description": "Fremen warrior and daughter of planetologist Liet-Kynes. Becomes Paul's concubine and true love after appearing in his prescient visions.",
+ },
+ {
+ "name": "Thufir Hawat",
+ "description": "Mentat and Master of Assassins for House Atreides. Serves three generations of Atreides with his superhuman computational skills.",
+ },
+ {
+ "name": "Duncan Idaho",
+ "description": "Swordmaster of the Ginaz, loyal to House Atreides. Known for his exceptional fighting skills and sacrifice to save Paul and Jessica.",
+ },
+ {
+ "name": "Gurney Halleck",
+ "description": "Warrior-troubadour of House Atreides, skilled with sword and baliset. Serves as Paul's weapons teacher and loyal friend.",
+ },
+ {
+ "name": "Dr. Yueh",
+ "description": "Suk doctor conditioned against taking human life, but betrays House Atreides after the Harkonnens torture his wife. Imperial Conditioning broken.",
+ },
+]
diff --git a/contrib/python/textual/textual/demo/demo_app.py b/contrib/python/textual/textual/demo/demo_app.py
index d3be0a33c23..66b4d5837eb 100644
--- a/contrib/python/textual/textual/demo/demo_app.py
+++ b/contrib/python/textual/textual/demo/demo_app.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from textual.app import App
from textual.binding import Binding
from textual.demo.home import HomeScreen
@@ -13,6 +15,14 @@ class DemoApp(App):
align: center top;
&>*{ max-width: 100; }
}
+ Screen .-maximized {
+ margin: 1 2;
+ max-width: 100%;
+ &.column { margin: 1 2; padding: 1 2; }
+ &.column > * {
+ max-width: 100%;
+ }
+ }
"""
MODES = {
@@ -46,4 +56,32 @@ class DemoApp(App):
"Screenshot",
tooltip="Save an SVG 'screenshot' of the current screen",
),
+ Binding(
+ "ctrl+a",
+ "app.maximize",
+ "Maximize",
+ tooltip="Maximized the focused widget (if possible)",
+ ),
]
+
+ def action_maximize(self) -> None:
+ if self.screen.is_maximized:
+ return
+ if self.screen.focused is None:
+ self.notify(
+ "Nothing to be maximized (try pressing [b]tab[/b])",
+ title="Maximize",
+ severity="warning",
+ )
+ else:
+ if self.screen.maximize(self.screen.focused):
+ self.notify(
+ "You are now in the maximized view. Press [b]escape[/b] to return.",
+ title="Maximize",
+ )
+ else:
+ self.notify(
+ "This widget may not be maximized.",
+ title="Maximize",
+ severity="warning",
+ )
diff --git a/contrib/python/textual/textual/demo/home.py b/contrib/python/textual/textual/demo/home.py
index 181fe9ffe12..7a8cb836e62 100644
--- a/contrib/python/textual/textual/demo/home.py
+++ b/contrib/python/textual/textual/demo/home.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import asyncio
from importlib.metadata import version
@@ -64,18 +66,27 @@ A modern Python API from the developer of [Rich](https://github.com/Textualize/r
```python
# Start building!
-import textual
+from textual import App, ComposeResult
+from textual.widgets import Label
+
+class MyApp(App):
+ def compose(self) -> ComposeResult:
+ yield Label("Hello, World!")
+
+MyApp().run()
```
-Well documented, typed, and intuitive.
-Textual's API is accessible to Python developers of all skill levels.
+* Intuitive, batteries-included, API.
+* Well documented: See the [tutorial](https://textual.textualize.io/tutorial/), [guide](https://textual.textualize.io/guide/app/), and [reference](https://textual.textualize.io/reference/).
+* Fully typed, with modern type annotations.
+* Accessible to Python developers of all skill levels.
**Hint:** press **C** to view the code for this page.
## Built on Rich
-With over 1.5 *billion* downloads, Rich is the most popular terminal library out there.
-Textual builds on Rich to add interactivity, and is compatible with Rich renderables.
+With over 1.6 *billion* downloads, Rich is the most popular terminal library out there.
+Textual builds on Rich to add interactivity, and is fully-compatible with Rich renderables.
## Re-usable widgets
@@ -111,6 +122,8 @@ Textual has [amazing docs](https://textual.textualize.io/)!
"""
DEPLOY_MD = """\
+Textual apps have extremely low system requirements, and will run on virtually any OS and hardware; locally or remotely via SSH.
+
There are a number of ways to deploy and share Textual apps.
## As a Python library
@@ -140,10 +153,10 @@ class StarCount(Vertical):
layout: horizontal;
background: $boost;
padding: 0 1;
- color: $warning;
+ color: $text-warning;
#stars { align: center top; }
#forks { align: right top; }
- Label { text-style: bold; }
+ Label { text-style: bold; color: $foreground; }
LoadingIndicator { background: transparent !important; }
Digits { width: auto; margin-right: 1; }
Label { margin-right: 1; }
@@ -229,6 +242,7 @@ class HomeScreen(PageScreen):
Markdown {
margin-right: 1;
padding-right: 1;
+ background: transparent;
}
}
}
diff --git a/contrib/python/textual/textual/demo/page.py b/contrib/python/textual/textual/demo/page.py
index 84d61a147b7..35a98df3876 100644
--- a/contrib/python/textual/textual/demo/page.py
+++ b/contrib/python/textual/textual/demo/page.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import inspect
from rich.syntax import Syntax
diff --git a/contrib/python/textual/textual/demo/projects.py b/contrib/python/textual/textual/demo/projects.py
index 691b96f4f13..a8e5c4406be 100644
--- a/contrib/python/textual/textual/demo/projects.py
+++ b/contrib/python/textual/textual/demo/projects.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from dataclasses import dataclass
from textual import events, on
@@ -34,28 +36,28 @@ PROJECTS = [
"Darren Burns",
"https://posting.sh/",
"""Posting is an HTTP client, not unlike Postman and Insomnia. As a TUI application, it can be used over SSH and enables efficient keyboard-centric workflows. """,
- "4.7k",
+ "6.0k",
),
ProjectInfo(
"Memray",
"Bloomberg",
"https://github.com/bloomberg/memray",
"""Memray is a memory profiler for Python. It can track memory allocations in Python code, in native extension modules, and in the Python interpreter itself.""",
- "13.2k",
+ "13.3k",
),
ProjectInfo(
"Toolong",
"Will McGugan",
"https://github.com/Textualize/toolong",
"""A terminal application to view, tail, merge, and search log files (plus JSONL).""",
- "3.1k",
+ "3.2k",
),
ProjectInfo(
"Dolphie",
"Charles Thompson",
"https://github.com/charles-001/dolphie",
"Your single pane of glass for real-time analytics into MySQL/MariaDB & ProxySQL",
- "608",
+ "649",
),
ProjectInfo(
"Harlequin",
@@ -134,24 +136,25 @@ class Project(Vertical, can_focus=True, can_focus_children=False):
height: auto;
padding: 0 1;
border: tall transparent;
- opacity: 0.8;
box-sizing: border-box;
- &:focus {
- border: tall $accent;
- background: $primary 40%;
- opacity: 1.0;
+ &:focus {
+ border: tall $text-primary;
+ background: $primary 20%;
+ &.link {
+ color: red !important;
+ }
}
#title { text-style: bold; width: 1fr; }
#author { text-style: italic; }
.stars {
- color: $secondary;
+ color: $text-accent;
text-align: right;
text-style: bold;
width: auto;
}
.header { height: 1; }
.link {
- color: $accent;
+ color: $text-accent;
text-style: underline;
}
.description { color: $text-muted; }
@@ -204,9 +207,9 @@ class ProjectsScreen(PageScreen):
height: auto;
grid-gutter: 1 1;
grid-rows: auto;
- keyline:thin $foreground 50%;
+ keyline:thin $foreground 30%;
}
- Markdown { margin: 0; padding: 0 2; max-width: 100;}
+ Markdown { margin: 0; padding: 0 2; max-width: 100; background: transparent; }
}
"""
diff --git a/contrib/python/textual/textual/demo/widgets.py b/contrib/python/textual/textual/demo/widgets.py
index 0bef76a581b..11e4b0419dc 100644
--- a/contrib/python/textual/textual/demo/widgets.py
+++ b/contrib/python/textual/textual/demo/widgets.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import csv
import io
from math import sin
@@ -6,13 +8,14 @@ from rich.syntax import Syntax
from rich.table import Table
from rich.traceback import Traceback
-from textual import containers
+from textual import containers, events, lazy, on
from textual.app import ComposeResult
from textual.binding import Binding
-from textual.demo.data import COUNTRIES
+from textual.demo.data import COUNTRIES, DUNE_BIOS, MOVIES, MOVIES_TREE
from textual.demo.page import PageScreen
from textual.reactive import reactive, var
from textual.suggester import SuggestFromList
+from textual.theme import BUILTIN_THEMES
from textual.widgets import (
Button,
Checkbox,
@@ -30,8 +33,13 @@ from textual.widgets import (
RadioButton,
RadioSet,
RichLog,
+ Select,
Sparkline,
+ Static,
+ Switch,
TabbedContent,
+ TextArea,
+ Tree,
)
WIDGETS_MD = """\
@@ -47,6 +55,7 @@ The following list is *not* exhaustive…
class Buttons(containers.VerticalGroup):
"""Buttons demo."""
+ ALLOW_MAXIMIZE = True
DEFAULT_CLASSES = "column"
DEFAULT_CSS = """
Buttons {
@@ -61,6 +70,8 @@ class Buttons(containers.VerticalGroup):
A simple button, with a number of semantic styles.
May be rendered unclickable by setting `disabled=True`.
+Press `return` to active a button when focused (or click it).
+
"""
def compose(self) -> ComposeResult:
@@ -114,29 +125,35 @@ class Checkboxes(containers.VerticalGroup):
Checkboxes to toggle booleans.
Radio buttons for exclusive booleans.
-Radio sets for a managed set of options where only a single option may be selected.
+
+Hit `return` to toggle an checkbox / radio button, when focused.
"""
+ RADIOSET_MD = """\
+### Radio Sets
+
+A *radio set* is a list of mutually exclusive options.
+Use the `up` and `down` keys to navigate the list.
+Press `return` to toggle a radio button.
+
+"""
def compose(self) -> ComposeResult:
yield Markdown(self.CHECKBOXES_MD)
- with containers.HorizontalGroup():
- with containers.VerticalGroup():
- yield Checkbox("Arrakis")
- yield Checkbox("Caladan")
- yield RadioButton("Chusuk")
- yield RadioButton("Giedi Prime")
- yield RadioSet(
- "Amanda",
- "Connor MacLeod",
- "Duncan MacLeod",
- "Heather MacLeod",
- "Joe Dawson",
- "Kurgan, [bold italic red]The[/]",
- "Methos",
- "Rachel Ellenstein",
- "Ramírez",
- )
+ yield Checkbox("A Checkbox")
+ yield RadioButton("A Radio Button")
+ yield Markdown(self.RADIOSET_MD)
+ yield RadioSet(
+ "Amanda",
+ "Connor MacLeod",
+ "Duncan MacLeod",
+ "Heather MacLeod",
+ "Joe Dawson",
+ "Kurgan, [bold italic red]The[/]",
+ "Methos",
+ "Rachel Ellenstein",
+ "Ramírez",
+ )
class Datatables(containers.VerticalGroup):
@@ -149,34 +166,35 @@ class Datatables(containers.VerticalGroup):
A fully-featured DataTable, with cell, row, and columns cursors.
Cells may be individually styled, and may include Rich renderables.
+**Tip:** Focus the table and press `ctrl+m`
+
"""
- ROWS = [
- ("lane", "swimmer", "country", "time"),
- (4, "Joseph Schooling", "Singapore", 50.39),
- (2, "Michael Phelps", "United States", 51.14),
- (5, "Chad le Clos", "South Africa", 51.14),
- (6, "László Cseh", "Hungary", 51.14),
- (3, "Li Zhuhao", "China", 51.26),
- (8, "Mehdy Metella", "France", 51.58),
- (7, "Tom Shields", "United States", 51.73),
- (1, "Aleksandr Sadovnikov", "Russia", 51.84),
- (10, "Darren Burns", "Scotland", 51.84),
- ]
+ DEFAULT_CSS = """
+ DataTable {
+ height: 16 !important;
+ &.-maximized {
+ height: auto !important;
+ }
+ }
+
+ """
def compose(self) -> ComposeResult:
yield Markdown(self.DATATABLES_MD)
with containers.Center():
- yield DataTable()
+ yield DataTable(fixed_columns=1)
def on_mount(self) -> None:
+ ROWS = list(csv.reader(io.StringIO(MOVIES)))
table = self.query_one(DataTable)
- table.add_columns(*self.ROWS[0])
- table.add_rows(self.ROWS[1:])
+ table.add_columns(*ROWS[0])
+ table.add_rows(ROWS[1:])
class Inputs(containers.VerticalGroup):
"""Demonstrates Inputs."""
+ ALLOW_MAXIMIZE = True
DEFAULT_CLASSES = "column"
INPUTS_MD = """\
## Inputs and MaskedInputs
@@ -232,6 +250,7 @@ Build for intuitive and user-friendly forms.
class ListViews(containers.VerticalGroup):
"""Demonstrates List Views and Option Lists."""
+ ALLOW_MAXIMIZE = True
DEFAULT_CLASSES = "column"
LISTS_MD = """\
## List Views and Option Lists
@@ -290,6 +309,10 @@ And a RichLog widget to display Rich renderables.
}
}
TabPane { padding: 0; }
+ TabbedContent.-maximized {
+ height: 1fr;
+ Log, RichLog { height: 1fr; }
+ }
}
"""
@@ -347,7 +370,9 @@ def loop_first_last(values: Iterable[T]) -> Iterable[tuple[bool, bool, T]]:
def update_log(self) -> None:
"""Update the Log with new content."""
log = self.query_one(Log)
- if not self.screen.can_view_partial(log) or not self.screen.is_active:
+ if self.is_scrolling:
+ return
+ if not self.app.screen.can_view_entire(log) and not log.is_in_maximized_view:
return
self.log_count += 1
line_no = self.log_count % len(self.TEXT)
@@ -357,7 +382,12 @@ def loop_first_last(values: Iterable[T]) -> Iterable[tuple[bool, bool, T]]:
def update_rich_log(self) -> None:
"""Update the Rich Log with content."""
rich_log = self.query_one(RichLog)
- if not self.screen.can_view_partial(rich_log) or not self.screen.is_active:
+ if self.is_scrolling:
+ return
+ if (
+ not self.app.screen.can_view_entire(rich_log)
+ and not rich_log.is_in_maximized_view
+ ):
return
self.rich_log_count += 1
log_option = self.rich_log_count % 3
@@ -379,6 +409,109 @@ def loop_first_last(values: Iterable[T]) -> Iterable[tuple[bool, bool, T]]:
rich_log.write(traceback, animate=True)
+class Markdowns(containers.VerticalGroup):
+ DEFAULT_CLASSES = "column"
+ DEFAULT_CSS = """
+ Markdowns {
+ #container {
+ background: $boost;
+ border: tall transparent;
+ height: 16;
+ padding: 0 1;
+ &:focus { border: tall $border; }
+ &.-maximized { height: 1fr; }
+ }
+ #movies {
+ padding: 0 1;
+ MarkdownBlock { padding: 0 1 0 0; }
+ }
+ }
+ """
+ MD_MD = """\
+## Markdown
+
+Display Markdown in your apps with the Markdown widget.
+Most of the text on this page is Markdown.
+
+Here's an AI generated Markdown document:
+
+"""
+ MOVIES_MD = """\
+# The Golden Age of Action Cinema: The 1980s
+
+The 1980s marked a transformative era in action cinema, defined by **excessive machismo**, explosive practical effects, and unforgettable one-liners. This decade gave birth to many of Hollywood's most enduring action franchises, from _Die Hard_ to _Rambo_, setting templates that filmmakers still reference today.
+
+## Technical Innovation
+
+Technologically, the 80s represented a sweet spot between practical effects and early CGI. Filmmakers relied heavily on:
+
+* Practical stunts
+* Pyrotechnics
+* Hand-built models
+
+These elements lent the films a tangible quality that many argue remains superior to modern digital effects.
+
+## The Action Hero Archetype
+
+The quintessential action hero emerged during this period, with key characteristics:
+
+1. Impressive physique
+2. Military background
+3. Anti-authority attitude
+4. Memorable catchphrases
+
+> "I'll be back" - The Terminator (1984)
+
+Heroes like Arnold Schwarzenegger and Sylvester Stallone became global icons. However, the decade also saw more nuanced characters emerge, like Bruce Willis's everyman John McClane in *Die Hard*, and powerful female protagonists like Sigourney Weaver's Ellen Ripley in *Aliens*.
+
+### Political Influence
+
+Cold War politics heavily influenced these films' narratives, with many plots featuring American heroes facing off against Soviet adversaries. This political subtext, combined with themes of individual triumph over bureaucratic systems, perfectly captured the era's zeitgeist.
+
+---
+
+While often dismissed as simple entertainment, 80s action films left an indelible mark on cinema history, influencing everything from filming techniques to narrative structures, and continuing to inspire filmmakers and delight audiences decades later.
+
+"""
+
+ def compose(self) -> ComposeResult:
+ yield Markdown(self.MD_MD)
+ with containers.VerticalScroll(
+ id="container", can_focus=True, can_maximize=True
+ ):
+ yield Markdown(self.MOVIES_MD, id="movies")
+
+
+class Selects(containers.VerticalGroup):
+ DEFAULT_CLASSES = "column"
+ SELECTS_MD = """\
+## Selects
+
+Selects (AKA *Combo boxes*), present a list of options in a menu that may be expanded by the user.
+"""
+ HEROS = [
+ "Arnold Schwarzenegger",
+ "Brigitte Nielsen",
+ "Bruce Willis",
+ "Carl Weathers",
+ "Chuck Norris",
+ "Dolph Lundgren",
+ "Grace Jones",
+ "Harrison Ford",
+ "Jean-Claude Van Damme",
+ "Kurt Russell",
+ "Linda Hamilton",
+ "Mel Gibson",
+ "Michelle Yeoh",
+ "Sigourney Weaver",
+ "Sylvester Stallone",
+ ]
+
+ def compose(self) -> ComposeResult:
+ yield Markdown(self.SELECTS_MD)
+ yield Select.from_values(self.HEROS, prompt="80s action hero")
+
+
class Sparklines(containers.VerticalGroup):
"""Demonstrates sparklines."""
@@ -393,7 +526,7 @@ For detailed graphs, see [textual-plotext](https://github.com/Textualize/textual
DEFAULT_CSS = """
Sparklines {
Sparkline {
- width: 1fr;
+ width: 1fr;
margin: 1;
&#first > .sparkline--min-color { color: $success; }
&#first > .sparkline--max-color { color: $warning; }
@@ -402,6 +535,11 @@ For detailed graphs, see [textual-plotext](https://github.com/Textualize/textual
&#third > .sparkline--min-color { color: $primary; }
&#third > .sparkline--max-color { color: $accent; }
}
+ VerticalScroll {
+ height: auto;
+ border: heavy transparent;
+ &:focus { border: heavy $border; }
+ }
}
"""
@@ -411,47 +549,247 @@ For detailed graphs, see [textual-plotext](https://github.com/Textualize/textual
def compose(self) -> ComposeResult:
yield Markdown(self.LOGS_MD)
- yield Sparkline([], summary_function=max, id="first").data_bind(
- Sparklines.data,
- )
- yield Sparkline([], summary_function=max, id="second").data_bind(
- Sparklines.data,
- )
- yield Sparkline([], summary_function=max, id="third").data_bind(
- Sparklines.data,
- )
+ with containers.VerticalScroll(
+ id="container", can_focus=True, can_maximize=True
+ ):
+ yield Sparkline([], summary_function=max, id="first").data_bind(
+ Sparklines.data,
+ )
+ yield Sparkline([], summary_function=max, id="second").data_bind(
+ Sparklines.data,
+ )
+ yield Sparkline([], summary_function=max, id="third").data_bind(
+ Sparklines.data,
+ )
def on_mount(self) -> None:
- self.set_interval(0.2, self.update_sparks)
+ self.set_interval(0.1, self.update_sparks)
def update_sparks(self) -> None:
"""Update the sparks data."""
- if not self.screen.can_view_partial(self) or not self.screen.is_active:
+ if self.is_scrolling:
+ return
+ if (
+ not self.app.screen.can_view_partial(self)
+ and not self.query_one(Sparkline).is_in_maximized_view
+ ):
return
self.count += 1
offset = self.count * 40
self.data = [abs(sin(x / 3.14)) for x in range(offset, offset + 360 * 6, 20)]
+class Switches(containers.VerticalGroup):
+ """Demonstrate the Switch widget."""
+
+ ALLOW_MAXIMIZE = True
+ DEFAULT_CLASSES = "column"
+ SWITCHES_MD = """\
+## Switches
+
+Functionally almost identical to a Checkbox, but more displays more prominently in the UI.
+"""
+ DEFAULT_CSS = """\
+Switches {
+ Label {
+ padding: 1;
+ &:hover {text-style:underline; }
+ }
+}
+"""
+
+ def compose(self) -> ComposeResult:
+ yield Markdown(self.SWITCHES_MD)
+ with containers.ItemGrid(min_column_width=32):
+ for theme in BUILTIN_THEMES:
+ if theme.endswith("-ansi"):
+ continue
+ with containers.HorizontalGroup():
+ yield Switch(id=theme)
+ yield Label(theme, name=theme)
+
+ @on(events.Click, "Label")
+ def on_click(self, event: events.Click) -> None:
+ """Make the label toggle the switch."""
+ # TODO: Add a dedicated form label
+ event.stop()
+ if event.widget is not None:
+ self.query_one(f"#{event.widget.name}", Switch).toggle()
+
+ def on_switch_changed(self, event: Switch.Changed) -> None:
+ # Don't issue more Changed events
+ if not event.value:
+ self.query_one("#textual-dark", Switch).value = True
+ return
+
+ with self.prevent(Switch.Changed):
+ # Reset all other switches
+ for switch in self.query("Switch").results(Switch):
+ if switch.id != event.switch.id:
+ switch.value = False
+ assert event.switch.id is not None
+ theme_id = event.switch.id
+
+ def switch_theme() -> None:
+ """Callback to switch the theme."""
+ self.app.theme = theme_id
+
+ # Call after a short delay, so we see the Switch animation
+ self.set_timer(0.3, switch_theme)
+
+
+class TabsDemo(containers.VerticalGroup):
+ DEFAULT_CLASSES = "column"
+ TABS_MD = """\
+## Tabs
+
+A navigable list of section headers.
+
+Typically used with `ContentTabs`, to display additional content associate with each tab.
+
+Use the cursor keys to navigate.
+
+"""
+ DEFAULT_CSS = """
+ .bio { padding: 1 2; background: $boost; color: $foreground-muted; }
+ """
+
+ def compose(self) -> ComposeResult:
+ yield Markdown(self.TABS_MD)
+ with TabbedContent(*[bio["name"] for bio in DUNE_BIOS]):
+ for bio in DUNE_BIOS:
+ yield Static(bio["description"], classes="bio")
+
+
+class Trees(containers.VerticalGroup):
+ DEFAULT_CLASSES = "column"
+ TREES_MD = """\
+## Tree
+
+The Tree widget displays hierarchical data.
+
+There is also the Tree widget's cousin, DirectoryTree, to navigate folders and files on the filesystem.
+ """
+ DEFAULT_CSS = """
+ Trees {
+ Tree {
+ height: 16;
+ &.-maximized { height: 1fr; }
+ }
+ VerticalGroup {
+ border: heavy transparent;
+ &:focus-within { border: heavy $border; }
+ }
+ }
+
+ """
+
+ def compose(self) -> ComposeResult:
+ yield Markdown(self.TREES_MD)
+ with containers.VerticalGroup():
+ tree = Tree("80s movies")
+ tree.show_root = False
+ tree.add_json(MOVIES_TREE)
+ tree.root.expand()
+ yield tree
+
+
+class TextAreas(containers.VerticalGroup):
+ ALLOW_MAXIMIZE = True
+ DEFAULT_CLASSES = "column"
+ TEXTAREA_MD = """\
+## TextArea
+
+A powerful and highly configurable text area that supports syntax highlighting, line numbers, soft wrapping, and more.
+
+"""
+ DEFAULT_CSS = """
+ TextAreas {
+ TextArea {
+ height: 16;
+ }
+ &.-maximized {
+ height: 1fr;
+ }
+ }
+ """
+ DEFAULT_TEXT = """\
+# Start building!
+from textual import App, ComposeResult
+"""
+
+ def compose(self) -> ComposeResult:
+ yield Markdown(self.TEXTAREA_MD)
+ yield Select.from_values(
+ [
+ "Bash",
+ "Css",
+ "Go",
+ "HTML",
+ "Java",
+ "Javascript",
+ "JSON",
+ "Kotlin",
+ "Markdown",
+ "Python",
+ "Rust",
+ "Regex",
+ "Sql",
+ "TOML",
+ "YAML",
+ ],
+ value="Python",
+ prompt="Highlight language",
+ )
+
+ yield TextArea(self.DEFAULT_TEXT, show_line_numbers=True, language=None)
+
+ def on_select_changed(self, event: Select.Changed) -> None:
+ self.query_one(TextArea).language = (
+ event.value.lower() if isinstance(event.value, str) else None
+ )
+
+
+class YourWidgets(containers.VerticalGroup):
+ DEFAULT_CLASSES = "column"
+ YOUR_MD = """\
+## Your Widget Here!
+
+The Textual API allows you to [build custom re-usable widgets](https://textual.textualize.io/guide/widgets/#custom-widgets) and share them across projects.
+Custom widgets can be themed, just like the builtin widget library.
+
+Combine existing widgets to add new functionality, or use the powerful [Line API](https://textual.textualize.io/guide/widgets/#line-api) for unique creations.
+
+"""
+ DEFAULT_CSS = """
+ YourWidgets { margin-bottom: 2; }
+ """
+
+ def compose(self) -> ComposeResult:
+ yield Markdown(self.YOUR_MD)
+
+
class WidgetsScreen(PageScreen):
"""The Widgets screen"""
CSS = """
WidgetsScreen {
align-horizontal: center;
- & > VerticalScroll > * {
- &:last-of-type { margin-bottom: 2; }
- &:even { background: $boost; }
- padding-bottom: 1;
- }
+ Markdown { background: transparent; }
+ & > VerticalScroll {
+ scrollbar-gutter: stable;
+ & > * {
+ &:even { background: $boost; }
+ padding-bottom: 1;
+ }
+ }
}
"""
- BINDINGS = [Binding("escape", "unfocus", "Unfocus any focused widget", show=False)]
+ BINDINGS = [Binding("escape", "blur", "Unfocus any focused widget", show=False)]
def compose(self) -> ComposeResult:
- with containers.VerticalScroll() as container:
- container.can_focus = False
+ with lazy.Reveal(containers.VerticalScroll(can_focus=True)):
yield Markdown(WIDGETS_MD, classes="column")
yield Buttons()
yield Checkboxes()
@@ -459,8 +797,12 @@ class WidgetsScreen(PageScreen):
yield Inputs()
yield ListViews()
yield Logs()
+ yield Markdowns()
+ yield Selects()
yield Sparklines()
+ yield Switches()
+ yield TabsDemo()
+ yield TextAreas()
+ yield Trees()
+ yield YourWidgets()
yield Footer()
-
- def action_unfocus(self) -> None:
- self.set_focus(None)
diff --git a/contrib/python/textual/textual/design.py b/contrib/python/textual/textual/design.py
index b90bfa56e25..f782b8803d4 100644
--- a/contrib/python/textual/textual/design.py
+++ b/contrib/python/textual/textual/design.py
@@ -60,6 +60,7 @@ class ColorSystem:
dark: bool = False,
luminosity_spread: float = 0.15,
text_alpha: float = 0.95,
+ variables: dict[str, str] | None = None,
):
def parse(color: str | None) -> Color | None:
if color is None:
@@ -80,6 +81,8 @@ class ColorSystem:
self.dark = dark
self.luminosity_spread = luminosity_spread
self.text_alpha = text_alpha
+ self.variables = variables or {}
+ """Overrides for specific variables."""
@property
def shades(self) -> Iterable[str]:
@@ -93,6 +96,10 @@ class ColorSystem:
else:
yield color
+ def get_or_default(self, name: str, default: str) -> str:
+ """Get the value of a color variable, or the default value if not set."""
+ return self.variables.get(name, default)
+
def generate(self) -> dict[str, str]:
"""Generate a mapping of color name on to a CSS color.
@@ -110,6 +117,8 @@ class ColorSystem:
dark = self.dark
luminosity_spread = self.luminosity_spread
+ colors: dict[str, str] = {}
+
if dark:
background = self.background or Color.parse(DEFAULT_DARK_BACKGROUND)
surface = self.surface or Color.parse(DEFAULT_DARK_SURFACE)
@@ -118,7 +127,16 @@ class ColorSystem:
surface = self.surface or Color.parse(DEFAULT_LIGHT_SURFACE)
foreground = self.foreground or (background.inverse)
- boost = self.boost or background.get_contrast_text(1.0).with_alpha(0.04)
+ contrast_text = background.get_contrast_text(1.0)
+ boost = self.boost or contrast_text.with_alpha(0.04)
+
+ # Colored text
+ colors["text-primary"] = contrast_text.tint(primary.with_alpha(0.66)).hex
+ colors["text-secondary"] = contrast_text.tint(secondary.with_alpha(0.66)).hex
+ colors["text-warning"] = contrast_text.tint(warning.with_alpha(0.66)).hex
+ colors["text-error"] = contrast_text.tint(error.with_alpha(0.66)).hex
+ colors["text-success"] = contrast_text.tint(success.with_alpha(0.66)).hex
+ colors["text-accent"] = contrast_text.tint(accent.with_alpha(0.66)).hex
if self.panel is None:
panel = surface.blend(primary, 0.1, alpha=1)
@@ -127,9 +145,7 @@ class ColorSystem:
else:
panel = self.panel
- colors: dict[str, str] = {}
-
- def luminosity_range(spread) -> Iterable[tuple[str, float]]:
+ def luminosity_range(spread: float) -> Iterable[tuple[str, float]]:
"""Get the range of shades from darken2 to lighten2.
Returns:
@@ -165,31 +181,185 @@ class ColorSystem:
# Colors names that have a dark variant
DARK_SHADES = {"primary-background", "secondary-background"}
+ get = self.get_or_default
+
for name, color in COLORS:
is_dark_shade = dark and name in DARK_SHADES
spread = luminosity_spread
for shade_name, luminosity_delta in luminosity_range(spread):
+ key = f"{name}{shade_name}"
if color.ansi is not None:
- colors[f"{name}{shade_name}"] = color.hex
+ colors[key] = color.hex
elif is_dark_shade:
dark_background = background.blend(color, 0.15, alpha=1.0)
- shade_color = dark_background.blend(
- WHITE, spread + luminosity_delta, alpha=1.0
- ).clamped
- colors[f"{name}{shade_name}"] = shade_color.hex
+ if key not in self.variables:
+ shade_color = dark_background.blend(
+ WHITE, spread + luminosity_delta, alpha=1.0
+ ).clamped
+ colors[key] = shade_color.hex
+ else:
+ colors[key] = self.variables[key]
else:
- shade_color = color.lighten(luminosity_delta)
- colors[f"{name}{shade_name}"] = shade_color.hex
+ colors[key] = get(key, color.lighten(luminosity_delta).hex)
if foreground.ansi is None:
- colors["text"] = "auto 87%"
- colors["text-muted"] = "auto 60%"
- colors["text-disabled"] = "auto 38%"
+ colors["text"] = get("text", "auto 87%")
+ colors["text-muted"] = get("text-muted", "auto 60%")
+ colors["text-disabled"] = get("text-disabled", "auto 38%")
else:
colors["text"] = "ansi_default"
colors["text-muted"] = "ansi_default"
colors["text-disabled"] = "ansi_default"
+ # Muted variants of base colors
+ colors["primary-muted"] = get(
+ "primary-muted", primary.blend(background, 0.7).hex
+ )
+ colors["secondary-muted"] = get(
+ "secondary-muted", secondary.blend(background, 0.7).hex
+ )
+ colors["accent-muted"] = get("accent-muted", accent.blend(background, 0.7).hex)
+ colors["warning-muted"] = get(
+ "warning-muted", warning.blend(background, 0.7).hex
+ )
+ colors["error-muted"] = get("error-muted", error.blend(background, 0.7).hex)
+ colors["success-muted"] = get(
+ "success-muted", success.blend(background, 0.7).hex
+ )
+
+ # Foreground colors
+ colors["foreground-muted"] = get(
+ "foreground-muted", foreground.with_alpha(0.6).hex
+ )
+ colors["foreground-disabled"] = get(
+ "foreground-disabled", foreground.with_alpha(0.38).hex
+ )
+
+ # The cursor color for widgets such as OptionList, DataTable, etc.
+ colors["block-cursor-foreground"] = get(
+ "block-cursor-foreground", colors["text"]
+ )
+ colors["block-cursor-background"] = get("block-cursor-background", primary.hex)
+ colors["block-cursor-text-style"] = get("block-cursor-text-style", "bold")
+ colors["block-cursor-blurred-foreground"] = get(
+ "block-cursor-blurred-foreground", foreground.hex
+ )
+ colors["block-cursor-blurred-background"] = get(
+ "block-cursor-blurred-background", primary.with_alpha(0.3).hex
+ )
+ colors["block-cursor-blurred-text-style"] = get(
+ "block-cursor-blurred-text-style", "none"
+ )
+ colors["block-hover-background"] = get(
+ "block-hover-background", boost.with_alpha(0.05).hex
+ )
+
+ # The border color for focused widgets which have a border.
+ colors["border"] = get("border", primary.hex)
+ colors["border-blurred"] = get("border-blurred", surface.darken(0.025).hex)
+
+ # The surface color for builtin focused widgets
+ colors["surface-active"] = get(
+ "surface-active", surface.lighten(self.luminosity_spread / 2.5).hex
+ )
+
+ # The scrollbar colors
+ colors["scrollbar"] = get(
+ "scrollbar",
+ (Color.parse(colors["background-darken-1"]) + primary.with_alpha(0.4)).hex,
+ )
+ colors["scrollbar-hover"] = get(
+ "scrollbar-hover",
+ (Color.parse(colors["background-darken-1"]) + primary.with_alpha(0.5)).hex,
+ )
+ # colors["scrollbar-active"] = get("scrollbar-active", colors["panel-lighten-2"])
+ colors["scrollbar-active"] = get("scrollbar-active", primary.hex)
+ colors["scrollbar-background"] = get(
+ "scrollbar-background", colors["background-darken-1"]
+ )
+ colors["scrollbar-corner-color"] = get(
+ "scrollbar-corner-color", colors["scrollbar-background"]
+ )
+ colors["scrollbar-background-hover"] = get(
+ "scrollbar-background-hover", colors["scrollbar-background"]
+ )
+ colors["scrollbar-background-active"] = get(
+ "scrollbar-background-active", colors["scrollbar-background"]
+ )
+
+ # Links
+ colors["link-background"] = get("link-background", "initial")
+ colors["link-background-hover"] = get("link-background-hover", primary.hex)
+ colors["link-color"] = get("link-color", colors["text"])
+ colors["link-style"] = get("link-style", "underline")
+ colors["link-color-hover"] = get("link-color-hover", colors["text"])
+ colors["link-style-hover"] = get("link-style-hover", "bold not underline")
+
+ colors["footer-foreground"] = get("footer-foreground", foreground.hex)
+ colors["footer-background"] = get("footer-background", panel.hex)
+
+ colors["footer-key-foreground"] = get("footer-key-foreground", accent.hex)
+ colors["footer-key-background"] = get("footer-key-background", "transparent")
+
+ colors["footer-description-foreground"] = get(
+ "footer-description-foreground", foreground.hex
+ )
+ colors["footer-description-background"] = get(
+ "footer-description-background", "transparent"
+ )
+
+ colors["footer-item-background"] = get("footer-item-background", "transparent")
+
+ colors["input-cursor-background"] = get(
+ "input-cursor-background", foreground.hex
+ )
+ colors["input-cursor-foreground"] = get(
+ "input-cursor-foreground", background.hex
+ )
+ colors["input-cursor-text-style"] = get("input-cursor-text-style", "none")
+ colors["input-selection-background"] = get(
+ "input-selection-background",
+ Color.parse(colors["primary-lighten-1"]).with_alpha(0.4).hex,
+ )
+ colors["input-selection-foreground"] = get(
+ "input-selection-foreground", background.hex
+ )
+
+ # Markdown header styles
+ colors["markdown-h1-color"] = get("markdown-h1-color", primary.hex)
+ colors["markdown-h1-background"] = get("markdown-h1-background", "transparent")
+ colors["markdown-h1-text-style"] = get("markdown-h1-text-style", "bold")
+
+ colors["markdown-h2-color"] = get("markdown-h2-color", primary.hex)
+ colors["markdown-h2-background"] = get("markdown-h2-background", "transparent")
+ colors["markdown-h2-text-style"] = get("markdown-h2-text-style", "underline")
+
+ colors["markdown-h3-color"] = get("markdown-h3-color", primary.hex)
+ colors["markdown-h3-background"] = get("markdown-h3-background", "transparent")
+ colors["markdown-h3-text-style"] = get("markdown-h3-text-style", "bold")
+
+ colors["markdown-h4-color"] = get("markdown-h4-color", foreground.hex)
+ colors["markdown-h4-background"] = get("markdown-h4-background", "transparent")
+ colors["markdown-h4-text-style"] = get(
+ "markdown-h4-text-style", "bold underline"
+ )
+
+ colors["markdown-h5-color"] = get("markdown-h5-color", foreground.hex)
+ colors["markdown-h5-background"] = get("markdown-h5-background", "transparent")
+ colors["markdown-h5-text-style"] = get("markdown-h5-text-style", "bold")
+
+ colors["markdown-h6-color"] = get(
+ "markdown-h6-color", colors["foreground-muted"]
+ )
+ colors["markdown-h6-background"] = get("markdown-h6-background", "transparent")
+ colors["markdown-h6-text-style"] = get("markdown-h6-text-style", "bold")
+
+ colors["button-foreground"] = get("button-foreground", foreground.hex)
+ colors["button-color-foreground"] = get(
+ "button-color-foreground", colors["text"]
+ )
+ colors["button-focus-text-style"] = get("button-focus-text-style", "b reverse")
+
return colors
diff --git a/contrib/python/textual/textual/document/_wrapped_document.py b/contrib/python/textual/textual/document/_wrapped_document.py
index cef7a57dda1..68846bedab8 100644
--- a/contrib/python/textual/textual/document/_wrapped_document.py
+++ b/contrib/python/textual/textual/document/_wrapped_document.py
@@ -295,7 +295,9 @@ class WrappedDocument:
if not self._width:
# No wrapping, so we directly map offset to location and clamp.
line_index = min(y, len(self._wrap_offsets) - 1)
- column_index = min(x, len(self.document.get_line(line_index)))
+ column_index = cell_width_to_column_index(
+ self.document.get_line(line_index), x, self._tab_width
+ )
return line_index, column_index
# Find the line corresponding to the given y offset in the wrapped document.
diff --git a/contrib/python/textual/textual/dom.py b/contrib/python/textual/textual/dom.py
index 78b921ef2c0..68212bc8b63 100644
--- a/contrib/python/textual/textual/dom.py
+++ b/contrib/python/textual/textual/dom.py
@@ -223,6 +223,8 @@ class DOMNode(MessagePump):
self._has_focus_within: bool = False
self._has_order_style: bool = False
"""The node has an ordered dependent pseudo-style (`:odd`, `:even`, `:first-of-type`, `:last-of-type`)"""
+ self._has_odd_or_even: bool = False
+ """The node has the pseudo class `odd` or `even`."""
self._reactive_connect: (
dict[str, tuple[MessagePump, Reactive[object] | object]] | None
) = None
@@ -238,7 +240,7 @@ class DOMNode(MessagePump):
Example:
```python
- self.set_reactive(App.dark_mode, True)
+ self.set_reactive(App.theme, "textual-light")
```
Args:
@@ -248,15 +250,14 @@ class DOMNode(MessagePump):
Raises:
AttributeError: If the first argument is not a reactive.
"""
+ name = reactive.name
if not isinstance(reactive, Reactive):
- raise TypeError(
- "A Reactive class is required; for example: MyApp.dark_mode"
- )
- if reactive.name not in self._reactives:
+ raise TypeError("A Reactive class is required; for example: MyApp.theme")
+ if name not in self._reactives:
raise AttributeError(
- "No reactive called {name!r}; Have you called super().__init__(...) in the {self.__class__.__name__} constructor?"
+ f"No reactive called {name!r}; Have you called super().__init__(...) in the {self.__class__.__name__} constructor?"
)
- setattr(self, f"_reactive_{reactive.name}", value)
+ setattr(self, f"_reactive_{name}", value)
def mutate_reactive(self, reactive: Reactive[ReactiveType]) -> None:
"""Force an update to a mutable reactive.
@@ -559,7 +560,9 @@ class DOMNode(MessagePump):
Returns:
A Styles object.
"""
+
styles = RenderStyles(self, Styles(), Styles())
+
for name in names:
if name not in self._component_styles:
raise KeyError(f"No {name!r} key in COMPONENT_CLASSES")
@@ -1224,11 +1227,11 @@ class DOMNode(MessagePump):
Example:
```python
- def on_dark_change(old_value:bool, new_value:bool) -> None:
- # Called when app.dark changes.
- print("App.dark went from {old_value} to {new_value}")
+ def on_theme_change(old_value:str, new_value:str) -> None:
+ # Called when app.theme changes.
+ print(f"App.theme went from {old_value} to {new_value}")
- self.watch(self.app, "dark", self.on_dark_change, init=False)
+ self.watch(self.app, "theme", self.on_theme_change, init=False)
```
Args:
diff --git a/contrib/python/textual/textual/driver.py b/contrib/python/textual/textual/driver.py
index 43880153fc7..1fa57c406b6 100644
--- a/contrib/python/textual/textual/driver.py
+++ b/contrib/python/textual/textual/driver.py
@@ -7,7 +7,7 @@ from contextlib import contextmanager
from pathlib import Path
from typing import TYPE_CHECKING, Any, BinaryIO, Iterator, Literal, TextIO
-from textual import events, log
+from textual import events, log, messages
from textual.events import MouseUp
if TYPE_CHECKING:
@@ -64,46 +64,46 @@ class Driver(ABC):
"""Can this driver be suspended?"""
return False
- def send_event(self, event: events.Event) -> None:
- """Send an event to the target app.
+ def send_message(self, message: messages.Message) -> None:
+ """Send a message to the target app.
Args:
- event: An event.
+ message: A message.
"""
asyncio.run_coroutine_threadsafe(
- self._app._post_message(event), loop=self._loop
+ self._app._post_message(message), loop=self._loop
)
- def process_event(self, event: events.Event) -> None:
- """Perform additional processing on an event, prior to sending.
+ def process_message(self, message: messages.Message) -> None:
+ """Perform additional processing on a message, prior to sending.
Args:
- event: An event to send.
+ event: A message to process.
"""
# NOTE: This runs in a thread.
# Avoid calling methods on the app.
- event.set_sender(self._app)
+ message.set_sender(self._app)
if self.cursor_origin is None:
offset_x = 0
offset_y = 0
else:
offset_x, offset_y = self.cursor_origin
- if isinstance(event, events.MouseEvent):
- event.x -= offset_x
- event.y -= offset_y
- event.screen_x -= offset_x
- event.screen_y -= offset_y
+ if isinstance(message, events.MouseEvent):
+ message.x -= offset_x
+ message.y -= offset_y
+ message.screen_x -= offset_x
+ message.screen_y -= offset_y
- if isinstance(event, events.MouseDown):
- if event.button:
- self._down_buttons.append(event.button)
- elif isinstance(event, events.MouseUp):
- if event.button and event.button in self._down_buttons:
- self._down_buttons.remove(event.button)
- elif isinstance(event, events.MouseMove):
+ if isinstance(message, events.MouseDown):
+ if message.button:
+ self._down_buttons.append(message.button)
+ elif isinstance(message, events.MouseUp):
+ if message.button and message.button in self._down_buttons:
+ self._down_buttons.remove(message.button)
+ elif isinstance(message, events.MouseMove):
if (
self._down_buttons
- and not event.button
+ and not message.button
and self._last_move_event is not None
):
# Deduplicate self._down_buttons while preserving order.
@@ -111,24 +111,25 @@ class Driver(ABC):
self._down_buttons.clear()
move_event = self._last_move_event
for button in buttons:
- self.send_event(
+ self.send_message(
MouseUp(
+ message.widget,
x=move_event.x,
y=move_event.y,
delta_x=0,
delta_y=0,
button=button,
- shift=event.shift,
- meta=event.meta,
- ctrl=event.ctrl,
+ shift=message.shift,
+ meta=message.meta,
+ ctrl=message.ctrl,
screen_x=move_event.screen_x,
screen_y=move_event.screen_y,
- style=event.style,
+ style=message.style,
)
)
- self._last_move_event = event
+ self._last_move_event = message
- self.send_event(event)
+ self.send_message(message)
@abstractmethod
def write(self, data: str) -> None:
diff --git a/contrib/python/textual/textual/drivers/linux_driver.py b/contrib/python/textual/textual/drivers/linux_driver.py
index 40c35f6bc73..510b0992f0e 100644
--- a/contrib/python/textual/textual/drivers/linux_driver.py
+++ b/contrib/python/textual/textual/drivers/linux_driver.py
@@ -20,6 +20,8 @@ from textual._xterm_parser import XTermParser
from textual.driver import Driver
from textual.drivers._writer_thread import WriterThread
from textual.geometry import Size
+from textual.message import Message
+from textual.messages import TerminalSupportInBandWindowResize
if TYPE_CHECKING:
from textual.app import App
@@ -59,6 +61,7 @@ class LinuxDriver(Driver):
# need to know that we came in here via a SIGTSTP; this flag helps
# keep track of this.
self._must_signal_resume = False
+ self._in_band_window_resize = False
# Put handlers for SIGTSTP and SIGCONT in place. These are necessary
# to support the user pressing Ctrl+Z (or whatever the dev might
@@ -135,6 +138,22 @@ class LinuxDriver(Driver):
"""Enable bracketed paste mode."""
self.write("\x1b[?2004h")
+ def _query_in_band_window_resize(self) -> None:
+ self.write("\x1b[?2048$p")
+
+ def _enable_in_band_window_resize(self) -> None:
+ self.write("\x1b[?2048h")
+
+ def _enable_line_wrap(self) -> None:
+ self.write("\x1b[?7h")
+
+ def _disable_line_wrap(self) -> None:
+ self.write("\x1b[?7l")
+
+ def _disable_in_band_window_resize(self) -> None:
+ if self._in_band_window_resize:
+ self.write("\x1b[?2048l")
+
def _disable_bracketed_paste(self) -> None:
"""Disable bracketed paste mode."""
self.write("\x1b[?2004l")
@@ -197,6 +216,8 @@ class LinuxDriver(Driver):
loop = asyncio.get_running_loop()
def send_size_event() -> None:
+ if self._in_band_window_resize:
+ return
terminal_size = self._get_terminal_size()
width, height = terminal_size
textual_size = Size(width, height)
@@ -246,14 +267,15 @@ class LinuxDriver(Driver):
self.write("\x1b[?25l") # Hide cursor
self.write("\x1b[?1004h") # Enable FocusIn/FocusOut.
self.write("\x1b[>1u") # https://sw.kovidgoyal.net/kitty/keyboard-protocol/
- # Disambiguate escape codes https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
- self.write("\x1b[=1;u")
+
self.flush()
self._key_thread = Thread(target=self._run_input_thread)
send_size_event()
self._key_thread.start()
self._request_terminal_sync_mode_support()
+ self._query_in_band_window_resize()
self._enable_bracketed_paste()
+ self._disable_line_wrap()
# Appears to fix an issue enabling mouse support in iTerm 3.5.0
self._enable_mouse_support()
@@ -330,6 +352,8 @@ class LinuxDriver(Driver):
def stop_application_mode(self) -> None:
"""Stop application mode, restore state."""
self._disable_bracketed_paste()
+ self._enable_line_wrap()
+ self._disable_in_band_window_resize()
self.disable_input()
if self.attrs_before is not None:
@@ -341,6 +365,7 @@ class LinuxDriver(Driver):
# Disable the Kitty keyboard protocol. This must be done before leaving
# the alt screen. https://sw.kovidgoyal.net/kitty/keyboard-protocol/
self.write("\x1b[<u")
+
# Alt screen false, show cursor
self.write("\x1b[?1049l")
self.write("\x1b[?25h")
@@ -401,9 +426,9 @@ class LinuxDriver(Driver):
# This can occur if the stdin is piped
break
for event in feed(unicode_data):
- self.process_event(event)
+ self.process_message(event)
for event in tick():
- self.process_event(event)
+ self.process_message(event)
try:
while not self.exit_event.is_set():
@@ -418,3 +443,22 @@ class LinuxDriver(Driver):
pass
except ParseError:
pass
+
+ def process_message(self, message: Message) -> None:
+ # intercept in-band window resize
+ if isinstance(message, TerminalSupportInBandWindowResize):
+ # If it is supported, enabled it
+ if message.supported and not message.enabled:
+ self._enable_in_band_window_resize()
+ self._in_band_window_resize = message.supported
+ elif message.enabled:
+ self._in_band_window_resize = message.supported
+ # Send up-to-date message
+ super().process_message(
+ TerminalSupportInBandWindowResize(
+ message.supported, self._in_band_window_resize
+ )
+ )
+ return
+
+ super().process_message(message)
diff --git a/contrib/python/textual/textual/drivers/linux_inline_driver.py b/contrib/python/textual/textual/drivers/linux_inline_driver.py
index 22bb3495057..03e55d528f1 100644
--- a/contrib/python/textual/textual/drivers/linux_inline_driver.py
+++ b/contrib/python/textual/textual/drivers/linux_inline_driver.py
@@ -155,12 +155,12 @@ class LinuxInlineDriver(Driver):
if isinstance(event, events.CursorPosition):
self.cursor_origin = (event.x, event.y)
else:
- self.process_event(event)
+ self.process_message(event)
for event in tick():
if isinstance(event, events.CursorPosition):
self.cursor_origin = (event.x, event.y)
else:
- self.process_event(event)
+ self.process_message(event)
try:
while not self.exit_event.is_set():
diff --git a/contrib/python/textual/textual/drivers/web_driver.py b/contrib/python/textual/textual/drivers/web_driver.py
index 7e1e0ff0b4d..2dd319f54de 100644
--- a/contrib/python/textual/textual/drivers/web_driver.py
+++ b/contrib/python/textual/textual/drivers/web_driver.py
@@ -195,12 +195,12 @@ class WebDriver(Driver):
if packet_type == "D":
# Treat as stdin
for event in parser.feed(decode(payload)):
- self.process_event(event)
+ self.process_message(event)
else:
# Process meta information separately
self._on_meta(packet_type, payload)
for event in parser.tick():
- self.process_event(event)
+ self.process_message(event)
except _ExitInput:
pass
except Exception:
diff --git a/contrib/python/textual/textual/drivers/windows_driver.py b/contrib/python/textual/textual/drivers/windows_driver.py
index 6c2f8ae3926..3a908afbe73 100644
--- a/contrib/python/textual/textual/drivers/windows_driver.py
+++ b/contrib/python/textual/textual/drivers/windows_driver.py
@@ -101,7 +101,7 @@ class WindowsDriver(Driver):
self._enable_bracketed_paste()
self._event_thread = win32.EventMonitor(
- loop, self._app, self.exit_event, self.process_event
+ loop, self._app, self.exit_event, self.process_message
)
self._event_thread.start()
diff --git a/contrib/python/textual/textual/events.py b/contrib/python/textual/textual/events.py
index 6711f46a936..6e7a21e8da3 100644
--- a/contrib/python/textual/textual/events.py
+++ b/contrib/python/textual/textual/events.py
@@ -115,6 +115,7 @@ class Resize(Event, bubble=False):
size: Size,
virtual_size: Size,
container_size: Size | None = None,
+ pixel_size: Size | None = None,
) -> None:
self.size = size
"""The new size of the Widget."""
@@ -122,15 +123,33 @@ class Resize(Event, bubble=False):
"""The virtual size (scrollable size) of the Widget."""
self.container_size = size if container_size is None else container_size
"""The size of the Widget's container widget."""
+ self.pixel_size = pixel_size
+ """Size of terminal window in pixels if known, or `None` if not known."""
super().__init__()
+ @classmethod
+ def from_dimensions(
+ cls, cells: tuple[int, int], pixels: tuple[int, int] | None
+ ) -> Resize:
+ """Construct from basic dimensions.
+
+ Args:
+ cells: tuple of (<width>, <height>) in cells.
+ pixels: tuple of (<width>, <height>) in pixels if known, or `None` if not known.
+
+ """
+ size = Size(*cells)
+ pixel_size = Size(*pixels) if pixels is not None else None
+ return Resize(size, size, size, pixel_size)
+
def can_replace(self, message: "Message") -> bool:
return isinstance(message, Resize)
def __rich_repr__(self) -> rich.repr.Result:
yield "size", self.size
- yield "virtual_size", self.virtual_size
+ yield "virtual_size", self.virtual_size, self.size
yield "container_size", self.container_size, self.size
+ yield "pixel_size", self.pixel_size, None
class Compose(Event, bubble=False, verbose=True):
@@ -308,6 +327,7 @@ class MouseEvent(InputEvent, bubble=True):
- [ ] Verbose
Args:
+ widget: The widget under the mouse.
x: The relative x coordinate.
y: The relative y coordinate.
delta_x: Change in x since the last message.
@@ -322,6 +342,7 @@ class MouseEvent(InputEvent, bubble=True):
"""
__slots__ = [
+ "widget",
"x",
"y",
"delta_x",
@@ -337,6 +358,7 @@ class MouseEvent(InputEvent, bubble=True):
def __init__(
self,
+ widget: Widget | None,
x: int,
y: int,
delta_x: int,
@@ -350,6 +372,8 @@ class MouseEvent(InputEvent, bubble=True):
style: Style | None = None,
) -> None:
super().__init__()
+ self.widget: Widget | None = widget
+ """The widget under the mouse at the time of a click."""
self.x = x
"""The relative x coordinate."""
self.y = y
@@ -373,8 +397,11 @@ class MouseEvent(InputEvent, bubble=True):
self._style = style or Style()
@classmethod
- def from_event(cls: Type[MouseEventT], event: MouseEvent) -> MouseEventT:
+ def from_event(
+ cls: Type[MouseEventT], widget: Widget, event: MouseEvent
+ ) -> MouseEventT:
new_event = cls(
+ widget,
event.x,
event.y,
event.delta_x,
@@ -390,6 +417,7 @@ class MouseEvent(InputEvent, bubble=True):
return new_event
def __rich_repr__(self) -> rich.repr.Result:
+ yield self.widget
yield "x", self.x
yield "y", self.y
yield "delta_x", self.delta_x, 0
@@ -404,6 +432,10 @@ class MouseEvent(InputEvent, bubble=True):
yield "ctrl", self.ctrl, False
@property
+ def control(self) -> Widget | None:
+ return self.widget
+
+ @property
def offset(self) -> Offset:
"""The mouse coordinate as an offset.
@@ -459,6 +491,7 @@ class MouseEvent(InputEvent, bubble=True):
def _apply_offset(self, x: int, y: int) -> MouseEvent:
return self.__class__(
+ self.widget,
x=self.x + x,
y=self.y + y,
delta_x=self.delta_x,
diff --git a/contrib/python/textual/textual/layout.py b/contrib/python/textual/textual/layout.py
index adb7ab5c2d1..8e494fcb74d 100644
--- a/contrib/python/textual/textual/layout.py
+++ b/contrib/python/textual/textual/layout.py
@@ -39,6 +39,7 @@ class DockArrangeResult:
self._spatial_map.insert(
(
placement.region.grow(placement.margin),
+ placement.offset,
placement.fixed,
placement.overlay,
placement,
@@ -75,7 +76,7 @@ class DockArrangeResult:
culled_placements = [
placement
for placement in visible_placements
- if placement.fixed or overlaps(placement.region)
+ if placement.fixed or overlaps(placement.region + placement.offset)
]
return culled_placements
@@ -84,6 +85,7 @@ class WidgetPlacement(NamedTuple):
"""The position, size, and relative order of a widget within its parent."""
region: Region
+ offset: Offset
margin: Spacing
widget: Widget
order: int = 0
@@ -92,7 +94,7 @@ class WidgetPlacement(NamedTuple):
@classmethod
def translate(
- cls, placements: list[WidgetPlacement], offset: Offset
+ cls, placements: list[WidgetPlacement], translate_offset: Offset
) -> list[WidgetPlacement]:
"""Move all placements by a given offset.
@@ -103,10 +105,18 @@ class WidgetPlacement(NamedTuple):
Returns:
Placements with adjusted region, or same instance if offset is null.
"""
- if offset:
+ if translate_offset:
return [
- cls(region + offset, margin, layout_widget, order, fixed, overlay)
- for region, margin, layout_widget, order, fixed, overlay in placements
+ cls(
+ region + translate_offset,
+ offset,
+ margin,
+ layout_widget,
+ order,
+ fixed,
+ overlay,
+ )
+ for region, offset, margin, layout_widget, order, fixed, overlay in placements
]
return placements
diff --git a/contrib/python/textual/textual/layouts/grid.py b/contrib/python/textual/textual/layouts/grid.py
index d7dfc958969..a1b0823d6d4 100644
--- a/contrib/python/textual/textual/layouts/grid.py
+++ b/contrib/python/textual/textual/layouts/grid.py
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, Iterable
from textual._resolve import resolve
from textual.css.scalar import Scalar
-from textual.geometry import Region, Size, Spacing
+from textual.geometry import NULL_OFFSET, Region, Size, Spacing
from textual.layout import ArrangeResult, Layout, WidgetPlacement
if TYPE_CHECKING:
@@ -258,6 +258,7 @@ class GridLayout(Layout):
rows = resolve(row_scalars, size.height, gutter_horizontal, size, viewport)
placements: list[WidgetPlacement] = []
+ _WidgetPlacement = WidgetPlacement
add_placement = placements.append
widgets: list[Widget] = []
add_widget = widgets.append
@@ -272,26 +273,34 @@ class GridLayout(Layout):
x2, cell_width = columns[min(max_column, column + column_span)]
y2, cell_height = rows[min(max_row, row + row_span)]
cell_size = Size(cell_width + x2 - x, cell_height + y2 - y)
- width, height, margin = widget._get_box_model(
+ box_width, box_height, margin = widget._get_box_model(
cell_size,
viewport,
Fraction(cell_size.width),
Fraction(cell_size.height),
)
if self.stretch_height and len(children) > 1:
- height = (
- height
- if (height > cell_size.height)
- else Fraction(cell_size.height)
- )
+ if box_height <= cell_size.height:
+ box_height = Fraction(cell_size.height)
+
region = (
- Region(x, y, int(width + margin.width), int(height + margin.height))
+ Region(
+ x, y, int(box_width + margin.width), int(box_height + margin.height)
+ )
.crop_size(cell_size)
.shrink(margin)
)
+
+ placement_offset = (
+ styles.offset.resolve(cell_size, viewport)
+ if styles.has_rule("offset")
+ else NULL_OFFSET
+ )
+
add_placement(
- WidgetPlacement(
+ _WidgetPlacement(
region + offset,
+ placement_offset,
(
margin
if gutter_spacing is None
diff --git a/contrib/python/textual/textual/layouts/horizontal.py b/contrib/python/textual/textual/layouts/horizontal.py
index ce032d27a58..c62fae3c1da 100644
--- a/contrib/python/textual/textual/layouts/horizontal.py
+++ b/contrib/python/textual/textual/layouts/horizontal.py
@@ -4,7 +4,7 @@ from fractions import Fraction
from typing import TYPE_CHECKING
from textual._resolve import resolve_box_models
-from textual.geometry import Region, Size
+from textual.geometry import NULL_OFFSET, Region, Size
from textual.layout import ArrangeResult, Layout, WidgetPlacement
if TYPE_CHECKING:
@@ -24,6 +24,7 @@ class HorizontalLayout(Layout):
) -> ArrangeResult:
placements: list[WidgetPlacement] = []
add_placement = placements.append
+ viewport = parent.app.size
child_styles = [child.styles for child in children]
box_margins: list[Spacing] = [
@@ -52,7 +53,7 @@ class HorizontalLayout(Layout):
[styles.width for styles in child_styles],
children,
size,
- parent.app.size,
+ viewport,
resolve_margin,
resolve_dimension="width",
)
@@ -75,20 +76,31 @@ class HorizontalLayout(Layout):
_Region = Region
_WidgetPlacement = WidgetPlacement
+ _Size = Size
for widget, (content_width, content_height, box_margin), margin in zip(
children, box_models, margins
):
- overlay = widget.styles.overlay == "screen"
+ styles = widget.styles
+ overlay = styles.overlay == "screen"
+ offset = (
+ styles.offset.resolve(
+ _Size(content_width.__floor__(), content_height.__floor__()),
+ viewport,
+ )
+ if styles.has_rule("offset")
+ else NULL_OFFSET
+ )
offset_y = box_margin.top
next_x = x + content_width
add_placement(
_WidgetPlacement(
_Region(
- int(x),
+ x.__floor__(),
offset_y,
- int(next_x - int(x)),
- int(content_height),
+ (next_x - x.__floor__()).__floor__(),
+ content_height.__floor__(),
),
+ offset,
box_margin,
widget,
0,
diff --git a/contrib/python/textual/textual/layouts/vertical.py b/contrib/python/textual/textual/layouts/vertical.py
index a5bf67aa40b..c7b8087f7fb 100644
--- a/contrib/python/textual/textual/layouts/vertical.py
+++ b/contrib/python/textual/textual/layouts/vertical.py
@@ -4,7 +4,7 @@ from fractions import Fraction
from typing import TYPE_CHECKING
from textual._resolve import resolve_box_models
-from textual.geometry import Region, Size
+from textual.geometry import NULL_OFFSET, Region, Size
from textual.layout import ArrangeResult, Layout, WidgetPlacement
if TYPE_CHECKING:
@@ -22,6 +22,7 @@ class VerticalLayout(Layout):
) -> ArrangeResult:
placements: list[WidgetPlacement] = []
add_placement = placements.append
+ viewport = parent.app.size
child_styles = [child.styles for child in children]
box_margins: list[Spacing] = [
@@ -80,11 +81,21 @@ class VerticalLayout(Layout):
_Region = Region
_WidgetPlacement = WidgetPlacement
+ _Size = Size
for widget, (content_width, content_height, box_margin), margin in zip(
children, box_models, margins
):
- overlay = widget.styles.overlay == "screen"
+ styles = widget.styles
+ overlay = styles.overlay == "screen"
next_y = y + content_height
+ offset = (
+ styles.offset.resolve(
+ _Size(content_width.__floor__(), content_height.__floor__()),
+ viewport,
+ )
+ if styles.has_rule("offset")
+ else NULL_OFFSET
+ )
add_placement(
_WidgetPlacement(
_Region(
@@ -93,6 +104,7 @@ class VerticalLayout(Layout):
content_width.__floor__(),
next_y.__floor__() - y.__floor__(),
),
+ offset,
box_margin,
widget,
0,
diff --git a/contrib/python/textual/textual/lazy.py b/contrib/python/textual/textual/lazy.py
index b17a3b43a31..58ab6a3e2e9 100644
--- a/contrib/python/textual/textual/lazy.py
+++ b/contrib/python/textual/textual/lazy.py
@@ -61,3 +61,81 @@ class Lazy(Widget):
await self.remove()
self.call_after_refresh(mount)
+
+
+class Reveal(Widget):
+ """Similar to [Lazy][textual.lazy.Lazy], but mounts children sequentially.
+
+ This is useful when you have so many child widgets that there is a noticeable delay before
+ you see anything. By mounting the children over several frames, the user will feel that
+ something is happening.
+
+ Example:
+ ```python
+ def compose(self) -> ComposeResult:
+ with lazy.Reveal(containers.VerticalScroll(can_focus=False)):
+ yield Markdown(WIDGETS_MD, classes="column")
+ yield Buttons()
+ yield Checkboxes()
+ yield Datatables()
+ yield Inputs()
+ yield ListViews()
+ yield Logs()
+ yield Sparklines()
+ yield Footer()
+ ```
+ """
+
+ DEFAULT_CSS = """
+ Reveal {
+ display: none;
+ }
+ """
+
+ def __init__(self, widget: Widget) -> None:
+ """
+ Args:
+ widget: A widget to mount.
+ """
+ self._replace_widget = widget
+ self._widgets: list[Widget] = []
+ super().__init__()
+
+ @classmethod
+ def _reveal(cls, parent: Widget, widgets: list[Widget]) -> None:
+ """Reveal children lazily.
+
+ Args:
+ parent: The parent widget.
+ widgets: Child widgets.
+ """
+
+ async def check_children() -> None:
+ """Check for pending children"""
+ if not widgets:
+ return
+ widget = widgets.pop(0)
+ try:
+ await parent.mount(widget)
+ except Exception:
+ # I think this can occur if the parent is removed before all children are added
+ # Only noticed this on shutdown
+ return
+
+ if widgets:
+ parent.set_timer(0.02, check_children)
+
+ parent.call_next(check_children)
+
+ def compose_add_child(self, widget: Widget) -> None:
+ self._widgets.append(widget)
+
+ async def mount_composed_widgets(self, widgets: list[Widget]) -> None:
+ parent = self.parent
+ if parent is None:
+ return
+ assert isinstance(parent, Widget)
+ await parent.mount(self._replace_widget, after=self)
+ await self.remove()
+ self._reveal(self._replace_widget, self._widgets.copy())
+ self._widgets.clear()
diff --git a/contrib/python/textual/textual/message_pump.py b/contrib/python/textual/textual/message_pump.py
index 6ac31ac8ebb..d47c51cf1cc 100644
--- a/contrib/python/textual/textual/message_pump.py
+++ b/contrib/python/textual/textual/message_pump.py
@@ -725,6 +725,8 @@ class MessagePump(metaclass=_MessagePumpMeta):
continue
for attribute, selector in selectors.items():
node = getattr(message, attribute)
+ if node is None:
+ break
if not isinstance(node, Widget):
raise OnNoWidget(
f"on decorator can't match against {attribute!r} as it is not a widget."
@@ -834,6 +836,13 @@ class MessagePump(metaclass=_MessagePumpMeta):
async def on_callback(self, event: events.Callback) -> None:
if self.app._closing:
return
+ try:
+ self.app.screen
+ except Exception:
+ self.log.warning(
+ f"Not invoking timer callback {event.callback!r} because there is no screen."
+ )
+ return
await invoke(event.callback)
async def on_timer(self, event: events.Timer) -> None:
@@ -843,6 +852,13 @@ class MessagePump(metaclass=_MessagePumpMeta):
event.stop()
if event.callback is not None:
try:
+ self.app.screen
+ except Exception:
+ self.log.warning(
+ f"Not invoking timer callback {event.callback!r} because there is no screen."
+ )
+ return
+ try:
await invoke(event.callback)
except Exception as error:
raise CallbackError(
diff --git a/contrib/python/textual/textual/messages.py b/contrib/python/textual/textual/messages.py
index 3041b98675b..427d8597c80 100644
--- a/contrib/python/textual/textual/messages.py
+++ b/contrib/python/textual/textual/messages.py
@@ -97,3 +97,42 @@ class TerminalSupportsSynchronizedOutput(Message):
Used to make the App aware that the terminal emulator supports synchronised output.
@link https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036
"""
+
+
+class TerminalSupportInBandWindowResize(Message):
+ """Reports if the in-band window resize protocol is supported.
+
+ https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83"""
+
+ def __init__(self, supported: bool, enabled: bool) -> None:
+ """Initialize message.
+
+ Args:
+ supported: Is the protocol supported?
+ enabled: Is the protocol enabled.
+ """
+ self.supported = supported
+ self.enabled = enabled
+ super().__init__()
+
+ def __rich_repr__(self) -> rich.repr.Result:
+ yield "supported", self.supported
+ yield "enabled", self.enabled
+
+ @classmethod
+ def from_setting_parameter(
+ cls, setting_parameter: int
+ ) -> TerminalSupportInBandWindowResize:
+ """Construct the message from the setting parameter.
+
+ Args:
+ setting_parameter: Setting parameter from stdin.
+
+ Returns:
+ New TerminalSupportInBandWindowResize instance.
+ """
+
+ supported = setting_parameter not in (0, 4)
+ enabled = setting_parameter in (1, 3)
+ return TerminalSupportInBandWindowResize(supported, enabled)
diff --git a/contrib/python/textual/textual/pilot.py b/contrib/python/textual/textual/pilot.py
index 63f3ac3db05..e7362ea4e64 100644
--- a/contrib/python/textual/textual/pilot.py
+++ b/contrib/python/textual/textual/pilot.py
@@ -32,6 +32,7 @@ def _get_mouse_message_arguments(
"""Get the arguments to pass into mouse messages for the click and hover methods."""
click_x, click_y = target.region.offset + offset
message_arguments = {
+ "widget": target,
"x": click_x,
"y": click_y,
"delta_x": 0,
diff --git a/contrib/python/textual/textual/renderables/_blend_colors.py b/contrib/python/textual/textual/renderables/_blend_colors.py
index 305675103af..24476faf694 100644
--- a/contrib/python/textual/textual/renderables/_blend_colors.py
+++ b/contrib/python/textual/textual/renderables/_blend_colors.py
@@ -15,8 +15,8 @@ def blend_colors(color1: Color, color2: Color, ratio: float) -> Color:
Returns:
A Color representing the blending of the two supplied colors.
"""
- assert color1.triplet is not None
- assert color2.triplet is not None
+ if color1.triplet is None or color2.triplet is None:
+ return color2
r1, g1, b1 = color1.triplet
r2, g2, b2 = color2.triplet
diff --git a/contrib/python/textual/textual/renderables/digits.py b/contrib/python/textual/textual/renderables/digits.py
index c6d982f5dc7..bcea3ed612d 100644
--- a/contrib/python/textual/textual/renderables/digits.py
+++ b/contrib/python/textual/textual/renderables/digits.py
@@ -13,7 +13,7 @@ DIGITS3X3_BOLD = """\
┏━┓
┃ ┃
┗━┛
- ┓
+╺┓
╺┻╸
╺━┓
@@ -78,7 +78,7 @@ DIGITS3X3_BOLD = """\
╰╫╯
╭─╮
╪═
-┴─╴
+┷━╸
╭─╮
╪═
╰─╯
@@ -163,7 +163,7 @@ DIGITS3X3 = """\
╰╫╯
╭─╮
╪═
-┴─╴
+┷━╸
╭─╮
╪═
╰─╯
diff --git a/contrib/python/textual/textual/renderables/sparkline.py b/contrib/python/textual/textual/renderables/sparkline.py
index 4da25fa233f..c2c15608d44 100644
--- a/contrib/python/textual/textual/renderables/sparkline.py
+++ b/contrib/python/textual/textual/renderables/sparkline.py
@@ -6,6 +6,7 @@ from typing import Callable, Generic, Iterable, Sequence, TypeVar
from rich.color import Color
from rich.console import Console, ConsoleOptions, RenderResult
+from rich.measure import Measurement
from rich.segment import Segment
from rich.style import Style
@@ -95,6 +96,11 @@ class Sparkline(Generic[T]):
bucket_index += step
yield Segment(self.BARS[bar_index], Style.from_color(bar_color))
+ def __rich_measure__(
+ self, console: "Console", options: "ConsoleOptions"
+ ) -> Measurement:
+ return Measurement(self.width or options.max_width, 1)
+
if __name__ == "__main__":
console = Console()
diff --git a/contrib/python/textual/textual/screen.py b/contrib/python/textual/textual/screen.py
index 3e7d21f1ce4..81cc3c733ab 100644
--- a/contrib/python/textual/textual/screen.py
+++ b/contrib/python/textual/textual/screen.py
@@ -147,10 +147,9 @@ class Screen(Generic[ScreenResultType], Widget):
DEFAULT_CSS = """
Screen {
-
layout: vertical;
overflow-y: auto;
- background: $surface;
+ background: $background;
&:inline {
height: auto;
@@ -267,6 +266,9 @@ class Screen(Generic[ScreenResultType], Widget):
self.bindings_updated_signal: Signal[Screen] = Signal(self, "bindings_updated")
"""A signal published when the bindings have been updated"""
+ self._css_update_count = -1
+ """Track updates to CSS."""
+
@property
def is_modal(self) -> bool:
"""Is the screen modal?"""
@@ -744,12 +746,15 @@ class Screen(Generic[ScreenResultType], Widget):
"""
return self._move_focus(-1, selector)
- def maximize(self, widget: Widget, container: bool = True) -> None:
+ def maximize(self, widget: Widget, container: bool = True) -> bool:
"""Maximize a widget, so it fills the screen.
Args:
widget: Widget to maximize.
container: If one of the widgets ancestors is a maximizeable widget, maximize that instead.
+
+ Returns:
+ `True` if the widget was maximized, otherwise `False`.
"""
if widget.allow_maximize:
if container:
@@ -759,9 +764,11 @@ class Screen(Generic[ScreenResultType], Widget):
break
if maximize_widget.allow_maximize:
self.maximized = maximize_widget
- return
+ return True
self.maximized = widget
+ return True
+ return False
def minimize(self) -> None:
"""Restore any maximized widget to normal state."""
@@ -780,6 +787,10 @@ class Screen(Generic[ScreenResultType], Widget):
"""Action to minimize the currently maximized widget."""
self.minimize()
+ def action_blur(self) -> None:
+ """Action to remove focus (if set)."""
+ self.set_focus(None)
+
def _reset_focus(
self, widget: Widget, avoiding: list[Widget] | None = None
) -> None:
@@ -1365,6 +1376,7 @@ class Screen(Generic[ScreenResultType], Widget):
the origin of the specified region.
"""
return events.MouseMove(
+ event.widget,
event.x - region.x,
event.y - region.y,
event.delta_x,
diff --git a/contrib/python/textual/textual/strip.py b/contrib/python/textual/textual/strip.py
index c7644898f85..0147cc3acb2 100644
--- a/contrib/python/textual/textual/strip.py
+++ b/contrib/python/textual/textual/strip.py
@@ -17,10 +17,11 @@ from rich.measure import Measurement
from rich.segment import Segment
from rich.style import Style, StyleType
-from textual._segment_tools import index_to_cell_position
+from textual._segment_tools import index_to_cell_position, line_pad
from textual.cache import FIFOCache
from textual.color import Color
from textual.constants import DEBUG
+from textual.css.types import AlignHorizontal, AlignVertical
from textual.filter import LineFilter
@@ -157,6 +158,101 @@ class Strip:
"""
return [cls(segments, cell_length) for segments in lines]
+ @classmethod
+ def align(
+ cls,
+ strips: list[Strip],
+ style: Style,
+ width: int,
+ height: int,
+ horizontal: AlignHorizontal,
+ vertical: AlignVertical,
+ ) -> Iterable[Strip]:
+ """Align a list of strips on both axis.
+
+ Args:
+ strips: A list of strips, such as from a render.
+ style: The Rich style of additional space.
+ width: Width of container.
+ height: Height of container.
+ horizontal: Horizontal alignment method.
+ vertical: Vertical alignment method.
+
+ Returns:
+ An iterable of strips, with additional padding.
+
+ """
+ if not strips:
+ return
+ line_lengths = [strip.cell_length for strip in strips]
+ shape_width = max(line_lengths)
+ shape_height = len(line_lengths)
+
+ def blank_lines(count: int) -> Iterable[Strip]:
+ """Create blank lines.
+
+ Args:
+ count: Desired number of blank lines.
+
+ Returns:
+ An iterable of blank lines.
+ """
+ blank = cls([Segment(" " * width, style)], width)
+ for _ in range(count):
+ yield blank
+
+ top_blank_lines = bottom_blank_lines = 0
+ vertical_excess_space = max(0, height - shape_height)
+
+ if vertical == "top":
+ bottom_blank_lines = vertical_excess_space
+ elif vertical == "middle":
+ top_blank_lines = vertical_excess_space // 2
+ bottom_blank_lines = vertical_excess_space - top_blank_lines
+ elif vertical == "bottom":
+ top_blank_lines = vertical_excess_space
+
+ if top_blank_lines:
+ yield from blank_lines(top_blank_lines)
+
+ if horizontal == "left":
+ for strip in strips:
+ if strip.cell_length == width:
+ yield strip
+ else:
+ yield Strip(
+ line_pad(strip._segments, 0, width - strip.cell_length, style),
+ width,
+ )
+ elif horizontal == "center":
+ left_space = max(0, width - shape_width) // 2
+ for strip in strips:
+ if strip.cell_length == width:
+ yield strip
+ else:
+ yield Strip(
+ line_pad(
+ strip._segments,
+ left_space,
+ width - strip.cell_length - left_space,
+ style,
+ ),
+ width,
+ )
+
+ elif horizontal == "right":
+ for strip in strips:
+ if strip.cell_length == width:
+ yield strip
+ else:
+ yield cls(
+ line_pad(strip._segments, width - strip.cell_length, 0, style),
+ width,
+ )
+
+ if bottom_blank_lines:
+ yield from blank_lines(bottom_blank_lines)
+
def index_to_cell_position(self, index: int) -> int:
"""Given a character index, return the cell position of that character.
This is the sum of the cell lengths of all the characters *before* the character
@@ -283,7 +379,6 @@ class Strip:
strip = self
self._line_length_cache[cache_key] = strip
-
return strip
def simplify(self) -> Strip:
@@ -489,3 +584,28 @@ class Strip:
]
)
return self._render_cache
+
+ def crop_pad(self, cell_length: int, left: int, right: int, style: Style) -> Strip:
+ """Crop the strip to `cell_length`, and add optional padding.
+
+ Args:
+ cell_length: Cell length of strip prior to padding.
+ left: Additional padding on the left.
+ right: Additional padding on the right.
+ style: Style of any padding.
+
+ Returns:
+ Cropped and padded strip.
+ """
+ if cell_length != self.cell_length:
+ strip = self.adjust_cell_length(cell_length, style)
+ else:
+ strip = self
+ if not (left or right):
+ return strip
+ segments = strip._segments.copy()
+ if left:
+ segments.insert(0, Segment(" " * left, style))
+ if right:
+ segments.append(Segment(" " * right, style))
+ return Strip(segments, cell_length + left + right)
diff --git a/contrib/python/textual/textual/theme.py b/contrib/python/textual/textual/theme.py
new file mode 100644
index 00000000000..f3ff5045dfc
--- /dev/null
+++ b/contrib/python/textual/textual/theme.py
@@ -0,0 +1,319 @@
+from __future__ import annotations
+
+from dataclasses import dataclass, field
+from functools import partial
+from typing import Callable
+
+from textual.command import DiscoveryHit, Hit, Hits, Provider
+from textual.design import ColorSystem
+
+
+@dataclass
+class Theme:
+ """Defines a theme for the application."""
+
+ name: str
+ """The name of the theme.
+
+ After registering a theme with `App.register_theme`, you can set the theme with
+ `App.theme = theme_name`. This will immediately apply the theme's colors to your
+ application.
+ """
+
+ primary: str
+ secondary: str | None = None
+ warning: str | None = None
+ error: str | None = None
+ success: str | None = None
+ accent: str | None = None
+ foreground: str | None = None
+ background: str | None = None
+ surface: str | None = None
+ panel: str | None = None
+ boost: str | None = None
+ dark: bool = True
+ luminosity_spread: float = 0.15
+ text_alpha: float = 0.95
+ variables: dict[str, str] = field(default_factory=dict)
+
+ def to_color_system(self) -> ColorSystem:
+ """
+ Create a ColorSystem instance from this Theme.
+
+ Returns:
+ A ColorSystem instance with attributes copied from this Theme.
+ """
+ return ColorSystem(
+ primary=self.primary,
+ secondary=self.secondary,
+ warning=self.warning,
+ error=self.error,
+ success=self.success,
+ accent=self.accent,
+ foreground=self.foreground,
+ background=self.background,
+ surface=self.surface,
+ panel=self.panel,
+ boost=self.boost,
+ dark=self.dark,
+ luminosity_spread=self.luminosity_spread,
+ text_alpha=self.text_alpha,
+ variables=self.variables,
+ )
+
+
+BUILTIN_THEMES: dict[str, Theme] = {
+ "textual-dark": Theme(
+ name="textual-dark",
+ primary="#0178D4",
+ secondary="#004578",
+ accent="#ffa62b",
+ warning="#ffa62b",
+ error="#ba3c5b",
+ success="#4EBF71",
+ foreground="#e0e0e0",
+ ),
+ "textual-light": Theme(
+ name="textual-light",
+ primary="#004578",
+ secondary="#0178D4",
+ accent="#ffa62b",
+ warning="#ffa62b",
+ error="#ba3c5b",
+ success="#4EBF71",
+ surface="#D8D8D8",
+ panel="#D0D0D0",
+ background="#E0E0E0",
+ dark=False,
+ variables={
+ "footer-key-foreground": "#0178D4",
+ },
+ ),
+ "nord": Theme(
+ name="nord",
+ primary="#88C0D0",
+ secondary="#81A1C1",
+ accent="#B48EAD",
+ foreground="#D8DEE9",
+ background="#2E3440",
+ success="#A3BE8C",
+ warning="#EBCB8B",
+ error="#BF616A",
+ surface="#3B4252",
+ panel="#434C5E",
+ variables={
+ "block-cursor-background": "#88C0D0",
+ "block-cursor-foreground": "#2E3440",
+ "block-cursor-text-style": "none",
+ "footer-key-foreground": "#88C0D0",
+ "input-selection-background": "#81a1c1 35%",
+ "button-color-foreground": "#2E3440",
+ "button-focus-text-style": "reverse",
+ },
+ ),
+ "gruvbox": Theme(
+ name="gruvbox",
+ primary="#85A598",
+ secondary="#A89A85",
+ warning="#fe8019",
+ error="#fb4934",
+ success="#b8bb26",
+ accent="#fabd2f",
+ foreground="#fbf1c7",
+ background="#282828",
+ surface="#3c3836",
+ panel="#504945",
+ variables={
+ "block-cursor-foreground": "#fbf1c7",
+ "input-selection-background": "#689d6a40",
+ "button-color-foreground": "#282828",
+ },
+ ),
+ "catppuccin-mocha": Theme(
+ name="catppuccin-mocha",
+ primary="#F5C2E7",
+ secondary="#cba6f7",
+ warning="#FAE3B0",
+ error="#F28FAD",
+ success="#ABE9B3",
+ accent="#fab387",
+ foreground="#cdd6f4",
+ background="#181825",
+ surface="#313244",
+ panel="#45475a",
+ variables={
+ "input-cursor-foreground": "#11111b",
+ "input-cursor-background": "#f5e0dc",
+ "input-selection-background": "#9399b2 30%",
+ "border": "#b4befe",
+ "border-blurred": "#585b70",
+ "footer-background": "#45475a",
+ "block-cursor-foreground": "#1e1e2e",
+ "block-cursor-text-style": "none",
+ "button-color-foreground": "#181825",
+ },
+ ),
+ "textual-ansi": Theme(
+ name="textual-ansi",
+ primary="ansi_blue",
+ secondary="ansi_cyan",
+ warning="ansi_yellow",
+ error="ansi_red",
+ success="ansi_green",
+ accent="ansi_bright_blue",
+ foreground="ansi_default",
+ background="ansi_default",
+ surface="ansi_default",
+ panel="ansi_default",
+ boost="ansi_default",
+ dark=False,
+ variables={
+ "block-cursor-text-style": "b",
+ "block-cursor-blurred-text-style": "i",
+ "input-selection-background": "ansi_blue",
+ "input-selection-foreground": "ansi_white",
+ "input-cursor-text-style": "reverse",
+ "scrollbar": "ansi_blue",
+ "border-blurred": "ansi_blue",
+ "border": "ansi_bright_blue",
+ },
+ ),
+ "dracula": Theme(
+ name="dracula",
+ primary="#BD93F9",
+ secondary="#6272A4",
+ warning="#FFB86C",
+ error="#FF5555",
+ success="#50FA7B",
+ accent="#FF79C6",
+ background="#282A36",
+ surface="#2B2E3B",
+ panel="#313442",
+ foreground="#F8F8F2",
+ variables={
+ "button-color-foreground": "#282A36",
+ },
+ ),
+ "tokyo-night": Theme(
+ name="tokyo-night",
+ primary="#BB9AF7",
+ secondary="#7AA2F7",
+ warning="#E0AF68", # Yellow
+ error="#F7768E", # Red
+ success="#9ECE6A", # Green
+ accent="#FF9E64", # Orange
+ foreground="#a9b1d6",
+ background="#1A1B26", # Background
+ surface="#24283B", # Surface
+ panel="#414868", # Panel
+ variables={
+ "button-color-foreground": "#24283B",
+ },
+ ),
+ "monokai": Theme(
+ name="monokai",
+ primary="#AE81FF",
+ secondary="#F92672",
+ accent="#66D9EF",
+ warning="#FD971F",
+ error="#F92672",
+ success="#A6E22E",
+ foreground="#d6d6d6",
+ background="#272822",
+ surface="#2e2e2e",
+ panel="#3E3D32",
+ variables={
+ "foreground-muted": "#797979",
+ "input-selection-background": "#575b6190",
+ "button-color-foreground": "#272822",
+ },
+ ),
+ "flexoki": Theme(
+ name="flexoki",
+ primary="#205EA6", # blue
+ secondary="#24837B", # cyan
+ warning="#AD8301", # yellow
+ error="#AF3029", # red
+ success="#66800B", # green
+ accent="#9B76C8", # purple light
+ background="#100F0F", # base.black
+ surface="#1C1B1A", # base.950
+ panel="#282726", # base.900
+ foreground="#FFFCF0", # base.paper
+ variables={
+ "input-cursor-foreground": "#5E409D",
+ "input-cursor-background": "#FFFCF0",
+ "input-selection-background": "#6F6E69 35%", # base.600 with opacity
+ "button-color-foreground": "#FFFCF0",
+ },
+ ),
+ "catppuccin-latte": Theme(
+ name="catppuccin-latte",
+ secondary="#DC8A78",
+ primary="#8839EF",
+ warning="#DF8E1D",
+ error="#D20F39",
+ success="#40A02B",
+ accent="#FE640B",
+ foreground="#4C4F69",
+ background="#EFF1F5",
+ surface="#E6E9EF",
+ panel="#CCD0DA",
+ dark=False,
+ variables={
+ "button-color-foreground": "#EFF1F5",
+ },
+ ),
+ "solarized-light": Theme(
+ name="solarized-light",
+ primary="#268bd2",
+ secondary="#2aa198",
+ warning="#cb4b16",
+ error="#dc322f",
+ success="#859900",
+ accent="#6c71c4",
+ foreground="#586e75",
+ background="#fdf6e3",
+ surface="#eee8d5",
+ panel="#eee8d5",
+ dark=False,
+ variables={
+ "button-color-foreground": "#fdf6e3",
+ "footer-background": "#268bd2",
+ "footer-key-foreground": "#fdf6e3",
+ "footer-description-foreground": "#fdf6e3",
+ },
+ ),
+}
+
+
+class ThemeProvider(Provider):
+ """A provider for themes."""
+
+ @property
+ def commands(self) -> list[tuple[str, Callable[[], None]]]:
+ themes = self.app.available_themes
+
+ def set_app_theme(name: str) -> None:
+ self.app.theme = name
+
+ return [
+ (theme.name, partial(set_app_theme, theme.name))
+ for theme in themes.values()
+ if theme.name != "textual-ansi"
+ ]
+
+ async def discover(self) -> Hits:
+ for command in self.commands:
+ yield DiscoveryHit(*command)
+
+ async def search(self, query: str) -> Hits:
+ matcher = self.matcher(query)
+
+ for name, callback in self.commands:
+ if (match := matcher.match(name)) > 0:
+ yield Hit(
+ match,
+ matcher.highlight(name),
+ callback,
+ )
diff --git a/contrib/python/textual/textual/timer.py b/contrib/python/textual/textual/timer.py
index 3a26774b8ae..2470453c294 100644
--- a/contrib/python/textual/textual/timer.py
+++ b/contrib/python/textual/textual/timer.py
@@ -177,6 +177,11 @@ class Timer:
async def _tick(self, *, next_timer: float, count: int) -> None:
"""Triggers the Timer's action: either call its callback, or sends an event to its target"""
+
+ app = active_app.get()
+ if app._exit:
+ return
+
if self._callback is not None:
try:
await invoke(self._callback)
@@ -185,7 +190,6 @@ class Timer:
# Re-raise CancelledErrors that would be caught by the following exception block in Python 3.7
raise
except Exception as error:
- app = active_app.get()
app._handle_exception(error)
else:
event = events.Timer(
diff --git a/contrib/python/textual/textual/visual.py b/contrib/python/textual/textual/visual.py
new file mode 100644
index 00000000000..ed21c26fe1c
--- /dev/null
+++ b/contrib/python/textual/textual/visual.py
@@ -0,0 +1,461 @@
+from __future__ import annotations
+
+from abc import ABC, abstractmethod
+from dataclasses import dataclass
+from functools import cached_property, lru_cache
+from itertools import islice
+from marshal import loads
+from typing import TYPE_CHECKING, Any, Iterable, Protocol, cast
+
+import rich.repr
+from rich.console import Console, ConsoleOptions, RenderableType
+from rich.measure import Measurement
+from rich.protocol import is_renderable, rich_cast
+from rich.segment import Segment
+from rich.style import Style as RichStyle
+from rich.text import Text
+
+from textual._context import active_app
+from textual.color import TRANSPARENT, Color
+from textual.css.styles import StylesBase
+from textual.css.types import AlignHorizontal, AlignVertical
+from textual.geometry import Spacing
+from textual.render import measure
+from textual.strip import Strip
+
+if TYPE_CHECKING:
+ from typing_extensions import TypeAlias
+
+ from textual.widget import Widget
+
+_NULL_RICH_STYLE = RichStyle()
+
+
+def is_visual(obj: object) -> bool:
+ """Check if the given object is a Visual or supports the Visual protocol."""
+ return isinstance(obj, Visual) or hasattr(obj, "textualize")
+
+
+# Note: not runtime checkable currently, as I've found that to be slow
+class SupportsVisual(Protocol):
+ """An object that supports the textualize protocol."""
+
+ def visualize(self, widget: Widget, obj: object) -> Visual | None:
+ """Convert the result of a Widget.render() call in to a Visual, using the Visual protocol.
+
+ Args:
+ widget: The widget that generated the render.
+ obj: The result of the the render.
+
+ Returns:
+ A Visual instance, or `None` if it wasn't possible.
+
+ """
+
+
+class VisualError(Exception):
+ """An error with the visual protocol."""
+
+
+VisualType: TypeAlias = "RenderableType | SupportsVisual | Visual"
+
+
+def visualize(widget: Widget, obj: object) -> Visual:
+ """Get a visual instance from an object.
+
+ If the object does not support the Visual protocol and is a Rich renderable, it
+ will be wrapped in a [RichVisual][textual.visual.RichVisual].
+
+ Args:
+ obj: An object.
+
+ Returns:
+ A Visual instance to render the object, or `None` if there is no associated visual.
+ """
+ if isinstance(obj, Visual):
+ # Already a visual
+ return obj
+ # The visualize method should return a Visual if present.
+ visualize = getattr(obj, "visualize", None)
+ if visualize is None:
+ # Doesn't expose the textualize protocol
+ if is_renderable(obj):
+ # If it is a string, render it to Text
+ if isinstance(obj, str):
+ obj = widget.render_str(obj)
+
+ # If its is a Rich renderable, wrap it with a RichVisual
+ return RichVisual(widget, rich_cast(obj))
+ else:
+ # We don't know how to make a visual from this object
+ raise VisualError(
+ f"unable to display {obj.__class__.__name__!r} type; must be a str, Rich renderable, or Textual Visual object"
+ )
+ # Call the textualize method to create a visual
+ visual = visualize()
+ if not isinstance(visual, Visual) and is_renderable(visual):
+ return RichVisual(widget, visual)
+ return visual
+
+
+@dataclass(frozen=True)
+class Style:
+ """Represents a style in the Visual interface (color and other attributes)."""
+
+ background: Color = TRANSPARENT
+ foreground: Color = TRANSPARENT
+ bold: bool | None = None
+ dim: bool | None = None
+ italic: bool | None = None
+ underline: bool | None = None
+ strike: bool | None = None
+ link: str | None = None
+ _meta: bytes | None = None
+ auto_color: bool = False
+
+ def __rich_repr__(self) -> rich.repr.Result:
+ yield None, self.background
+ yield None, self.foreground
+ yield "bold", self.bold, None
+ yield "dim", self.dim, None
+ yield "italic", self.italic, None
+ yield "underline", self.underline, None
+ yield "strike", self.strike, None
+
+ @lru_cache(maxsize=1024)
+ def __add__(self, other: object) -> Style:
+ if not isinstance(other, Style):
+ return NotImplemented
+ new_style = Style(
+ self.background + other.background,
+ self.foreground if other.foreground.is_transparent else other.foreground,
+ self.bold if other.bold is None else other.bold,
+ self.dim if other.dim is None else other.dim,
+ self.italic if other.italic is None else other.italic,
+ self.underline if other.underline is None else other.underline,
+ self.strike if other.strike is None else other.strike,
+ self.link if other.link is None else other.link,
+ self._meta if other._meta is None else other._meta,
+ )
+ return new_style
+
+ @classmethod
+ def from_rich_style(cls, rich_style: RichStyle) -> Style:
+ """Build a Style from a (Rich) Style.
+
+ Args:
+ rich_style: A Rich Style object.
+
+ Returns:
+ New Style.
+ """
+ return Style(
+ Color.from_rich_color(rich_style.bgcolor),
+ Color.from_rich_color(rich_style.color),
+ bold=rich_style.bold,
+ dim=rich_style.dim,
+ italic=rich_style.italic,
+ underline=rich_style.underline,
+ strike=rich_style.strike,
+ )
+
+ @classmethod
+ def from_styles(cls, styles: StylesBase) -> Style:
+ """Create a Visual Style from a Textual styles object.
+
+ Args:
+ styles: A Styles object, such as `my_widget.styles`.
+
+ """
+ text_style = styles.text_style
+ return Style(
+ styles.background,
+ (
+ Color(0, 0, 0, styles.color.a, auto=True)
+ if styles.auto_color
+ else styles.color
+ ),
+ bold=text_style.bold,
+ dim=text_style.italic,
+ italic=text_style.italic,
+ underline=text_style.underline,
+ strike=text_style.strike,
+ auto_color=styles.auto_color,
+ )
+
+ @cached_property
+ def rich_style(self) -> RichStyle:
+ """Convert this Styles in to a Rich style.
+
+ Returns:
+ A Rich style object.
+ """
+ return RichStyle(
+ color=(self.background + self.foreground).rich_color,
+ bgcolor=self.background.rich_color,
+ bold=self.bold,
+ dim=self.dim,
+ italic=self.italic,
+ underline=self.underline,
+ strike=self.strike,
+ link=self.link,
+ meta=self.meta,
+ )
+
+ @cached_property
+ def without_color(self) -> Style:
+ return Style(
+ bold=self.bold,
+ dim=self.dim,
+ italic=self.italic,
+ strike=self.strike,
+ link=self.link,
+ _meta=self._meta,
+ )
+
+ @classmethod
+ def combine(cls, styles: Iterable[Style]) -> Style:
+ """Add a number of styles and get the result."""
+ iter_styles = iter(styles)
+ return sum(iter_styles, next(iter_styles))
+
+ @property
+ def meta(self) -> dict[str, Any]:
+ """Get meta information (can not be changed after construction)."""
+ return {} if self._meta is None else cast(dict[str, Any], loads(self._meta))
+
+
+class Visual(ABC):
+ """A Textual 'visual' object.
+
+ Analogous to a Rich renderable, but with support for transparency.
+
+ """
+
+ @abstractmethod
+ def render_strips(
+ self, widget: Widget, width: int, height: int | None, style: Style
+ ) -> list[Strip]:
+ """Render the visual in to an iterable of strips.
+
+ Args:
+ base_style: The base style.
+ width: Width of desired render.
+ height: Height of desired render or `None` for any height.
+ style: A Visual Style.
+
+ Returns:
+ An list of Strips.
+ """
+
+ @abstractmethod
+ def get_optimal_width(self, container_width: int) -> int:
+ """Get ideal width of the renderable to display its content.
+
+ Args:
+ container_size: The size of the container.
+
+ Returns:
+ A width in cells.
+
+ """
+
+ @abstractmethod
+ def get_height(self, width: int) -> int:
+ """Get the height of the visual if rendered with the given width.
+
+ Returns:
+ A height in lines.
+ """
+
+ @classmethod
+ def to_strips(
+ cls,
+ widget: Widget,
+ visual: Visual,
+ width: int,
+ height: int | None,
+ style: Style,
+ *,
+ pad: bool = False,
+ align: tuple[AlignHorizontal, AlignVertical] = ("left", "top"),
+ ) -> list[Strip]:
+ """High level function to render a visual to strips.
+
+ Args:
+ widget: Widget that produced the visual.
+ visual: A Visual instance.
+ width: Desired width (in cells).
+ height: Desired height (in lines) or `None` for no limit.
+ style: A (Visual) Style instance.
+ pad: Pad to desired width?
+ align: Tuple of horizontal and vertical alignment.
+
+ Returns:
+ A list of Strips containing the render.
+ """
+ strips = visual.render_strips(widget, width, height, style)
+ if height is None:
+ height = len(strips)
+ rich_style = style.rich_style
+ if pad:
+ strips = [strip.extend_cell_length(width, rich_style) for strip in strips]
+ if align != ("left", "top"):
+ align_horizontal, align_vertical = align
+ strips = list(
+ Strip.align(
+ strips,
+ rich_style,
+ width,
+ height,
+ align_horizontal,
+ align_vertical,
+ )
+ )
+
+ return strips
+
+
+class RichVisual(Visual):
+ """A Visual to wrap a Rich renderable."""
+
+ def __init__(self, widget: Widget, renderable: RenderableType) -> None:
+ """
+
+ Args:
+ widget: The associated Widget.
+ renderable: A Rich renderable.
+ """
+ self._widget = widget
+ self._renderable = renderable
+ self._measurement: Measurement | None = None
+
+ def __rich_repr__(self) -> rich.repr.Result:
+ yield self._widget
+ yield self._renderable
+
+ def _measure(self, console: Console, options: ConsoleOptions) -> Measurement:
+ if self._measurement is None:
+ self._measurement = Measurement.get(
+ console,
+ options,
+ self._widget.post_render(self._renderable, RichStyle.null()),
+ )
+ return self._measurement
+
+ def get_optimal_width(self, container_width: int) -> int:
+ console = active_app.get().console
+ width = measure(
+ console, self._renderable, container_width, container_width=container_width
+ )
+
+ return width
+
+ def get_height(self, width: int) -> int:
+ console = active_app.get().console
+ renderable = self._renderable
+ if isinstance(renderable, Text):
+ height = len(
+ Text(renderable.plain).wrap(
+ console,
+ width,
+ no_wrap=renderable.no_wrap,
+ tab_size=renderable.tab_size or 8,
+ )
+ )
+ else:
+ options = console.options.update_width(width).update(highlight=False)
+ segments = console.render(renderable, options)
+ # Cheaper than counting the lines returned from render_lines!
+ height = sum([text.count("\n") for text, _, _ in segments])
+
+ return height
+
+ def render_strips(
+ self,
+ widget: Widget,
+ width: int,
+ height: int | None,
+ style: Style,
+ ) -> list[Strip]:
+ console = active_app.get().console
+ options = console.options.update(
+ highlight=False,
+ width=width,
+ height=height,
+ )
+ rich_style = style.rich_style
+ renderable = widget.post_render(self._renderable, rich_style)
+ segments = console.render(renderable, options.update_width(width))
+ strips = [
+ Strip(line)
+ for line in islice(
+ Segment.split_and_crop_lines(
+ segments, width, include_new_lines=False, pad=False
+ ),
+ None,
+ height,
+ )
+ ]
+ return strips
+
+
+class Padding(Visual):
+ """A Visual to pad another visual."""
+
+ def __init__(self, visual: Visual, spacing: Spacing):
+ """
+
+ Args:
+ Visual: A Visual.
+ spacing: A Spacing object containing desired padding dimensions.
+ """
+ self._visual = visual
+ self._spacing = spacing
+
+ def __rich_repr__(self) -> rich.repr.Result:
+ yield self._visual
+ yield self._spacing
+
+ def get_optimal_width(self, container_width: int) -> int:
+ return self._visual.get_optimal_width(container_width) + self._spacing.width
+
+ def get_height(self, width: int) -> int:
+ return self._visual.get_height(width) + self._spacing.height
+
+ def render_strips(
+ self,
+ widget: Widget,
+ width: int,
+ height: int | None,
+ style: Style,
+ ) -> list[Strip]:
+ padding = self._spacing
+ top, right, bottom, left = self._spacing
+ render_width = width - (left + right)
+ if render_width <= 0:
+ return []
+ strips = self._visual.render_strips(
+ widget,
+ render_width,
+ None if height is None else height - padding.height,
+ style,
+ )
+
+ if padding:
+ rich_style = style.rich_style
+ top_padding = [Strip.blank(width, rich_style)] * top if top else []
+ bottom_padding = [Strip.blank(width, rich_style)] * bottom if bottom else []
+ strips = [
+ *top_padding,
+ *[
+ strip.crop_pad(render_width, left, right, rich_style)
+ for strip in strips
+ ],
+ *bottom_padding,
+ ]
+
+ return strips
diff --git a/contrib/python/textual/textual/widget.py b/contrib/python/textual/textual/widget.py
index 7c71bb885cd..827288b0422 100644
--- a/contrib/python/textual/textual/widget.py
+++ b/contrib/python/textual/textual/widget.py
@@ -9,7 +9,7 @@ from asyncio import create_task, gather, wait
from collections import Counter
from contextlib import asynccontextmanager
from fractions import Fraction
-from itertools import islice
+from time import monotonic
from types import TracebackType
from typing import (
TYPE_CHECKING,
@@ -35,13 +35,14 @@ from rich.console import (
RenderableType,
)
from rich.console import RenderResult as RichRenderResult
-from rich.console import RichCast
from rich.measure import Measurement
from rich.segment import Segment
from rich.style import Style
from rich.text import Text
from typing_extensions import Self
+from textual.css.styles import StylesBase
+
if TYPE_CHECKING:
from textual.app import RenderResult
@@ -53,7 +54,6 @@ from textual._context import NoActiveAppError
from textual._debug import get_caller_file_and_line
from textual._dispatch_key import dispatch_key
from textual._easing import DEFAULT_SCROLL_EASING
-from textual._segment_tools import align_lines
from textual._styles_cache import StylesCache
from textual._types import AnimationLevel
from textual.actions import SkipAction
@@ -82,10 +82,11 @@ from textual.message import Message
from textual.messages import CallbackType, Prune
from textual.notifications import SeverityLevel
from textual.reactive import Reactive
-from textual.render import measure
from textual.renderables.blank import Blank
from textual.rlock import RLock
from textual.strip import Strip
+from textual.visual import Style as VisualStyle
+from textual.visual import Visual, visualize
if TYPE_CHECKING:
from textual.app import App, ComposeResult
@@ -277,21 +278,21 @@ class Widget(DOMNode):
DEFAULT_CSS = """
Widget{
- scrollbar-background: $panel-darken-1;
- scrollbar-background-hover: $panel-darken-2;
- scrollbar-background-active: $panel-darken-3;
- scrollbar-color: $primary-lighten-1;
- scrollbar-color-active: $warning-darken-1;
- scrollbar-color-hover: $primary-lighten-1;
- scrollbar-corner-color: $panel-darken-1;
+ scrollbar-background: $scrollbar-background;
+ scrollbar-background-hover: $scrollbar-background-hover;
+ scrollbar-background-active: $scrollbar-background-active;
+ scrollbar-color: $scrollbar;
+ scrollbar-color-active: $scrollbar-active;
+ scrollbar-color-hover: $scrollbar-hover;
+ scrollbar-corner-color: $scrollbar-corner-color;
scrollbar-size-vertical: 2;
scrollbar-size-horizontal: 1;
- link-background: initial;
- link-color: $text;
- link-style: underline;
- link-background-hover: $accent;
- link-color-hover: $text;
- link-style-hover: bold not underline;
+ link-background: $link-background;
+ link-color: $link-color;
+ link-style: $link-style;
+ link-background-hover: $link-background-hover;
+ link-color-hover: $link-color-hover;
+ link-style-hover: $link-style-hover;
background: transparent;
}
"""
@@ -374,8 +375,8 @@ class Widget(DOMNode):
"can-focus": lambda widget: widget.can_focus,
"disabled": lambda widget: widget.is_disabled,
"enabled": lambda widget: not widget.is_disabled,
- "dark": lambda widget: widget.app.dark,
- "light": lambda widget: not widget.app.dark,
+ "dark": lambda widget: widget.app.current_theme.dark,
+ "light": lambda widget: not widget.app.current_theme.dark,
"focus-within": lambda widget: widget.has_focus_within,
"inline": lambda widget: widget.app.is_inline,
"ansi": lambda widget: widget.app.ansi_color,
@@ -423,6 +424,9 @@ class Widget(DOMNode):
self._border_title: Text | None = None
self._border_subtitle: Text | None = None
+ self._layout_cache: dict[str, object] = {}
+ """A dict that is refreshed when the widget is resized / refreshed."""
+
self._render_cache = _RenderCache(_null_size, [])
# Regions which need to be updated (in Widget)
self._dirty_regions: set[Region] = set()
@@ -433,9 +437,9 @@ class Widget(DOMNode):
self._content_width_cache: tuple[object, int] = (None, 0)
self._content_height_cache: tuple[object, int] = (None, 0)
- self._arrangement_cache: FIFOCache[tuple[Size, int], DockArrangeResult] = (
- FIFOCache(4)
- )
+ self._arrangement_cache: FIFOCache[
+ tuple[Size, int, Widget], DockArrangeResult
+ ] = FIFOCache(4)
self._styles_cache = StylesCache()
self._rich_style_cache: dict[tuple[str, ...], tuple[Style, Style]] = {}
@@ -447,7 +451,6 @@ class Widget(DOMNode):
self._scrollbar_changes: set[tuple[bool, bool]] = set()
"""Used to stabilize scrollbars."""
-
super().__init__(
name=name,
id=id,
@@ -489,6 +492,8 @@ class Widget(DOMNode):
"""Used to cache :last-of-type pseudoclass state."""
self._odd: tuple[int, bool] = (-1, False)
"""Used to cache :odd pseudoclass state."""
+ self._last_scroll_time = monotonic()
+ """Time of last scroll."""
@property
def is_mounted(self) -> bool:
@@ -615,6 +620,17 @@ class Widget(DOMNode):
return False
@property
+ def is_in_maximized_view(self) -> bool:
+ """Is this widget, or a parent maximized?"""
+ maximized = self.screen.maximized
+ if not maximized:
+ return False
+ for node in self.ancestors_with_self:
+ if maximized is node:
+ return True
+ return False
+
+ @property
def _render_widget(self) -> Widget:
"""The widget the compositor should render."""
# Will return the "cover widget" if one is set, otherwise self.
@@ -1015,6 +1031,59 @@ class Widget(DOMNode):
return partial_style if partial else style
+ def get_visual_style(self, component_classes: Iterable[str]) -> VisualStyle:
+ """Get the visual style for the widget, including any component styles.
+
+ Args:
+ component_classes: Optional component styles.
+
+ Returns:
+ A Visual style instance.
+
+ """
+ background = Color(0, 0, 0, 0)
+ color = Color(255, 255, 255, 0)
+
+ style = Style()
+ opacity = 1.0
+
+ def iter_styles() -> Iterable[StylesBase]:
+ """Iterate over the styles from the DOM and additional components styles."""
+ for node in reversed(self.ancestors_with_self):
+ yield node.styles
+ for name in component_classes:
+ yield node.get_component_styles(name)
+
+ for styles in iter_styles():
+ has_rule = styles.has_rule
+ opacity *= styles.opacity
+ if has_rule("background"):
+ text_background = background + styles.background.tint(
+ styles.background_tint
+ )
+ background += (
+ styles.background.tint(styles.background_tint)
+ ).multiply_alpha(opacity)
+ else:
+ text_background = background
+ if has_rule("color"):
+ color = styles.color
+ style += styles.text_style
+ if has_rule("auto_color") and styles.auto_color:
+ color = text_background.get_contrast_text(color.a)
+
+ visual_style = VisualStyle(
+ background,
+ color,
+ bold=style.bold,
+ dim=style.dim,
+ italic=style.italic,
+ underline=style.underline,
+ strike=style.strike,
+ )
+
+ return visual_style
+
def render_str(self, text_content: str | Text) -> Text:
"""Convert str in to a Text object.
@@ -1184,11 +1253,18 @@ class Widget(DOMNode):
parent, *widgets, before=insert_before, after=insert_after
)
- def update_styles(children: Iterable[DOMNode]) -> None:
+ def update_styles(children: list[DOMNode]) -> None:
"""Update order related CSS"""
- for child in children:
- if child._has_order_style:
- child._update_styles()
+ if before is not None or after is not None:
+ # If the new children aren't at the end.
+ # we need to update both odd/even and first-of-type/last-of-type
+ for child in children:
+ if child._has_order_style or child._has_odd_or_even:
+ child._update_styles()
+ else:
+ for child in children:
+ if child._has_order_style:
+ child._update_styles()
self.call_later(update_styles, list(self.children))
await_mount = AwaitMount(self, mounted)
@@ -1533,12 +1609,9 @@ class Widget(DOMNode):
if self._content_width_cache[0] == cache_key:
return self._content_width_cache[1]
- console = self.app.console
- renderable = self._render()
+ visual = self._render()
+ width = visual.get_optimal_width(container.width)
- width = measure(
- console, renderable, container.width, container_width=container.width
- )
if self.expand:
width = max(container.width, width)
if self.shrink:
@@ -1559,6 +1632,8 @@ class Widget(DOMNode):
Returns:
The height of the content.
"""
+ if not width:
+ return 0
if self.is_container:
assert self.layout is not None
height = self.layout.get_content_height(
@@ -1573,27 +1648,8 @@ class Widget(DOMNode):
if self._content_height_cache[0] == cache_key:
return self._content_height_cache[1]
- renderable = self.render()
- if isinstance(renderable, Text):
- height = (
- len(
- renderable.wrap(
- self._console,
- width,
- no_wrap=renderable.no_wrap,
- tab_size=renderable.tab_size or 8,
- )
- )
- if renderable
- else 0
- )
- else:
- options = self._console.options.update_width(width).update(
- highlight=False
- )
- segments = self._console.render(renderable, options)
- # Cheaper than counting the lines returned from render_lines!
- height = sum([text.count("\n") for text, _, _ in segments])
+ visual = self._render()
+ height = visual.get_height(width)
self._content_height_cache = (cache_key, height)
return height
@@ -2163,6 +2219,23 @@ class Widget(DOMNode):
return self.styles.layout is not None or bool(self._nodes)
@property
+ def is_scrolling(self) -> bool:
+ """Is this widget currently scrolling?"""
+ current_time = monotonic()
+ for node in self.ancestors:
+ if not isinstance(node, Widget):
+ break
+ if (
+ node.scroll_x != node.scroll_target_x
+ or node.scroll_y != node.scroll_target_y
+ ):
+ return True
+ if current_time - node._last_scroll_time < 0.1:
+ # Scroll ended very recently
+ return True
+ return False
+
+ @property
def layer(self) -> str:
"""Get the name of this widgets layer.
@@ -2301,6 +2374,12 @@ class Widget(DOMNode):
animator.force_stop_animation(self, "scroll_x")
animator.force_stop_animation(self, "scroll_y")
+ def _animate_on_complete() -> None:
+ """set last scroll time, and invoke callback."""
+ self._last_scroll_time = monotonic()
+ if on_complete is not None:
+ self.call_next(on_complete)
+
if animate:
# TODO: configure animation speed
if duration is None and speed is None:
@@ -2319,7 +2398,7 @@ class Widget(DOMNode):
speed=speed,
duration=duration,
easing=easing,
- on_complete=on_complete,
+ on_complete=_animate_on_complete,
level=level,
)
scrolled_x = True
@@ -2333,7 +2412,7 @@ class Widget(DOMNode):
speed=speed,
duration=duration,
easing=easing,
- on_complete=on_complete,
+ on_complete=_animate_on_complete,
level=level,
)
scrolled_y = True
@@ -2350,12 +2429,10 @@ class Widget(DOMNode):
self.scroll_target_y = self.scroll_y = y
scrolled_y = scroll_y != self.scroll_y
+ self._last_scroll_time = monotonic()
if on_complete is not None:
self.call_after_refresh(on_complete)
- if scrolled_x or scrolled_y:
- self.app._pause_hover_effects()
-
return scrolled_x or scrolled_y
def pre_layout(self, layout: Layout) -> None:
@@ -2836,6 +2913,7 @@ class Widget(DOMNode):
force=force,
on_complete=on_complete,
level=level,
+ immediate=immediate,
)
def _scroll_up_for_pointer(
@@ -3241,9 +3319,9 @@ class Widget(DOMNode):
immediate=immediate,
)
else:
- # self.region is falsey which may indicate the widget hasn't been through a layout operation
+ # self.region is falsy which may indicate the widget hasn't been through a layout operation
# We can potentially make it do the right thing by postponing the scroll to after a refresh
- self.call_after_refresh(
+ parent.call_after_refresh(
self.screen.scroll_to_widget,
self,
animate=animate,
@@ -3519,15 +3597,18 @@ class Widget(DOMNode):
self.is_disabled,
)
- def _get_rich_justify(self) -> JustifyMethod | None:
+ def _get_justify_method(self) -> JustifyMethod | None:
"""Get the justify method that may be passed to a Rich renderable."""
text_justify: JustifyMethod | None = None
+
if self.styles.has_rule("text_align"):
text_align: JustifyMethod = cast(JustifyMethod, self.styles.text_align)
text_justify = _JUSTIFY_MAP.get(text_align, text_align)
return text_justify
- def post_render(self, renderable: RenderableType) -> ConsoleRenderable:
+ def post_render(
+ self, renderable: RenderableType, base_style: Style
+ ) -> ConsoleRenderable:
"""Applies style attributes to the default renderable.
This method is called by Textual itself.
@@ -3537,7 +3618,7 @@ class Widget(DOMNode):
A new renderable.
"""
- text_justify = self._get_rich_justify()
+ text_justify = self._get_justify_method()
if isinstance(renderable, str):
renderable = Text.from_markup(renderable, justify=text_justify)
@@ -3552,7 +3633,7 @@ class Widget(DOMNode):
renderable = _Styled(
cast(ConsoleRenderable, renderable),
- self.rich_style,
+ base_style,
self.link_style if self.auto_links else None,
)
@@ -3601,7 +3682,7 @@ class Widget(DOMNode):
Returns:
True if anything changed, or False if nothing changed.
"""
-
+ self._layout_cache.clear()
if (
self._size != size
or self.virtual_size != virtual_size
@@ -3646,38 +3727,55 @@ class Widget(DOMNode):
self.scroll_x = self.validate_scroll_x(self.scroll_x)
self.scroll_y = self.validate_scroll_y(self.scroll_y)
- def _render_content(self) -> None:
- """Render all lines."""
- width, height = self.size
- renderable = self.render()
- renderable = self.post_render(renderable)
- options = self._console.options.update(
- highlight=False, width=width, height=height
- )
+ @property
+ def visual_style(self) -> VisualStyle:
+ background = Color(0, 0, 0, 0)
+ color = Color(255, 255, 255, 0)
- segments = self._console.render(renderable, options)
- lines = list(
- islice(
- Segment.split_and_crop_lines(
- segments, width, include_new_lines=False, pad=False
- ),
- None,
- height,
- )
+ style = Style()
+ opacity = 1.0
+
+ for node in reversed(self.ancestors_with_self):
+ styles = node.styles
+ has_rule = styles.has_rule
+ opacity *= styles.opacity
+ if has_rule("background"):
+ text_background = background + styles.background.tint(
+ styles.background_tint
+ )
+ background += (
+ styles.background.tint(styles.background_tint)
+ ).multiply_alpha(opacity)
+ else:
+ text_background = background
+ if has_rule("color"):
+ color = styles.color
+ style += styles.text_style
+ if has_rule("auto_color") and styles.auto_color:
+ color = text_background.get_contrast_text(color.a)
+
+ return VisualStyle(
+ background,
+ color,
+ bold=style.bold,
+ dim=style.dim,
+ italic=style.italic,
+ underline=style.underline,
+ strike=style.strike,
)
- styles = self.styles
- align_horizontal, align_vertical = styles.content_align
- lines = list(
- align_lines(
- lines,
- _NULL_STYLE,
- self.size,
- align_horizontal,
- align_vertical,
- )
+ def _render_content(self) -> None:
+ """Render all lines."""
+ width, height = self.size
+ visual = self._render()
+ strips = Visual.to_strips(
+ self,
+ visual,
+ width,
+ height,
+ self.visual_style,
+ align=self.styles.content_align,
)
- strips = [Strip(line, width) for line in lines]
self._render_cache = _RenderCache(self.size, strips)
self._dirty_regions.clear()
@@ -3775,7 +3873,7 @@ class Widget(DOMNode):
Returns:
The `Widget` instance.
"""
-
+ self._layout_cache.clear()
if layout:
self._layout_required = True
for ancestor in self.ancestors:
@@ -3884,16 +3982,20 @@ class Widget(DOMNode):
return Blank(self.background_colors[1])
return self.css_identifier_styled
- def _render(self) -> ConsoleRenderable | RichCast:
+ def _render(self) -> Visual:
"""Get renderable, promoting str to text as required.
Returns:
- A renderable.
+ A Visual.
"""
- renderable = self.render()
- if isinstance(renderable, str):
- return Text.from_markup(renderable)
- return renderable
+ cache_key = "_render.visual"
+ cached_visual = self._layout_cache.get(cache_key, None)
+ if cached_visual is not None:
+ assert isinstance(cached_visual, Visual)
+ return cached_visual
+ visual = visualize(self, self.render())
+ self._layout_cache[cache_key] = visual
+ return visual
async def run_action(self, action: str) -> None:
"""Perform a given action, with this widget as the default namespace.
diff --git a/contrib/python/textual/textual/widgets/_button.py b/contrib/python/textual/textual/widgets/_button.py
index 67123d8d592..20b45722071 100644
--- a/contrib/python/textual/textual/widgets/_button.py
+++ b/contrib/python/textual/textual/widgets/_button.py
@@ -14,6 +14,8 @@ from textual import events
if TYPE_CHECKING:
from textual.app import RenderResult
+from rich.style import Style
+
from textual.binding import Binding
from textual.css._error_tools import friendly_list
from textual.geometry import Size
@@ -48,40 +50,42 @@ class Button(Widget, can_focus=True):
width: auto;
min-width: 16;
height: auto;
- background: $panel;
- color: $text;
+ color: $button-foreground;
+ background: $surface;
border: none;
- border-top: tall $panel-lighten-2;
- border-bottom: tall $panel-darken-3;
+ border-top: tall $surface-lighten-1;
+ border-bottom: tall $surface-darken-1;
text-align: center;
content-align: center middle;
text-style: bold;
-
+ &:disabled {
+ text-opacity: 0.6;
+ }
+
&:focus {
- text-style: bold reverse;
+ text-style: $button-focus-text-style;
+ background-tint: $foreground 5%;
}
&:hover {
- border-top: tall $panel;
- background: $panel-darken-2;
- color: $text;
+ border-top: tall $surface;
+ background: $surface-darken-1;
}
&.-active {
- background: $panel;
- border-bottom: tall $panel-lighten-2;
- border-top: tall $panel-darken-2;
+ background: $surface;
+ border-bottom: tall $surface-lighten-1;
+ border-top: tall $surface-darken-1;
tint: $background 30%;
}
&.-primary {
+ color: $button-color-foreground;
background: $primary;
- color: $text;
border-top: tall $primary-lighten-3;
border-bottom: tall $primary-darken-3;
&:hover {
background: $primary-darken-2;
- color: $text;
border-top: tall $primary;
}
@@ -93,14 +97,13 @@ class Button(Widget, can_focus=True):
}
&.-success {
+ color: $button-color-foreground;
background: $success;
- color: $text;
border-top: tall $success-lighten-2;
border-bottom: tall $success-darken-3;
&:hover {
background: $success-darken-2;
- color: $text;
border-top: tall $success;
}
@@ -112,14 +115,13 @@ class Button(Widget, can_focus=True):
}
&.-warning{
+ color: $button-color-foreground;
background: $warning;
- color: $text;
border-top: tall $warning-lighten-2;
border-bottom: tall $warning-darken-3;
&:hover {
background: $warning-darken-2;
- color: $text;
border-top: tall $warning;
}
@@ -131,14 +133,13 @@ class Button(Widget, can_focus=True):
}
&.-error {
+ color: $button-color-foreground;
background: $error;
- color: $text;
border-top: tall $error-lighten-2;
border-bottom: tall $error-darken-3;
&:hover {
background: $error-darken-1;
- color: $text;
border-top: tall $error;
}
@@ -254,10 +255,12 @@ class Button(Widget, can_focus=True):
1,
1,
self.rich_style,
- self._get_rich_justify() or "center",
+ self._get_justify_method() or "center",
)
- def post_render(self, renderable: RenderableType) -> ConsoleRenderable:
+ def post_render(
+ self, renderable: RenderableType, base_style: Style
+ ) -> ConsoleRenderable:
return cast(ConsoleRenderable, renderable)
async def _on_click(self, event: events.Click) -> None:
diff --git a/contrib/python/textual/textual/widgets/_collapsible.py b/contrib/python/textual/textual/widgets/_collapsible.py
index 55b181e528e..24c1f34eb5a 100644
--- a/contrib/python/textual/textual/widgets/_collapsible.py
+++ b/contrib/python/textual/textual/widgets/_collapsible.py
@@ -21,16 +21,18 @@ class CollapsibleTitle(Static, can_focus=True):
width: auto;
height: auto;
padding: 0 1 0 1;
- }
-
- CollapsibleTitle:hover {
- background: $foreground 10%;
- color: $text;
- }
+ text-style: $block-cursor-blurred-text-style;
+ color: $block-cursor-blurred-foreground;
- CollapsibleTitle:focus {
- background: $accent;
- color: $text;
+ &:hover {
+ background: $block-hover-background;
+ color: $foreground;
+ }
+ &:focus {
+ text-style: $block-cursor-text-style;
+ background: $block-cursor-background;
+ color: $block-cursor-foreground;
+ }
}
"""
@@ -100,14 +102,18 @@ class Collapsible(Widget):
Collapsible {
width: 1fr;
height: auto;
- background: $boost;
+ background: $surface;
border-top: hkey $background;
padding-bottom: 1;
padding-left: 1;
- }
- Collapsible.-collapsed > Contents {
- display: none;
+ &:focus-within {
+ background-tint: $foreground 5%;
+ }
+
+ &.-collapsed > Contents {
+ display: none;
+ }
}
"""
diff --git a/contrib/python/textual/textual/widgets/_data_table.py b/contrib/python/textual/textual/widgets/_data_table.py
index 5d9da649cab..3c21363f444 100644
--- a/contrib/python/textual/textual/widgets/_data_table.py
+++ b/contrib/python/textual/textual/widgets/_data_table.py
@@ -314,58 +314,87 @@ class DataTable(ScrollView, Generic[CellType], can_focus=True):
"""
DEFAULT_CSS = """
- DataTable:dark {
- background: initial;
- }
DataTable {
- background: $surface ;
- color: $text;
+ background: $surface;
+ color: $foreground;
height: auto;
max-height: 100%;
- }
- DataTable > .datatable--header {
- text-style: bold;
- background: $primary;
- color: $text;
- }
- DataTable > .datatable--fixed {
- background: $primary 50%;
- color: $text;
- }
+
+ &.datatable--fixed-cursor {
+ background: $block-cursor-blurred-background;
+ }
- DataTable > .datatable--odd-row {
+ &:focus {
+ background-tint: $foreground 5%;
+ & > .datatable--cursor {
+ background: $block-cursor-background;
+ color: $block-cursor-foreground;
+ text-style: $block-cursor-text-style;
+ }
- }
+ & > .datatable--header {
+ background-tint: $foreground 5%;
+ }
- DataTable > .datatable--even-row {
- background: $primary 10%;
- }
+ & > .datatable--fixed-cursor {
+ color: $block-cursor-foreground;
+ background: $block-cursor-background;
+ }
+ }
- DataTable > .datatable--cursor {
- background: $secondary;
- color: $text;
- }
+ &:dark {
+ background: $surface;
+ & > .datatable--even-row {
+ background: $surface-darken-1 40%;
+ }
+ }
- DataTable > .datatable--fixed-cursor {
- background: $secondary 92%;
- color: $text;
- }
+ & > .datatable--header {
+ text-style: bold;
+ background: $panel;
+ color: $foreground;
+ }
+ &:ansi > .datatable--header {
+ background: ansi_bright_blue;
+ color: ansi_default;
+ }
- DataTable > .datatable--header-cursor {
- background: $secondary-darken-1;
- color: $text;
- }
+ & > .datatable--fixed {
+ background: $secondary-muted;
+ color: $foreground;
+ }
- DataTable > .datatable--header-hover {
- background: $secondary 30%;
- }
+ & > .datatable--odd-row {
- DataTable:dark > .datatable--even-row {
- background: $primary 15%;
- }
+ }
+
+ & > .datatable--even-row {
+ background: $surface-lighten-1 50%;
+ }
+
+ & > .datatable--cursor {
+ background: $block-cursor-blurred-background;
+ color: $block-cursor-blurred-foreground;
+ text-style: $block-cursor-blurred-text-style;
+ }
- DataTable > .datatable--hover {
- background: $secondary 20%;
+ & > .datatable--fixed-cursor {
+ background: $block-cursor-blurred-background;
+ color: $foreground;
+ }
+
+ & > .datatable--header-cursor {
+ background: $accent-darken-1;
+ color: $foreground;
+ }
+
+ & > .datatable--header-hover {
+ background: $accent 30%;
+ }
+
+ & > .datatable--hover {
+ background: $block-hover-background;
+ }
}
"""
diff --git a/contrib/python/textual/textual/widgets/_footer.py b/contrib/python/textual/textual/widgets/_footer.py
index 9e53b1a1f76..142a7512806 100644
--- a/contrib/python/textual/textual/widgets/_footer.py
+++ b/contrib/python/textual/textual/widgets/_footer.py
@@ -27,37 +27,30 @@ class FooterKey(Widget):
FooterKey {
width: auto;
height: 1;
- background: $panel;
- color: $text-muted;
+ background: $footer-item-background;
.footer-key--key {
- color: $secondary;
- background: $panel;
+ color: $footer-key-foreground;
+ background: $footer-key-background;
text-style: bold;
padding: 0 1;
}
.footer-key--description {
padding: 0 1 0 0;
- }
-
- &:light .footer-key--key {
- color: $primary;
+ color: $footer-description-foreground;
+ background: $footer-description-background;
}
&:hover {
- background: $panel-darken-2;
- color: $text;
- .footer-key--key {
- background: $panel-darken-2;
- }
+ color: $footer-key-foreground;
+ background: $block-hover-background;
}
&.-disabled {
text-style: dim;
- background: $panel;
&:hover {
.footer-key--key {
- background: $panel;
+ background: $foreground-disabled;
}
}
}
@@ -136,8 +129,8 @@ class Footer(ScrollableContainer, can_focus=False, can_focus_children=False):
Footer {
layout: grid;
grid-columns: auto;
- background: $panel;
- color: $text;
+ color: $footer-foreground;
+ background: $footer-background;
dock: bottom;
height: 1;
scrollbar-size: 0 0;
@@ -150,7 +143,7 @@ class Footer(ScrollableContainer, can_focus=False, can_focus_children=False):
border-left: vkey $foreground 20%;
}
- &.-ansi-colors {
+ &:ansi {
background: ansi_default;
.footer-key--key {
background: ansi_default;
diff --git a/contrib/python/textual/textual/widgets/_header.py b/contrib/python/textual/textual/widgets/_header.py
index d9d18fed0d4..2482a578e4a 100644
--- a/contrib/python/textual/textual/widgets/_header.py
+++ b/contrib/python/textual/textual/widgets/_header.py
@@ -75,7 +75,7 @@ class HeaderClock(HeaderClockSpace):
DEFAULT_CSS = """
HeaderClock {
background: $foreground-darken-1 5%;
- color: $text;
+ color: $foreground;
text-opacity: 85%;
content-align: center middle;
}
@@ -131,8 +131,8 @@ class Header(Widget):
Header {
dock: top;
width: 100%;
- background: $foreground 5%;
- color: $text;
+ background: $panel;
+ color: $foreground;
height: 1;
}
Header.-tall {
diff --git a/contrib/python/textual/textual/widgets/_input.py b/contrib/python/textual/textual/widgets/_input.py
index bcf5235664b..b25ac0af36a 100644
--- a/contrib/python/textual/textual/widgets/_input.py
+++ b/contrib/python/textual/textual/widgets/_input.py
@@ -146,20 +146,21 @@ class Input(Widget, can_focus=True):
DEFAULT_CSS = """
Input {
- background: $boost;
- color: $text;
+ background: $surface;
+ color: $foreground;
padding: 0 2;
- border: tall $background;
+ border: tall $border-blurred;
width: 100%;
height: 3;
&:focus {
- border: tall $accent;
+ border: tall $border;
+ background-tint: $foreground 5%;
}
&>.input--cursor {
- background: $surface;
- color: $text;
- text-style: reverse;
+ background: $input-cursor-background;
+ color: $input-cursor-foreground;
+ text-style: $input-cursor-text-style;
}
&>.input--placeholder, &>.input--suggestion {
color: $text-disabled;
@@ -171,16 +172,10 @@ class Input(Widget, can_focus=True):
border: tall $error;
}
- &.-ansi-colors {
+ &:ansi {
background: ansi_default;
color: ansi_default;
- border: tall ansi_default;
-
- &:focus {
- border: tall ansi_blue;
- }
&>.input--cursor {
- background: ansi_default;
text-style: reverse;
}
&>.input--placeholder, &>.input--suggestion {
diff --git a/contrib/python/textual/textual/widgets/_key_panel.py b/contrib/python/textual/textual/widgets/_key_panel.py
index 2b195c03e7b..6e0502f21bb 100644
--- a/contrib/python/textual/textual/widgets/_key_panel.py
+++ b/contrib/python/textual/textual/widgets/_key_panel.py
@@ -90,11 +90,13 @@ class BindingsTable(Static):
get_key_display = self.app.get_key_display
for multi_bindings in action_to_bindings.values():
binding, enabled, tooltip = multi_bindings[0]
- key_display = " ".join(
- get_key_display(binding) for binding, _, _ in multi_bindings
+ keys_display = " ".join(
+ dict.fromkeys( # Remove duplicates while preserving order
+ get_key_display(binding) for binding, _, _ in multi_bindings
+ )
)
table.add_row(
- Text(key_display, style=key_style),
+ Text(keys_display, style=key_style),
render_description(binding),
)
if namespace != previous_namespace:
@@ -126,7 +128,7 @@ class KeyPanel(VerticalScroll, can_focus=False):
align: center top;
&> BindingsTable > .bindings-table--key {
- color: $secondary;
+ color: $accent;
text-style: bold;
padding: 0 1;
}
diff --git a/contrib/python/textual/textual/widgets/_label.py b/contrib/python/textual/textual/widgets/_label.py
index 9dc3541f419..90fefa7294b 100644
--- a/contrib/python/textual/textual/widgets/_label.py
+++ b/contrib/python/textual/textual/widgets/_label.py
@@ -1,7 +1,15 @@
"""Provides a simple Label widget."""
+from __future__ import annotations
+
+from typing import Literal
+
+from rich.console import RenderableType
+
from textual.widgets._static import Static
+LabelVariant = Literal["success", "error", "warning", "primary", "secondary", "accent"]
+
class Label(Static):
"""A simple label widget for displaying text-oriented renderables."""
@@ -11,5 +19,56 @@ class Label(Static):
width: auto;
height: auto;
min-height: 1;
+
+ &.success {
+ color: $text-success;
+ background: $success-muted;
+ }
+ &.error {
+ color: $text-error;
+ background: $error-muted;
+ }
+ &.warning {
+ color: $text-warning;
+ background: $warning-muted;
+ }
+ &.primary {
+ color: $text-primary;
+ background: $primary-muted;
+ }
+ &.secondary {
+ color: $text-secondary;
+ background: $secondary-muted;
+ }
+ &.accent {
+ color: $text-accent;
+ background: $accent-muted;
+ }
}
"""
+
+ def __init__(
+ self,
+ renderable: RenderableType = "",
+ *,
+ variant: LabelVariant | None = None,
+ expand: bool = False,
+ shrink: bool = False,
+ markup: bool = True,
+ name: str | None = None,
+ id: str | None = None,
+ classes: str | None = None,
+ disabled: bool = False,
+ ) -> None:
+ super().__init__(
+ renderable,
+ expand=expand,
+ shrink=shrink,
+ markup=markup,
+ name=name,
+ id=id,
+ classes=classes,
+ disabled=disabled,
+ )
+ if variant:
+ self.add_class(variant)
diff --git a/contrib/python/textual/textual/widgets/_list_item.py b/contrib/python/textual/textual/widgets/_list_item.py
index e450767c774..0df949c1be9 100644
--- a/contrib/python/textual/textual/widgets/_list_item.py
+++ b/contrib/python/textual/textual/widgets/_list_item.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from textual import events
+from textual import events, on
from textual.message import Message
from textual.reactive import reactive
from textual.widget import Widget
@@ -16,32 +16,6 @@ class ListItem(Widget, can_focus=False):
documentation for more details on use.
"""
- SCOPED_CSS = False
-
- DEFAULT_CSS = """
- ListItem {
- color: $text;
- height: auto;
- background: $panel-lighten-1;
- overflow: hidden hidden;
- }
- ListItem > :disabled {
- background: $panel-darken-1;
- }
- ListItem > Widget :hover {
- background: $boost;
- }
- ListView > ListItem.--highlight {
- background: $accent 50%;
- }
- ListView:focus > ListItem.--highlight {
- background: $accent;
- }
- ListItem > Widget {
- height: auto;
- }
- """
-
highlighted = reactive(False)
"""Is this item highlighted?"""
@@ -52,8 +26,14 @@ class ListItem(Widget, can_focus=False):
self.item = item
super().__init__()
- async def _on_click(self, _: events.Click) -> None:
+ def _on_click(self, _: events.Click) -> None:
self.post_message(self._ChildClicked(self))
def watch_highlighted(self, value: bool) -> None:
- self.set_class(value, "--highlight")
+ self.set_class(value, "-highlight")
+
+ @on(events.Enter)
+ @on(events.Leave)
+ def on_enter_or_leave(self, event: events.Enter | events.Leave) -> None:
+ event.stop()
+ self.set_class(self.is_mouse_over, "-hovered")
diff --git a/contrib/python/textual/textual/widgets/_list_view.py b/contrib/python/textual/textual/widgets/_list_view.py
index b92f1bf7734..e2363a80f84 100644
--- a/contrib/python/textual/textual/widgets/_list_view.py
+++ b/contrib/python/textual/textual/widgets/_list_view.py
@@ -25,6 +25,41 @@ class ListView(VerticalScroll, can_focus=True, can_focus_children=False):
index: The index in the list that's currently highlighted.
"""
+ ALLOW_MAXIMIZE = True
+
+ DEFAULT_CSS = """
+ ListView {
+ background: $surface;
+ &:focus-within {
+ background-tint: $foreground 5%;
+ }
+
+ & > ListItem {
+ color: $foreground;
+ height: auto;
+ overflow: hidden hidden;
+ width: 1fr;
+
+ &.-hovered {
+ background: $block-hover-background;
+ }
+
+ &.-highlight {
+ color: $block-cursor-blurred-foreground;
+ background: $block-cursor-blurred-background;
+ text-style: $block-cursor-blurred-text-style;
+ }
+ }
+
+ &:focus > ListItem.-highlight > Widget {
+ width: 1fr;
+ color: $block-cursor-foreground;
+ background: $block-cursor-background;
+ text-style: $block-cursor-text-style;
+ }
+ }
+ """
+
BINDINGS: ClassVar[list[BindingType]] = [
Binding("enter", "select_cursor", "Select", show=False),
Binding("up", "cursor_up", "Cursor up", show=False),
diff --git a/contrib/python/textual/textual/widgets/_loading_indicator.py b/contrib/python/textual/textual/widgets/_loading_indicator.py
index 0dae7324dc0..7a8cb43bf84 100644
--- a/contrib/python/textual/textual/widgets/_loading_indicator.py
+++ b/contrib/python/textual/textual/widgets/_loading_indicator.py
@@ -22,7 +22,7 @@ class LoadingIndicator(Widget):
height: 100%;
min-height: 1;
content-align: center middle;
- color: $accent;
+ color: $primary;
text-style: not reverse;
}
LoadingIndicator.-textual-loading-indicator {
diff --git a/contrib/python/textual/textual/widgets/_log.py b/contrib/python/textual/textual/widgets/_log.py
index 0441a2c74ec..daaf5ea6e92 100644
--- a/contrib/python/textual/textual/widgets/_log.py
+++ b/contrib/python/textual/textual/widgets/_log.py
@@ -31,6 +31,9 @@ class Log(ScrollView, can_focus=True):
background: $surface;
color: $text;
overflow: scroll;
+ &:focus {
+ background-tint: $foreground 5%;
+ }
}
"""
diff --git a/contrib/python/textual/textual/widgets/_markdown.py b/contrib/python/textual/textual/widgets/_markdown.py
index 8d0813cfd61..839046014f7 100644
--- a/contrib/python/textual/textual/widgets/_markdown.py
+++ b/contrib/python/textual/textual/widgets/_markdown.py
@@ -244,12 +244,11 @@ class MarkdownH1(MarkdownHeader):
"""An H1 Markdown header."""
DEFAULT_CSS = """
-
MarkdownH1 {
content-align: center middle;
- text-style: bold;
- color: $success;
- &:light {color: $primary;}
+ color: $markdown-h1-color;
+ background: $markdown-h1-background;
+ text-style: $markdown-h1-text-style;
}
"""
@@ -258,11 +257,10 @@ class MarkdownH2(MarkdownHeader):
"""An H2 Markdown header."""
DEFAULT_CSS = """
-
MarkdownH2 {
- text-style: underline;
- color: $success;
- &:light {color: $primary;}
+ color: $markdown-h2-color;
+ background: $markdown-h2-background;
+ text-style: $markdown-h2-text-style;
}
"""
@@ -272,11 +270,11 @@ class MarkdownH3(MarkdownHeader):
DEFAULT_CSS = """
MarkdownH3 {
- text-style: bold;
- color: $success;
+ color: $markdown-h3-color;
+ background: $markdown-h3-background;
+ text-style: $markdown-h3-text-style;
margin: 1 0;
width: auto;
- &:light {color: $primary;}
}
"""
@@ -286,9 +284,10 @@ class MarkdownH4(MarkdownHeader):
DEFAULT_CSS = """
MarkdownH4 {
- text-style: bold underline;
+ color: $markdown-h4-color;
+ background: $markdown-h4-background;
+ text-style: $markdown-h4-text-style;
margin: 1 0;
- color: $text;
}
"""
@@ -298,10 +297,10 @@ class MarkdownH5(MarkdownHeader):
DEFAULT_CSS = """
MarkdownH5 {
- text-style: bold;
- color: $text;
+ color: $markdown-h5-color;
+ background: $markdown-h5-background;
+ text-style: $markdown-h5-text-style;
margin: 1 0;
-
}
"""
@@ -311,8 +310,9 @@ class MarkdownH6(MarkdownHeader):
DEFAULT_CSS = """
MarkdownH6 {
- text-style: bold;
- color: $text-muted;
+ color: $markdown-h6-color;
+ background: $markdown-h6-background;
+ text-style: $markdown-h6-text-style;
margin: 1 0;
}
"""
@@ -323,7 +323,7 @@ class MarkdownHorizontalRule(MarkdownBlock):
DEFAULT_CSS = """
MarkdownHorizontalRule {
- border-bottom: heavy $primary;
+ border-bottom: heavy $secondary;
height: 1;
padding-top: 1;
margin-bottom: 1;
@@ -353,7 +353,7 @@ class MarkdownBlockQuote(MarkdownBlock):
padding: 0 1;
}
MarkdownBlockQuote:light {
- border-left: outer $primary;
+ border-left: outer $secondary;
}
MarkdownBlockQuote > BlockQuote {
margin-left: 2;
@@ -500,7 +500,7 @@ class MarkdownTable(MarkdownBlock):
DEFAULT_CSS = """
MarkdownTable {
width: 100%;
- background: $panel;
+ background: $surface;
}
"""
@@ -554,7 +554,7 @@ class MarkdownBullet(Widget):
color: $success;
text-style: bold;
&:light {
- color: $primary;
+ color: $secondary;
}
}
"""
@@ -619,7 +619,7 @@ class MarkdownFence(MarkdownBlock):
self.lexer = lexer
self.theme = (
self._markdown.code_dark_theme
- if self.app.dark
+ if self.app.current_theme.dark
else self._markdown.code_light_theme
)
@@ -635,13 +635,13 @@ class MarkdownFence(MarkdownBlock):
def _on_mount(self, _: Mount) -> None:
"""Watch app theme switching."""
- self.watch(self.app, "dark", self._retheme)
+ self.watch(self.app, "theme", self._retheme)
def _retheme(self) -> None:
"""Rerender when the theme changes."""
self.theme = (
self._markdown.code_dark_theme
- if self.app.dark
+ if self.app.current_theme.dark
else self._markdown.code_light_theme
)
self.get_child_by_type(Static).update(self._block())
@@ -670,10 +670,15 @@ class Markdown(Widget):
DEFAULT_CSS = """
Markdown {
height: auto;
- margin: 0 2 1 2;
+ padding: 0 2 1 2;
layout: vertical;
- color: $text;
+ color: $foreground;
+ background: $surface;
overflow-y: auto;
+
+ &:focus {
+ background-tint: $foreground 5%;
+ }
}
.em {
text-style: italic;
@@ -698,17 +703,17 @@ class Markdown(Widget):
| :- | :- |
| `code_inline` | Target text that is styled as inline code. |
| `em` | Target text that is emphasized inline. |
- | `s` | Target text that is styled inline with strykethrough. |
+ | `s` | Target text that is styled inline with strikethrough. |
| `strong` | Target text that is styled inline with strong. |
"""
BULLETS = ["\u25cf ", "▪ ", "‣ ", "• ", "⭑ "]
code_dark_theme: reactive[str] = reactive("material")
- """The theme to use for code blocks when in [dark mode][textual.app.App.dark]."""
+ """The theme to use for code blocks when the App theme is dark."""
code_light_theme: reactive[str] = reactive("material-light")
- """The theme to use for code blocks when in [light mode][textual.app.App.dark]."""
+ """The theme to use for code blocks when the App theme is light."""
def __init__(
self,
@@ -805,13 +810,13 @@ class Markdown(Widget):
def _watch_code_dark_theme(self) -> None:
"""React to the dark theme being changed."""
- if self.app.dark:
+ if self.app.current_theme.dark:
for block in self.query(MarkdownFence):
block._retheme()
def _watch_code_light_theme(self) -> None:
"""React to the light theme being changed."""
- if not self.app.dark:
+ if not self.app.current_theme.dark:
for block in self.query(MarkdownFence):
block._retheme()
@@ -1043,12 +1048,17 @@ class MarkdownTableOfContents(Widget, can_focus_children=True):
DEFAULT_CSS = """
MarkdownTableOfContents {
width: auto;
+ height: 1fr;
background: $panel;
- border-right: wide $background;
+ &:focus-within {
+ background-tint: $foreground 5%;
+ }
}
MarkdownTableOfContents > Tree {
padding: 1;
width: auto;
+ height: 1fr;
+ background: $panel;
}
"""
@@ -1118,7 +1128,7 @@ class MarkdownTableOfContents(Widget, can_focus_children=True):
message.stop()
-class MarkdownViewer(VerticalScroll, can_focus=True, can_focus_children=True):
+class MarkdownViewer(VerticalScroll, can_focus=False, can_focus_children=True):
"""A Markdown viewer widget."""
SCOPED_CSS = False
@@ -1127,14 +1137,11 @@ class MarkdownViewer(VerticalScroll, can_focus=True, can_focus_children=True):
MarkdownViewer {
height: 1fr;
scrollbar-gutter: stable;
- }
-
- MarkdownTableOfContents {
- dock:left;
- }
-
- MarkdownViewer > MarkdownTableOfContents {
- display: none;
+ background: $surface;
+ & > MarkdownTableOfContents {
+ display: none;
+ dock:left;
+ }
}
MarkdownViewer.-show-table-of-contents > MarkdownTableOfContents {
@@ -1226,8 +1233,9 @@ class MarkdownViewer(VerticalScroll, can_focus=True, can_focus_children=True):
markdown = Markdown(
parser_factory=self._parser_factory, open_links=self._open_links
)
- yield MarkdownTableOfContents(markdown)
+ markdown.can_focus = True
yield markdown
+ yield MarkdownTableOfContents(markdown)
def _on_markdown_table_of_contents_updated(
self, message: Markdown.TableOfContentsUpdated
diff --git a/contrib/python/textual/textual/widgets/_option_list.py b/contrib/python/textual/textual/widgets/_option_list.py
index 5963052c807..963f521d26a 100644
--- a/contrib/python/textual/textual/widgets/_option_list.py
+++ b/contrib/python/textual/textual/widgets/_option_list.py
@@ -5,9 +5,8 @@ from typing import TYPE_CHECKING, ClassVar, Iterable, NamedTuple
import rich.repr
from rich.console import RenderableType
from rich.measure import Measurement
-from rich.padding import Padding
from rich.rule import Rule
-from rich.style import NULL_STYLE, Style
+from rich.style import Style
from textual import _widget_navigation, events
from textual._widget_navigation import Direction
@@ -18,10 +17,13 @@ from textual.message import Message
from textual.reactive import reactive
from textual.scroll_view import ScrollView
from textual.strip import Strip
+from textual.visual import Padding, Visual, visualize
if TYPE_CHECKING:
from typing_extensions import Self, TypeAlias
+ from textual.app import RenderResult
+
class DuplicateID(Exception):
"""Raised if a duplicate ID is used when adding options to an option list."""
@@ -40,7 +42,7 @@ class Option:
"""Class that holds the details of an individual option."""
def __init__(
- self, prompt: RenderableType, id: str | None = None, disabled: bool = False
+ self, prompt: RenderResult, id: str | None = None, disabled: bool = False
) -> None:
"""Initialise the option.
@@ -49,35 +51,38 @@ class Option:
id: The optional ID for the option.
disabled: The initial enabled/disabled state. Enabled by default.
"""
- self.__prompt = prompt
- self.__id = id
+ self._prompt = prompt
+ self._id = id
self.disabled = disabled
@property
- def prompt(self) -> RenderableType:
+ def prompt(self) -> RenderResult:
"""The prompt for the option."""
- return self.__prompt
+ return self._prompt
- def set_prompt(self, prompt: RenderableType) -> None:
+ def set_prompt(self, prompt: RenderResult) -> None:
"""Set the prompt for the option.
Args:
prompt: The new prompt for the option.
"""
- self.__prompt = prompt
+ self._prompt = prompt
+
+ def visualize(self) -> object:
+ return self._prompt
@property
def id(self) -> str | None:
"""The optional ID for the option."""
- return self.__id
+ return self._id
def __rich_repr__(self) -> rich.repr.Result:
yield "prompt", self.prompt
yield "id", self.id, None
yield "disabled", self.disabled, False
- def __rich__(self) -> RenderableType:
- return self.__prompt
+ def __rich__(self) -> RenderResult:
+ return self._prompt
class OptionLineSpan(NamedTuple):
@@ -139,49 +144,38 @@ class OptionList(ScrollView, can_focus=True):
OptionList {
height: auto;
max-height: 100%;
- background: $boost;
- color: $text;
+ color: $foreground;
overflow-x: hidden;
- border: tall transparent;
+ border: tall $border-blurred;
padding: 0 1;
- }
-
- OptionList:focus {
- border: tall $accent;
-
- }
-
- OptionList > .option-list--separator {
- color: $foreground 15%;
- }
-
- OptionList > .option-list--option-highlighted {
- color: $text;
- text-style: bold;
- }
-
- OptionList:focus > .option-list--option-highlighted {
- background: $accent;
- }
-
- OptionList > .option-list--option-disabled {
- color: $text-disabled;
- }
-
- OptionList > .option-list--option-hover {
- background: $boost;
- }
-
- OptionList > .option-list--option-hover-highlighted {
- background: $accent 60%;
- color: $text;
- text-style: bold;
- }
-
- OptionList:focus > .option-list--option-hover-highlighted {
- background: $accent;
- color: $text;
- text-style: bold;
+ background: $surface;
+ & > .option-list--option-highlighted {
+ color: $block-cursor-blurred-foreground;
+ background: $block-cursor-blurred-background;
+ text-style: $block-cursor-blurred-text-style;
+ }
+ &:focus {
+ border: tall $border;
+ background-tint: $foreground 5%;
+ & > .option-list--option-highlighted {
+ color: $block-cursor-foreground;
+ background: $block-cursor-background;
+ text-style: $block-cursor-text-style;
+ }
+ }
+ & > .option-list--separator {
+ color: $foreground 15%;
+ }
+ & > .option-list--option-highlighted {
+ color: $foreground;
+ background: $block-cursor-blurred-background;
+ }
+ & > .option-list--option-disabled {
+ color: $text-disabled;
+ }
+ & > .option-list--option-hover {
+ background: $block-hover-background;
+ }
}
"""
@@ -190,7 +184,6 @@ class OptionList(ScrollView, can_focus=True):
"option-list--option-disabled",
"option-list--option-highlighted",
"option-list--option-hover",
- "option-list--option-hover-highlighted",
"option-list--separator",
}
"""
@@ -199,7 +192,6 @@ class OptionList(ScrollView, can_focus=True):
| `option-list--option-disabled` | Target disabled options. |
| `option-list--option-highlighted` | Target the highlighted option. |
| `option-list--option-hover` | Target an option that has the mouse over it. |
- | `option-list--option-hover-highlighted` | Target a highlighted option that has the mouse over it. |
| `option-list--separator` | Target the separators. |
"""
@@ -302,7 +294,7 @@ class OptionList(ScrollView, can_focus=True):
}
"""A dictionary of option IDs and the option indexes they relate to."""
- self._content_render_cache: LRUCache[tuple[int, Style, int], list[Strip]]
+ self._content_render_cache: LRUCache[tuple[int, str, int], list[Strip]]
self._content_render_cache = LRUCache(256)
self._lines: list[tuple[int, int]] | None = None
@@ -356,13 +348,12 @@ class OptionList(ScrollView, can_focus=True):
"""
assert self._lines is not None
assert self._spans is not None
- style = NULL_STYLE
for index, content in enumerate(new_content, len(self._lines)):
if isinstance(content, Option):
height = len(
self._render_option_content(
- index, content, style, width - self._left_gutter_width()
+ index, content, "", width - self._left_gutter_width()
)
)
@@ -401,10 +392,9 @@ class OptionList(ScrollView, can_focus=True):
def get_content_height(self, container: Size, viewport: Size, width: int) -> int:
# Get the content height without requiring a refresh
# TODO: Internal data structure could be simplified
- style = self.rich_style
_render_option_content = self._render_option_content
heights = [
- len(_render_option_content(index, option, style, width))
+ len(_render_option_content(index, option, "", width))
for index, option in enumerate(self._options)
]
separator_count = sum(
@@ -455,34 +445,37 @@ class OptionList(ScrollView, can_focus=True):
return Option(content)
def _render_option_content(
- self, option_index: int, renderable: RenderableType, style: Style, width: int
+ self, option_index: int, content: RenderResult, component_class: str, width: int
) -> list[Strip]:
"""Render content for option and style.
Args:
option_index: Option index to render.
- renderable: The Option renderable.
- style: The Rich style to render with.
- width: The width of the renderable.
+ content: Render result for prompt.
+ component class: Additional component class.
+ width: Desired width of render.
Returns:
A list of strips.
"""
- cache_key = (option_index, style, width)
+ cache_key = (option_index, component_class, width)
if (strips := self._content_render_cache.get(cache_key, None)) is not None:
return strips
+ visual = visualize(self, content)
padding = self.get_component_styles("option-list--option").padding
- console = self.app.console
- options = console.options.update_width(width)
- if not self._wrap:
- options = options.update(no_wrap=True, overflow="ellipsis")
if padding:
- renderable = Padding(renderable, padding)
- lines = self.app.console.render_lines(renderable, options, style=style)
+ visual = Padding(visual, padding)
+
+ component_class_list = ["option-list--option"]
+ if component_class:
+ component_class_list.append(component_class)
+ visual_style = self.get_visual_style(component_class_list)
+
+ strips = Visual.to_strips(self, visual, width, None, visual_style, pad=True)
style_meta = Style.from_meta({"option": option_index})
- strips = [Strip(line, width).apply_style(style_meta) for line in lines]
+ strips = [strip.apply_style(style_meta) for strip in strips]
self._content_render_cache[cache_key] = strips
return strips
@@ -849,7 +842,7 @@ class OptionList(ScrollView, can_focus=True):
mouse_over = self._mouse_hovering_over == option_index
- component_class: str | None = None
+ component_class: str = ""
if option_index == -1:
component_class = "option-list--separator"
@@ -866,16 +859,10 @@ class OptionList(ScrollView, can_focus=True):
elif mouse_over:
component_class = "option-list--option-hover"
- style = (
- self.get_component_rich_style(component_class)
- if component_class
- else self.rich_style
- )
-
strips = self._render_option_content(
option_index,
renderable,
- style,
+ component_class,
self.scrollable_content_region.width - self._left_gutter_width(),
)
try:
diff --git a/contrib/python/textual/textual/widgets/_progress_bar.py b/contrib/python/textual/textual/widgets/_progress_bar.py
index 6ad585a3b01..a1c0260b8ed 100644
--- a/contrib/python/textual/textual/widgets/_progress_bar.py
+++ b/contrib/python/textual/textual/widgets/_progress_bar.py
@@ -44,16 +44,16 @@ class Bar(Widget, can_focus=False):
height: 1;
&> .bar--bar {
- color: $warning;
- background: $foreground 10%;
+ color: $primary;
+ background: $surface;
}
&> .bar--indeterminate {
color: $error;
- background: $foreground 10%;
+ background: $surface;
}
&> .bar--complete {
color: $success;
- background: $foreground 10%;
+ background: $surface;
}
}
"""
diff --git a/contrib/python/textual/textual/widgets/_radio_set.py b/contrib/python/textual/textual/widgets/_radio_set.py
index 68ac5dc3434..eb47af19fc0 100644
--- a/contrib/python/textual/textual/widgets/_radio_set.py
+++ b/contrib/python/textual/textual/widgets/_radio_set.py
@@ -25,39 +25,48 @@ class RadioSet(VerticalScroll, can_focus=True, can_focus_children=False):
turned off.
"""
+ ALLOW_MAXIMIZE = True
+
DEFAULT_CSS = """
RadioSet {
- border: tall transparent;
- background: $boost;
- padding: 0 1 0 0;
+ border: tall $border-blurred;
+ background: $surface;
+ padding: 0 1;
height: auto;
width: auto;
- }
- RadioSet:focus {
- border: tall $accent;
- }
+ & > RadioButton {
+ background: transparent;
+ border: none;
+ padding: 0;
- /* The following rules/styles mimic similar ToggleButton:focus rules in
- * ToggleButton. If those styles ever get updated, these should be too.
- */
+ & > .toggle--button {
+ color: $panel-darken-2;
+ background: $panel;
+ }
- RadioSet > RadioButton {
- background: transparent;
- border: none;
- padding: 0 1;
- }
+ &.-selected {
+ background: $block-cursor-blurred-background;
+ }
+ }
- RadioSet:focus > RadioButton.-selected > .toggle--label {
- text-style: underline;
- }
+ & > RadioButton.-on .toggle--button {
+ color: $text-success;
+ }
- RadioSet:focus ToggleButton.-selected > .toggle--button {
- background: $foreground 25%;
- }
+ &:focus {
+ /* The following rules/styles mimic similar ToggleButton:focus rules in
+ * ToggleButton. If those styles ever get updated, these should be too.
+ */
+ border: tall $border;
+ background-tint: $foreground 5%;
+ & > RadioButton.-selected {
+ color: $block-cursor-foreground;
+ text-style: $block-cursor-text-style;
+ background: $block-cursor-background;
+ }
- RadioSet:focus > RadioButton.-on.-selected > .toggle--button {
- background: $foreground 25%;
+ }
}
"""
diff --git a/contrib/python/textual/textual/widgets/_rich_log.py b/contrib/python/textual/textual/widgets/_rich_log.py
index f0585c9dfe8..5006dc39e8d 100644
--- a/contrib/python/textual/textual/widgets/_rich_log.py
+++ b/contrib/python/textual/textual/widgets/_rich_log.py
@@ -50,8 +50,11 @@ class RichLog(ScrollView, can_focus=True):
DEFAULT_CSS = """
RichLog{
background: $surface;
- color: $text;
+ color: $foreground;
overflow-y: scroll;
+ &:focus {
+ background-tint: $foreground 5%;
+ }
}
"""
diff --git a/contrib/python/textual/textual/widgets/_rule.py b/contrib/python/textual/textual/widgets/_rule.py
index aa0a7fd67aa..4ffaa8cd63e 100644
--- a/contrib/python/textual/textual/widgets/_rule.py
+++ b/contrib/python/textual/textual/widgets/_rule.py
@@ -112,7 +112,7 @@ class Rule(Widget, can_focus=False):
DEFAULT_CSS = """
Rule {
- color: $primary;
+ color: $secondary;
}
Rule.-horizontal {
diff --git a/contrib/python/textual/textual/widgets/_select.py b/contrib/python/textual/textual/widgets/_select.py
index 48cc3925980..8d651cbe446 100644
--- a/contrib/python/textual/textual/widgets/_select.py
+++ b/contrib/python/textual/textual/widgets/_select.py
@@ -45,22 +45,6 @@ class SelectOverlay(OptionList):
BINDINGS = [("escape", "dismiss", "Dismiss menu")]
- DEFAULT_CSS = """
- SelectOverlay {
- border: tall $background;
- background: $panel;
- color: $text;
- width: 100%;
- padding: 0 1;
- }
- SelectOverlay:focus {
- border: tall $background;
- }
- SelectOverlay > .option-list--option {
- padding: 0 1;
- }
- """
-
@dataclass
class Dismiss(Message):
"""Inform ancestor the overlay should be dismissed."""
@@ -110,22 +94,28 @@ class SelectCurrent(Horizontal):
DEFAULT_CSS = """
SelectCurrent {
- border: tall transparent;
- background: $boost;
- color: $text;
- width: 100%;
+ border: tall $border-blurred;
+ color: $foreground;
+ background: $surface;
+ width: 1fr;
height: auto;
padding: 0 2;
+ &:ansi {
+ border: tall ansi_blue;
+ color: ansi_default;
+ background: ansi_default;
+ }
+
Static#label {
width: 1fr;
height: auto;
- color: $text-disabled;
+ color: $foreground 50%;
background: transparent;
}
&.-has-value Static#label {
- color: $text;
+ color: $foreground;
}
.arrow {
@@ -133,7 +123,7 @@ class SelectCurrent(Horizontal):
width: 1;
height: 1;
padding: 0 0 0 1;
- color: $text-muted;
+ color: $foreground 50%;
background: transparent;
}
}
@@ -177,7 +167,7 @@ class SelectCurrent(Horizontal):
"""Toggle the class."""
self.set_class(has_value, "-has-value")
- async def _on_click(self, event: events.Click) -> None:
+ def _on_click(self, event: events.Click) -> None:
"""Inform ancestor we want to toggle."""
event.stop()
self.post_message(self.Toggle())
@@ -211,6 +201,16 @@ class Select(Generic[SelectType], Vertical, can_focus=True):
DEFAULT_CSS = """
Select {
height: auto;
+ color: $foreground;
+
+ .up-arrow {
+ display: none;
+ }
+
+ &:focus > SelectCurrent {
+ border: tall $border;
+ background-tint: $foreground 5%;
+ }
& > SelectOverlay {
width: 1fr;
@@ -219,31 +219,31 @@ class Select(Generic[SelectType], Vertical, can_focus=True):
max-height: 12;
overlay: screen;
constrain: none inside;
+ color: $foreground;
+ border: tall $border-blurred;
+ background: $surface;
+ &:focus {
+ background-tint: $foreground 5%;
+ }
+ & > .option-list--option {
+ padding: 0 1;
+ }
}
- &:focus > SelectCurrent {
- border: tall $accent;
- }
-
- .up-arrow {
- display: none;
- }
-
- &.-expanded .down-arrow {
- display: none;
- }
+ &.-expanded {
+ .down-arrow {
+ display: none;
+ }
- &.-expanded .up-arrow {
- display: block;
- }
+ .up-arrow {
+ display: block;
+ }
- &.-expanded > SelectOverlay {
- display: block;
+ & > SelectOverlay {
+ display: block;
+ }
}
- &.-expanded > SelectCurrent {
- border: tall $accent;
- }
}
"""
diff --git a/contrib/python/textual/textual/widgets/_selection_list.py b/contrib/python/textual/textual/widgets/_selection_list.py
index 22ac20b0a50..7493990f2e9 100644
--- a/contrib/python/textual/textual/widgets/_selection_list.py
+++ b/contrib/python/textual/textual/widgets/_selection_list.py
@@ -96,62 +96,27 @@ class SelectionList(Generic[SelectionType], OptionList):
DEFAULT_CSS = """
SelectionList {
height: auto;
- }
-
- SelectionList:light:focus > .selection-list--button-selected {
- color: $primary;
- }
-
- SelectionList:light > .selection-list--button-selected-highlighted {
- color: $primary;
- }
-
- SelectionList:light:focus > .selection-list--button-selected-highlighted {
- color: $primary;
- }
-
- SelectionList > .selection-list--button {
- text-style: bold;
- background: $foreground 15%;
- }
-
- SelectionList:focus > .selection-list--button {
- text-style: bold;
- background: $foreground 25%;
- }
-
- SelectionList > .selection-list--button-highlighted {
- text-style: bold;
- background: $foreground 15%;
- }
-
- SelectionList:focus > .selection-list--button-highlighted {
- text-style: bold;
- background: $foreground 25%;
- }
+
+ & > .selection-list--button {
+ color: $panel-darken-2;
+ background: $panel;
+ }
- SelectionList > .selection-list--button-selected {
- text-style: bold;
- color: $success;
- background: $foreground 15%;
- }
+ & > .selection-list--button-highlighted {
+ color: $panel-darken-2;
+ background: $panel;
+ }
- SelectionList:focus > .selection-list--button-selected {
- text-style: bold;
- color: $success;
- background: $foreground 25%;
- }
+ & > .selection-list--button-selected {
+ color: $text-success;
+ background: $panel;
+ }
- SelectionList > .selection-list--button-selected-highlighted {
- text-style: bold;
- color: $success;
- background: $foreground 15%;
- }
+ & > .selection-list--button-selected-highlighted {
+ color: $text-success;
+ background: $panel;
+ }
- SelectionList:focus > .selection-list--button-selected-highlighted {
- text-style: bold;
- color: $success;
- background: $foreground 25%;
}
"""
@@ -576,10 +541,10 @@ class SelectionList(Generic[SelectionType], OptionList):
# If the button is in the unselected state, we're going to do a bit
# of a switcharound to make it look like it's a "cutout".
- if selection.value not in self._selected:
- button_style += Style.from_color(
- self.background_colors[1].rich_color, button_style.bgcolor
- )
+ # if selection.value not in self._selected:
+ # button_style += Style.from_color(
+ # self.background_colors[1].rich_color, button_style.bgcolor
+ # )
# Build the style for the side characters. Note that this is
# sensitive to the type of character used, so pay attention to
diff --git a/contrib/python/textual/textual/widgets/_sparkline.py b/contrib/python/textual/textual/widgets/_sparkline.py
index 5eb284b5918..aeb55382a17 100644
--- a/contrib/python/textual/textual/widgets/_sparkline.py
+++ b/contrib/python/textual/textual/widgets/_sparkline.py
@@ -41,10 +41,10 @@ class Sparkline(Widget):
height: 1;
}
Sparkline > .sparkline--max-color {
- color: $accent;
+ color: $primary;
}
Sparkline > .sparkline--min-color {
- color: $accent 30%;
+ color: $primary 30%;
}
"""
@@ -87,8 +87,7 @@ class Sparkline(Widget):
def render(self) -> RenderResult:
"""Renders the sparkline when there is data available."""
- if not self.data:
- return "<empty sparkline>"
+ data = self.data or []
_, base = self.background_colors
min_color = base + (
self.get_component_styles("sparkline--min-color").color
@@ -101,7 +100,7 @@ class Sparkline(Widget):
else self.max_color
)
return SparklineRenderable(
- self.data,
+ data,
width=self.size.width,
min_color=min_color.rich_color,
max_color=max_color.rich_color,
diff --git a/contrib/python/textual/textual/widgets/_static.py b/contrib/python/textual/textual/widgets/_static.py
index 0000a53f87a..1872f6623f2 100644
--- a/contrib/python/textual/textual/widgets/_static.py
+++ b/contrib/python/textual/textual/widgets/_static.py
@@ -10,6 +10,7 @@ if TYPE_CHECKING:
from textual.app import RenderResult
from textual.errors import RenderError
+from textual.visual import SupportsVisual, Visual, visualize
from textual.widget import Widget
@@ -23,9 +24,9 @@ def _check_renderable(renderable: object):
Raises:
RenderError: If the object can not be rendered.
"""
- if not is_renderable(renderable):
+ if not is_renderable(renderable) and not hasattr(renderable, "visualize"):
raise RenderError(
- f"unable to render {renderable!r}; a string, Text, or other Rich renderable is required"
+ f"unable to render {renderable.__class__.__name__!r} type; must be a str, Text, Rich renderable oor Textual Visual instance"
)
@@ -33,7 +34,7 @@ class Static(Widget, inherit_bindings=False):
"""A widget to display simple static content, or use as a base class for more complex widgets.
Args:
- renderable: A Rich renderable, or string containing console markup.
+ content: A Rich renderable, or string containing console markup.
expand: Expand content if required to fill container.
shrink: Shrink content if required to fill container.
markup: True if markup should be parsed and rendered.
@@ -49,11 +50,11 @@ class Static(Widget, inherit_bindings=False):
}
"""
- _renderable: RenderableType
+ _renderable: RenderableType | SupportsVisual
def __init__(
self,
- renderable: RenderableType = "",
+ content: RenderableType | SupportsVisual = "",
*,
expand: bool = False,
shrink: bool = False,
@@ -67,15 +68,21 @@ class Static(Widget, inherit_bindings=False):
self.expand = expand
self.shrink = shrink
self.markup = markup
- self.renderable = renderable
- _check_renderable(renderable)
+ self._content = content
+ self._visual: Visual | None = None
@property
- def renderable(self) -> RenderableType:
- return self._renderable or ""
+ def visual(self) -> Visual:
+ if self._visual is None:
+ self._visual = visualize(self, self._content)
+ return self._visual
+
+ @property
+ def renderable(self) -> RenderableType | SupportsVisual:
+ return self._content or ""
@renderable.setter
- def renderable(self, renderable: RenderableType) -> None:
+ def renderable(self, renderable: RenderableType | SupportsVisual) -> None:
if isinstance(renderable, str):
if self.markup:
self._renderable = Text.from_markup(renderable)
@@ -83,6 +90,7 @@ class Static(Widget, inherit_bindings=False):
self._renderable = Text(renderable)
else:
self._renderable = renderable
+ self._visual = None
self.clear_cached_dimensions()
def render(self) -> RenderResult:
@@ -91,14 +99,15 @@ class Static(Widget, inherit_bindings=False):
Returns:
A rich renderable.
"""
- return self._renderable
+ return self.visual
- def update(self, renderable: RenderableType = "") -> None:
+ def update(self, content: RenderableType | SupportsVisual = "") -> None:
"""Update the widget's content area with new text or Rich renderable.
Args:
- renderable: A new rich renderable. Defaults to empty renderable;
+ content: New content.
"""
- _check_renderable(renderable)
- self.renderable = renderable
+
+ self._content = content
+ self._visual = visualize(self, content)
self.refresh(layout=True)
diff --git a/contrib/python/textual/textual/widgets/_switch.py b/contrib/python/textual/textual/widgets/_switch.py
index 09d7a83fa03..72602b395af 100644
--- a/contrib/python/textual/textual/widgets/_switch.py
+++ b/contrib/python/textual/textual/widgets/_switch.py
@@ -46,33 +46,51 @@ class Switch(Widget, can_focus=True):
DEFAULT_CSS = """
Switch {
- border: tall transparent;
- background: $boost;
+ border: tall $border-blurred;
+ background: $surface;
height: auto;
width: auto;
+
padding: 0 2;
- }
-
- Switch > .switch--slider {
- background: $panel-darken-2;
- color: $panel-lighten-2;
- }
-
- Switch:hover {
- border: tall $background;
- }
+ &.-on .switch--slider {
+ color: $success;
+ }
+ & .switch--slider {
+ color: $panel;
+ background: $panel-darken-2;
+ }
+ &:hover {
+ & > .switch--slider {
+ color: $panel-lighten-1
+ }
+ &.-on > .switch--slider {
+ color: $success-lighten-1;
+ }
+ }
+ &:focus {
+ border: tall $border;
+ background-tint: $foreground 5%;
+ }
- Switch:focus {
- border: tall $accent;
+ &:light {
+ &.-on .switch--slider {
+ color: $success;
+ }
+ & .switch--slider {
+ color: $primary 15%;
+ background: $panel-darken-2;
+ }
+ &:hover {
+ & > .switch--slider {
+ color: $primary 25%;
+ }
+ &.-on > .switch--slider {
+ color: $success-lighten-1;
+ }
+ }
+ }
}
- Switch.-on {
-
- }
-
- Switch.-on > .switch--slider {
- color: $success;
- }
"""
value: reactive[bool] = reactive(False, init=False)
diff --git a/contrib/python/textual/textual/widgets/_tabbed_content.py b/contrib/python/textual/textual/widgets/_tabbed_content.py
index d216688f7f1..37630b05dc1 100644
--- a/contrib/python/textual/textual/widgets/_tabbed_content.py
+++ b/contrib/python/textual/textual/widgets/_tabbed_content.py
@@ -169,7 +169,6 @@ class TabPane(Widget):
DEFAULT_CSS = """
TabPane {
height: auto;
- padding: 1 2;
}
"""
@@ -237,6 +236,7 @@ class TabPane(Widget):
class TabbedContent(Widget):
"""A container with associated tabs to toggle content visibility."""
+ ALLOW_MAXIMIZE = True
DEFAULT_CSS = """
TabbedContent {
height: auto;
diff --git a/contrib/python/textual/textual/widgets/_tabs.py b/contrib/python/textual/textual/widgets/_tabs.py
index db91209a881..c347bf35213 100644
--- a/contrib/python/textual/textual/widgets/_tabs.py
+++ b/contrib/python/textual/textual/widgets/_tabs.py
@@ -30,10 +30,13 @@ class Underline(Widget):
Underline {
width: 1fr;
height: 1;
- }
- Underline > .underline--bar {
- background: $foreground 10%;
- color: $accent;
+ & > .underline--bar {
+ color: $block-cursor-background;
+ background: $foreground 10%;
+ }
+ &:ansi {
+ text-style: dim;
+ }
}
"""
@@ -91,27 +94,24 @@ class Tab(Static):
DEFAULT_CSS = """
Tab {
width: auto;
- height: 2;
- padding: 1 1 0 2;
+ height: 1;
+ padding: 0 1;
text-align: center;
- color: $text-disabled;
- }
- Tab.-active {
- text-style: bold;
- color: $text;
- }
- Tab:hover {
- text-style: bold;
- }
- Tab.-active:hover {
- color: $text;
- }
- Tab:disabled {
- color: $text-disabled;
- text-opacity: 50%;
- }
- Tab.-hidden {
- display: none;
+ color: $foreground 50%;
+
+ &:hover {
+ color: $foreground;
+ }
+ &:disabled {
+ color: $foreground 25%;
+ }
+
+ &.-active {
+ color: $foreground;
+ }
+ &.-hidden {
+ display: none;
+ }
}
"""
@@ -201,23 +201,52 @@ class Tabs(Widget, can_focus=True):
DEFAULT_CSS = """
Tabs {
width: 100%;
- height: 3;
- }
- Tabs > #tabs-scroll {
- overflow: hidden;
- }
- Tabs #tabs-list {
- width: auto;
- min-height: 2;
- }
- Tabs #tabs-list-bar, Tabs #tabs-list {
- width: auto;
- height: auto;
- min-width: 100%;
- overflow: hidden hidden;
- }
- Tabs:focus .underline--bar {
- background: $foreground 20%;
+ height: 2;
+ &:focus {
+ .underline--bar {
+ background: $foreground 30%;
+ }
+ & .-active {
+ text-style: $block-cursor-text-style;
+ color: $block-cursor-foreground;
+ background: $block-cursor-background;
+ }
+ }
+
+ & > #tabs-scroll {
+ overflow: hidden;
+ }
+
+ #tabs-list {
+ width: auto;
+ }
+ #tabs-list-bar, #tabs-list {
+ width: auto;
+ height: auto;
+ min-width: 100%;
+ overflow: hidden hidden;
+ }
+ &:ansi {
+ #tabs-list {
+ text-style: dim;
+ }
+ & #tabs-list > .-active {
+ text-style: not dim;
+ }
+ &:focus {
+ #tabs-list > .-active {
+ text-style: bold not dim;
+ }
+ }
+ & .underline--bar {
+ color: ansi_bright_blue;
+ background: ansi_default;
+ }
+ & .-active {
+ color: transparent;
+ background: transparent;
+ }
+ }
}
"""
@@ -527,10 +556,12 @@ class Tabs(Widget, can_focus=True):
async def do_remove() -> None:
"""Perform the remove after refresh so the underline bar gets new positions."""
await remove_tab.remove()
- if next_tab is not None:
- self.active = next_tab.id or ""
if not self.query("#tabs-list > Tab"):
self.active = ""
+ elif next_tab is not None:
+ self.active = next_tab.id or ""
+ else:
+ self._highlight_active(animate=False)
return AwaitComplete(do_remove())
diff --git a/contrib/python/textual/textual/widgets/_text_area.py b/contrib/python/textual/textual/widgets/_text_area.py
index 0e7da875433..6540889c6fc 100644
--- a/contrib/python/textual/textual/widgets/_text_area.py
+++ b/contrib/python/textual/textual/widgets/_text_area.py
@@ -91,15 +91,19 @@ class TextArea(ScrollView):
TextArea {
width: 1fr;
height: 1fr;
- border: tall $background;
+ border: tall $border-blurred;
padding: 0 1;
-
+ color: $foreground;
+ background: $surface;
+ & .text-area--cursor {
+ text-style: $input-cursor-text-style;
+ }
& .text-area--gutter {
- color: $text 40%;
+ color: $foreground 40%;
}
& .text-area--cursor-gutter {
- color: $text 60%;
+ color: $foreground 60%;
background: $boost;
text-style: bold;
}
@@ -109,7 +113,7 @@ TextArea {
}
& .text-area--selection {
- background: $accent-lighten-1 40%;
+ background: $input-selection-background;
}
& .text-area--matching-bracket {
@@ -117,13 +121,20 @@ TextArea {
}
&:focus {
- border: tall $accent;
+ border: tall $border;
+ }
+
+ &:ansi {
+ & .text-area--selection {
+ background: transparent;
+ text-style: reverse;
+ }
}
&:dark {
.text-area--cursor {
- color: $text 90%;
- background: $foreground 90%;
+ color: $input-cursor-foreground;
+ background: $input-cursor-background;
}
&.-read-only .text-area--cursor {
background: $warning-darken-1;
@@ -744,7 +755,7 @@ TextArea {
if padding is applied, the colors match."""
self._set_theme(theme)
- def _app_dark_toggled(self) -> None:
+ def _app_theme_changed(self) -> None:
self._set_theme(self._theme.name)
def _set_theme(self, theme: str) -> None:
@@ -1518,8 +1529,8 @@ TextArea {
return gutter_width
def _on_mount(self, event: events.Mount) -> None:
- # When `app.dark` is toggled, reset the theme (since it caches values).
- self.watch(self.app, "dark", self._app_dark_toggled, init=False)
+ # When `app.theme` reactive is changed, reset the theme to clear cached styles.
+ self.watch(self.app, "theme", self._app_theme_changed, init=False)
self.blink_timer = self.set_interval(
0.5,
diff --git a/contrib/python/textual/textual/widgets/_toast.py b/contrib/python/textual/textual/widgets/_toast.py
index 0eb6aa0a2f3..1fc87648ae1 100644
--- a/contrib/python/textual/textual/widgets/_toast.py
+++ b/contrib/python/textual/textual/widgets/_toast.py
@@ -46,18 +46,18 @@ class Toast(Static, inherit_css=False):
visibility: visible;
margin-top: 1;
padding: 1 1;
- background: $panel;
- tint: white 5%;
+ background: $panel-lighten-1;
link-background: initial;
- link-color: $text;
+ link-color: $foreground;
link-style: underline;
- link-background-hover: $accent;
- link-color-hover: $text;
+ link-background-hover: $primary;
+ link-color-hover: $foreground;
link-style-hover: bold not underline;
}
.toast--title {
text-style: bold;
+ color: $foreground;
}
Toast.-information {
@@ -65,7 +65,7 @@ class Toast(Static, inherit_css=False):
}
Toast.-information .toast--title {
- color: $success-darken-1;
+ color: $text-success;
}
Toast.-warning {
@@ -73,7 +73,7 @@ class Toast(Static, inherit_css=False):
}
Toast.-warning .toast--title {
- color: $warning-darken-1;
+ color: $text-warning;
}
Toast.-error {
@@ -81,7 +81,7 @@ class Toast(Static, inherit_css=False):
}
Toast.-error .toast--title {
- color: $error-darken-1;
+ color: $text-error;
}
"""
diff --git a/contrib/python/textual/textual/widgets/_toggle_button.py b/contrib/python/textual/textual/widgets/_toggle_button.py
index 94e12a010a8..34a40d6bea2 100644
--- a/contrib/python/textual/textual/widgets/_toggle_button.py
+++ b/contrib/python/textual/textual/widgets/_toggle_button.py
@@ -55,57 +55,34 @@ class ToggleButton(Static, can_focus=True):
DEFAULT_CSS = """
ToggleButton {
width: auto;
- border: tall transparent;
+ border: tall $border-blurred;
padding: 0 1;
- background: $boost;
- }
-
- ToggleButton:focus {
- border: tall $accent;
- }
+ background: $surface;
- ToggleButton:hover {
- text-style: bold;
- background: $boost;
- }
-
- ToggleButton:focus > .toggle--label {
- text-style: underline;
- }
+ & > .toggle--button {
+ color: $panel-darken-2;
+ background: $panel;
+ }
- /* Base button colors (including in dark mode). */
+ &.-on > .toggle--button {
+ color: $text-success;
+ background: $panel;
+ }
- ToggleButton > .toggle--button {
- color: $background;
- text-style: bold;
- background: $foreground 15%;
- }
-
- ToggleButton:focus > .toggle--button {
- background: $foreground 25%;
- }
-
- ToggleButton.-on > .toggle--button {
- color: $success;
- }
-
- ToggleButton.-on:focus > .toggle--button {
- background: $foreground 25%;
- }
-
- /* Light mode overrides. */
-
- ToggleButton:light > .toggle--button {
- color: $background;
- background: $foreground 10%;
- }
-
- ToggleButton:light:focus > .toggle--button {
- background: $foreground 25%;
- }
-
- ToggleButton:light.-on > .toggle--button {
- color: $primary;
+ &:focus {
+ border: tall $border;
+ background-tint: $foreground 5%;
+ & > .toggle--label {
+ color: $block-cursor-foreground;
+ background: $block-cursor-background;
+ text-style: $block-cursor-text-style;
+ }
+ }
+ &:blur:hover {
+ & > .toggle--label {
+ background: $block-hover-background;
+ }
+ }
}
""" # TODO: https://github.com/Textualize/textual/issues/1780
@@ -189,13 +166,6 @@ class ToggleButton(Static, can_focus=True):
# Grab the button style.
button_style = self.get_component_rich_style("toggle--button")
- # If the button is off, we're going to do a bit of a switcharound to
- # make it look like it's a "cutout".
- if not self.value:
- button_style += Style.from_color(
- self.background_colors[1].rich_color, button_style.bgcolor
- )
-
# Building the style for the side characters. Note that this is
# sensitive to the type of character used, so pay attention to
# BUTTON_LEFT and BUTTON_RIGHT.
@@ -217,9 +187,7 @@ class ToggleButton(Static, can_focus=True):
"""
button = self._button
label = self._label.copy()
- label.stylize_before(
- self.get_component_rich_style("toggle--label", partial=True)
- )
+ label.stylize_before(self.get_component_rich_style("toggle--label"))
spacer = " " if label else ""
return Text.assemble(
*(
diff --git a/contrib/python/textual/textual/widgets/_tooltip.py b/contrib/python/textual/textual/widgets/_tooltip.py
index 2b5b0440c0b..b4247a326aa 100644
--- a/contrib/python/textual/textual/widgets/_tooltip.py
+++ b/contrib/python/textual/textual/widgets/_tooltip.py
@@ -9,7 +9,7 @@ class Tooltip(Static, inherit_css=False):
layer: _tooltips;
margin: 1 0;
padding: 1 2;
- background: $background;
+ background: $panel;
width: auto;
height: auto;
constrain: inside inflect;
diff --git a/contrib/python/textual/textual/widgets/_tree.py b/contrib/python/textual/textual/widgets/_tree.py
index f73dd8515c0..79c64be2244 100644
--- a/contrib/python/textual/textual/widgets/_tree.py
+++ b/contrib/python/textual/textual/widgets/_tree.py
@@ -581,70 +581,67 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True):
DEFAULT_CSS = """
Tree {
- background: $panel;
- color: $text;
+ background: $surface;
+ color: $foreground;
- & > .tree--label {
-
- }
+ & > .tree--label {}
& > .tree--guides {
- color: $success-darken-3;
+ color: $surface-lighten-2;
}
& > .tree--guides-hover {
- color: $success;
- text-style: bold;
+ color: $surface-lighten-2;
}
& > .tree--guides-selected {
- color: $warning;
- text-style: bold;
+ color: $block-cursor-blurred-background;
}
& > .tree--cursor {
- background: $secondary-darken-2;
- color: $text;
- text-style: bold;
- }
- &:focus > .tree--cursor {
- background: $secondary;
- }
- & > .tree--highlight {
- text-style: underline;
+ text-style: $block-cursor-blurred-text-style;
+ background: $block-cursor-blurred-background;
}
+ & > .tree--highlight {}
& > .tree--highlight-line {
- background: $boost;
+ background: $block-hover-background;
}
- &.-ansi {
- background: ansi_default;
- color: ansi_default;
+ &:focus {
+ background-tint: $foreground 5%;
+ & > .tree--cursor {
+ color: $block-cursor-foreground;
+ background: $block-cursor-background;
+ text-style: $block-cursor-text-style;
+ }
& > .tree--guides {
- color: green;
+ color: $surface-lighten-3;
}
& > .tree--guides-hover {
- color: ansi_blue;
-
+ color: $surface-lighten-3;
}
& > .tree--guides-selected {
- color: ansi_bright_blue;
-
+ color: $block-cursor-background;
}
- & > .tree--cursor {
- background: ansi_bright_blue;
- color: ansi_default;
- text-style: none;
+ }
+
+ &:light {
+ /* In light mode the guides are darker*/
+ & > .tree--guides {
+ color: $surface-darken-1;
}
- &:nocolor > .tree--cursor{
- text-style: reverse;
+ & > .tree--guides-hover {
+ color: $block-cursor-background;
}
- &:focus > .tree--cursor {
- background: ansi_bright_blue;
+ & > .tree--guides-selected {
+ color: $block-cursor-background;
}
- & > .tree--highlight {
- text-style: underline;
+ }
+
+ &:ansi {
+ color: ansi_default;
+ & > .tree--guides {
+ color: ansi_green;
}
- & > .tree--highlight-line {
- background: ansi_default;
+ &:nocolor > .tree--cursor{
+ text-style: reverse;
}
-
}
}
@@ -788,6 +785,52 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True):
super().__init__(name=name, id=id, classes=classes, disabled=disabled)
+ def add_json(self, json_data: object, node: TreeNode | None = None) -> None:
+ """Adds JSON data to a node.
+
+ Args:
+ json_data: An object decoded from JSON.
+ node: Node to add data to.
+
+ """
+
+ if node is None:
+ node = self.root
+
+ from rich.highlighter import ReprHighlighter
+
+ highlighter = ReprHighlighter()
+
+ def add_node(name: str, node: TreeNode, data: object) -> None:
+ """Adds a node to the tree.
+
+ Args:
+ name: Name of the node.
+ node: Parent node.
+ data: Data associated with the node.
+ """
+ if isinstance(data, dict):
+ node.set_label(Text(f"{{}} {name}"))
+ for key, value in data.items():
+ new_node = node.add("")
+ add_node(key, new_node, value)
+ elif isinstance(data, list):
+ node.set_label(Text(f"[] {name}"))
+ for index, value in enumerate(data):
+ new_node = node.add("")
+ add_node(str(index), new_node, value)
+ else:
+ node.allow_expand = False
+ if name:
+ label = Text.assemble(
+ Text.from_markup(f"[b]{name}[/b]="), highlighter(repr(data))
+ )
+ else:
+ label = Text(repr(data))
+ node.set_label(label)
+
+ add_node("", node, json_data)
+
@property
def cursor_node(self) -> TreeNode[TreeDataType] | None:
"""The currently selected node, or ``None`` if no selection."""
diff --git a/contrib/python/textual/textual/widgets/_welcome.py b/contrib/python/textual/textual/widgets/_welcome.py
index b67c49099dc..9967768afa2 100644
--- a/contrib/python/textual/textual/widgets/_welcome.py
+++ b/contrib/python/textual/textual/widgets/_welcome.py
@@ -41,8 +41,7 @@ class Welcome(Static):
Welcome Container {
padding: 1;
- background: $panel;
- color: $text;
+ color: $foreground;
}
Welcome #text {
diff --git a/contrib/python/textual/ya.make b/contrib/python/textual/ya.make
index 6daf9399112..8a8ef5f7b3b 100644
--- a/contrib/python/textual/ya.make
+++ b/contrib/python/textual/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(0.85.2)
+VERSION(0.86.3)
LICENSE(MIT)
@@ -18,6 +18,7 @@ NO_LINT()
NO_CHECK_IMPORTS(
textual.__main__
textual.demo.__main__
+ textual.demo._project_stargazer_updater
textual.demo.demo_app
textual.demo.home
textual.drivers.win32
@@ -93,6 +94,7 @@ PY_SRCS(
textual/command.py
textual/constants.py
textual/containers.py
+ textual/content.py
textual/coordinate.py
textual/css/__init__.py
textual/css/_error_tools.py
@@ -191,9 +193,11 @@ PY_SRCS(
textual/suggester.py
textual/suggestions.py
textual/system_commands.py
+ textual/theme.py
textual/timer.py
textual/types.py
textual/validation.py
+ textual/visual.py
textual/walk.py
textual/widget.py
textual/widgets/__init__.py
diff --git a/contrib/python/yarl/.yandex_meta/yamaker.yaml b/contrib/python/yarl/.yandex_meta/yamaker.yaml
index 43c6ea60689..b1772ac5e24 100644
--- a/contrib/python/yarl/.yandex_meta/yamaker.yaml
+++ b/contrib/python/yarl/.yandex_meta/yamaker.yaml
@@ -1,2 +1,3 @@
mark_as_cython_c:
+ - yarl/_helpers_c.pyx
- yarl/_quoting_c.pyx
diff --git a/contrib/python/yarl/tests/ya.make b/contrib/python/yarl/tests/ya.make
index f86b0f63800..b93020851f0 100644
--- a/contrib/python/yarl/tests/ya.make
+++ b/contrib/python/yarl/tests/ya.make
@@ -4,20 +4,7 @@ PEERDIR(
contrib/python/yarl
)
-TEST_SRCS(
- test_cache.py
- test_cached_property.py
- test_normalize_path.py
- test_pickle.py
- test_quoting.py
- test_update_query.py
- test_url.py
- test_url_build.py
- test_url_cmp_and_hash.py
- test_url_parsing.py
- test_url_query.py
- test_url_update_netloc.py
-)
+ALL_PYTEST_SRCS()
NO_LINT()
diff --git a/contrib/python/yarl/ya.make b/contrib/python/yarl/ya.make
index 88efe860889..43d5345771f 100644
--- a/contrib/python/yarl/ya.make
+++ b/contrib/python/yarl/ya.make
@@ -26,9 +26,8 @@ PY_SRCS(
yarl/_quoting_py.py
yarl/_url.py
CYTHON_C
- yarl/_quoting_c.pyx
- CYTHON_CPP
yarl/_helpers_c.pyx
+ yarl/_quoting_c.pyx
)
RESOURCE_FILES(