summaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
authorAlexSm <[email protected]>2024-06-24 12:43:27 +0200
committerGitHub <[email protected]>2024-06-24 12:43:27 +0200
commit0bcb6b0e6446849a342ef3b0bc867b03727e1925 (patch)
treeca4d0b149a5d79a0618cbcdd29d399dc6d34075d /contrib/python
parentb89687a6e9b539740ece5caa71e9da0e34763acd (diff)
parente69e39a7ca99675469d1bc3718a71491ecb1db5c (diff)
Merge pull request #5828 from ydb-platform/mergelibs-240621-1318
Library import 240621-1318
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/clickhouse-connect/.dist-info/METADATA2
-rw-r--r--contrib/python/clickhouse-connect/clickhouse_connect/__version__.py2
-rw-r--r--contrib/python/clickhouse-connect/clickhouse_connect/datatypes/string.py5
-rw-r--r--contrib/python/clickhouse-connect/ya.make2
-rw-r--r--contrib/python/docker/.dist-info/METADATA122
-rw-r--r--contrib/python/docker/.dist-info/top_level.txt1
-rw-r--r--contrib/python/docker/LICENSE191
-rw-r--r--contrib/python/docker/README.md76
-rw-r--r--contrib/python/docker/docker/__init__.py7
-rw-r--r--contrib/python/docker/docker/_version.py16
-rw-r--r--contrib/python/docker/docker/api/__init__.py1
-rw-r--r--contrib/python/docker/docker/api/build.py382
-rw-r--r--contrib/python/docker/docker/api/client.py536
-rw-r--r--contrib/python/docker/docker/api/config.py92
-rw-r--r--contrib/python/docker/docker/api/container.py1348
-rw-r--r--contrib/python/docker/docker/api/daemon.py181
-rw-r--r--contrib/python/docker/docker/api/exec_api.py176
-rw-r--r--contrib/python/docker/docker/api/image.py601
-rw-r--r--contrib/python/docker/docker/api/network.py277
-rw-r--r--contrib/python/docker/docker/api/plugin.py261
-rw-r--r--contrib/python/docker/docker/api/secret.py98
-rw-r--r--contrib/python/docker/docker/api/service.py486
-rw-r--r--contrib/python/docker/docker/api/swarm.py462
-rw-r--r--contrib/python/docker/docker/api/volume.py163
-rw-r--r--contrib/python/docker/docker/auth.py378
-rw-r--r--contrib/python/docker/docker/client.py222
-rw-r--r--contrib/python/docker/docker/constants.py45
-rw-r--r--contrib/python/docker/docker/context/__init__.py2
-rw-r--r--contrib/python/docker/docker/context/api.py206
-rw-r--r--contrib/python/docker/docker/context/config.py81
-rw-r--r--contrib/python/docker/docker/context/context.py249
-rw-r--r--contrib/python/docker/docker/credentials/__init__.py8
-rw-r--r--contrib/python/docker/docker/credentials/constants.py4
-rw-r--r--contrib/python/docker/docker/credentials/errors.py17
-rw-r--r--contrib/python/docker/docker/credentials/store.py93
-rw-r--r--contrib/python/docker/docker/credentials/utils.py10
-rw-r--r--contrib/python/docker/docker/errors.py209
-rw-r--r--contrib/python/docker/docker/models/__init__.py0
-rw-r--r--contrib/python/docker/docker/models/configs.py70
-rw-r--r--contrib/python/docker/docker/models/containers.py1197
-rw-r--r--contrib/python/docker/docker/models/images.py505
-rw-r--r--contrib/python/docker/docker/models/networks.py218
-rw-r--r--contrib/python/docker/docker/models/nodes.py107
-rw-r--r--contrib/python/docker/docker/models/plugins.py206
-rw-r--r--contrib/python/docker/docker/models/resource.py92
-rw-r--r--contrib/python/docker/docker/models/secrets.py70
-rw-r--r--contrib/python/docker/docker/models/services.py390
-rw-r--r--contrib/python/docker/docker/models/swarm.py190
-rw-r--r--contrib/python/docker/docker/models/volumes.py99
-rw-r--r--contrib/python/docker/docker/tls.py67
-rw-r--r--contrib/python/docker/docker/transport/__init__.py12
-rw-r--r--contrib/python/docker/docker/transport/basehttpadapter.py13
-rw-r--r--contrib/python/docker/docker/transport/npipeconn.py102
-rw-r--r--contrib/python/docker/docker/transport/npipesocket.py230
-rw-r--r--contrib/python/docker/docker/transport/sshconn.py250
-rw-r--r--contrib/python/docker/docker/transport/unixconn.py86
-rw-r--r--contrib/python/docker/docker/types/__init__.py24
-rw-r--r--contrib/python/docker/docker/types/base.py4
-rw-r--r--contrib/python/docker/docker/types/containers.py790
-rw-r--r--contrib/python/docker/docker/types/daemon.py71
-rw-r--r--contrib/python/docker/docker/types/healthcheck.py88
-rw-r--r--contrib/python/docker/docker/types/networks.py128
-rw-r--r--contrib/python/docker/docker/types/services.py867
-rw-r--r--contrib/python/docker/docker/types/swarm.py119
-rw-r--r--contrib/python/docker/docker/utils/__init__.py28
-rw-r--r--contrib/python/docker/docker/utils/build.py260
-rw-r--r--contrib/python/docker/docker/utils/config.py66
-rw-r--r--contrib/python/docker/docker/utils/decorators.py45
-rw-r--r--contrib/python/docker/docker/utils/fnmatch.py115
-rw-r--r--contrib/python/docker/docker/utils/json_stream.py74
-rw-r--r--contrib/python/docker/docker/utils/ports.py83
-rw-r--r--contrib/python/docker/docker/utils/proxy.py77
-rw-r--r--contrib/python/docker/docker/utils/socket.py187
-rw-r--r--contrib/python/docker/docker/utils/utils.py517
-rw-r--r--contrib/python/docker/docker/version.py8
-rw-r--r--contrib/python/docker/ya.make99
-rw-r--r--contrib/python/google-auth/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/google-auth/py3/google/auth/external_account.py8
-rw-r--r--contrib/python/google-auth/py3/google/auth/iam.py21
-rw-r--r--contrib/python/google-auth/py3/google/auth/identity_pool.py2
-rw-r--r--contrib/python/google-auth/py3/google/auth/impersonated_credentials.py29
-rw-r--r--contrib/python/google-auth/py3/google/auth/pluggable.py2
-rw-r--r--contrib/python/google-auth/py3/google/auth/py.typed2
-rw-r--r--contrib/python/google-auth/py3/google/auth/transport/_custom_tls_signer.py20
-rw-r--r--contrib/python/google-auth/py3/google/auth/transport/requests.py13
-rw-r--r--contrib/python/google-auth/py3/google/auth/version.py2
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/_client.py11
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/challenges.py78
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/py.typed2
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/reauth.py1
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/service_account.py7
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/webauthn_handler.py82
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/webauthn_handler_factory.py16
-rw-r--r--contrib/python/google-auth/py3/google/oauth2/webauthn_types.py156
-rw-r--r--contrib/python/google-auth/py3/tests/compute_engine/test_credentials.py4
-rw-r--r--contrib/python/google-auth/py3/tests/oauth2/test__client.py13
-rw-r--r--contrib/python/google-auth/py3/tests/oauth2/test_challenges.py153
-rw-r--r--contrib/python/google-auth/py3/tests/oauth2/test_service_account.py29
-rw-r--r--contrib/python/google-auth/py3/tests/oauth2/test_webauthn_handler.py148
-rw-r--r--contrib/python/google-auth/py3/tests/oauth2/test_webauthn_handler_factory.py29
-rw-r--r--contrib/python/google-auth/py3/tests/oauth2/test_webauthn_types.py237
-rw-r--r--contrib/python/google-auth/py3/tests/test_aws.py33
-rw-r--r--contrib/python/google-auth/py3/tests/test_identity_pool.py33
-rw-r--r--contrib/python/google-auth/py3/tests/transport/test__custom_tls_signer.py2
-rw-r--r--contrib/python/google-auth/py3/tests/transport/test_requests.py35
-rw-r--r--contrib/python/google-auth/py3/ya.make7
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/core.py32
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py14
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py6
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py51
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/escalation.py5
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/scrutineer.py62
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/stateful.py9
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/statistics.py3
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
-rw-r--r--contrib/python/kubernetes/.dist-info/METADATA3
-rw-r--r--contrib/python/kubernetes/README.md6
-rw-r--r--contrib/python/kubernetes/kubernetes/__init__.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/__init__.py55
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/__init__.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/admissionregistration_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/admissionregistration_v1_api.py2470
-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.py2
-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/authentication_v1alpha1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/authentication_v1beta1_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.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/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/flowcontrol_apiserver_v1beta3_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_v1alpha1_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_v1alpha2_api.py3529
-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.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/storage_v1alpha1_api.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/storagemigration_api.py142
-rw-r--r--contrib/python/kubernetes/kubernetes/client/api/storagemigration_v1alpha1_api.py1583
-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.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/exceptions.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/__init__.py51
-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/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/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_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.py151
-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.py152
-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_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_claim_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.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_config_map_key_selector.py6
-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.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_config_map_volume_source.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_container.py2
-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_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.py36
-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_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.py32
-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_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.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_env_var.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_env_var_source.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_ephemeral_container.py2
-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_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.py152
-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_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_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.py2
-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.py7
-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_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_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.py58
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_job_status.py30
-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_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_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.py6
-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.py230
-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.py6
-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.py262
-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_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.py2
-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_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler.py148
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler_features.py122
-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.py32
-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_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.py150
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_param_ref.py204
-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.py6
-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.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_persistent_volume_status.py6
-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.py10
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_anti_affinity.py2
-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_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.py30
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_spec.py14
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_pod_status.py2
-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.py2
-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_policy_rule.py2
-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.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_resource_rule.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.py2
-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.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_secret_key_selector.py6
-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.py6
-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.py30
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_selectable_field.py123
-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_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.py32
-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.py123
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_success_policy_rule.py150
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_sysctl.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_taint.py2
-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.py6
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_type_checking.py122
-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.py228
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding.py202
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_list.py204
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_spec.py202
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_list.py204
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_spec.py286
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_status.py176
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validating_webhook.py6
-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.py207
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_validation_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_variable.py152
-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_device.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_error.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount.py36
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount_status.py208
-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.py2
-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_audit_annotation.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_expression_warning.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_group_version_resource.py178
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address_spec.py7
-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.py236
-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_parent_reference.py12
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_self_subject_review.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_self_subject_review_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_server_storage_version.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_status.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.py7
-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.py228
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_list.py205
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_spec.py149
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_status.py150
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_type_checking.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validation.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_allocation_result.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_driver_allocation_result.py148
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_driver_requests.py178
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_allocation_result.py123
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_attribute.py315
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_filter.py123
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_instance.py151
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_int_slice.py123
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_request.py123
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_resources.py123
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_string_slice.py123
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_consumer_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters.py258
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters_list.py205
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_scheduling_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class.py32
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters.py258
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters_list.py205
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_filter.py148
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_handle.py34
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_request.py148
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_slice.py259
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_slice_list.py205
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_structured_resource_handle.py207
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1alpha2_vendor_parameters.py150
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_audit_annotation.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_expression_warning.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_named_rule_with_operations.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_self_subject_review.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_self_subject_review_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_type_checking.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_validation.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta1_variable.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_exempt_priority_level_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_distinguisher_method.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_group_subject.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_limit_response.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_limited_priority_level_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_non_resource_policy_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_policy_rules_with_subjects.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_condition.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_list.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_reference.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_spec.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_status.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_queuing_configuration.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_resource_policy_rule.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_service_account_subject.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_subject.py2
-rw-r--r--contrib/python/kubernetes/kubernetes/client/models/v1beta3_user_subject.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/kube_config.py26
-rw-r--r--contrib/python/kubernetes/kubernetes/dynamic/client.py5
-rw-r--r--contrib/python/kubernetes/kubernetes/stream/stream.py13
-rw-r--r--contrib/python/kubernetes/kubernetes/stream/ws_client.py29
-rw-r--r--contrib/python/kubernetes/ya.make53
-rw-r--r--contrib/python/prompt-toolkit/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/prompt-toolkit/py3/prompt_toolkit/__init__.py2
-rw-r--r--contrib/python/prompt-toolkit/py3/prompt_toolkit/application/current.py12
-rw-r--r--contrib/python/prompt-toolkit/py3/ya.make2
-rw-r--r--contrib/python/responses/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/responses/py3/responses/__init__.py8
-rw-r--r--contrib/python/responses/py3/responses/matchers.py86
-rw-r--r--contrib/python/responses/py3/ya.make2
-rw-r--r--contrib/python/retry/py2/.dist-info/METADATA184
-rw-r--r--contrib/python/retry/py2/.dist-info/top_level.txt1
-rw-r--r--contrib/python/retry/py2/AUTHORS8
-rw-r--r--contrib/python/retry/py2/LICENSE13
-rw-r--r--contrib/python/retry/py2/README.rst160
-rw-r--r--contrib/python/retry/py2/patches/01-return-retry_call.patch13
-rw-r--r--contrib/python/retry/py2/retry/__init__.py18
-rw-r--r--contrib/python/retry/py2/retry/api.py101
-rw-r--r--contrib/python/retry/py2/retry/compat.py18
-rw-r--r--contrib/python/retry/py2/retry/tests/__init__.py0
-rw-r--r--contrib/python/retry/py2/retry/tests/test_retry.py185
-rw-r--r--contrib/python/retry/py2/tests/ya.make23
-rw-r--r--contrib/python/retry/py2/ya.make35
-rw-r--r--contrib/python/retry/py3/.dist-info/METADATA184
-rw-r--r--contrib/python/retry/py3/.dist-info/top_level.txt1
-rw-r--r--contrib/python/retry/py3/AUTHORS8
-rw-r--r--contrib/python/retry/py3/LICENSE13
-rw-r--r--contrib/python/retry/py3/README.rst160
-rw-r--r--contrib/python/retry/py3/patches/01-return-retry_call.patch13
-rw-r--r--contrib/python/retry/py3/retry/__init__.py18
-rw-r--r--contrib/python/retry/py3/retry/api.py101
-rw-r--r--contrib/python/retry/py3/retry/compat.py18
-rw-r--r--contrib/python/retry/py3/retry/tests/__init__.py0
-rw-r--r--contrib/python/retry/py3/retry/tests/test_retry.py185
-rw-r--r--contrib/python/retry/py3/tests/ya.make23
-rw-r--r--contrib/python/retry/py3/ya.make35
-rw-r--r--contrib/python/retry/ya.make20
-rw-r--r--contrib/python/scipy/py3/ya.make2
-rw-r--r--contrib/python/ydb/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/ydb/py3/ya.make2
-rw-r--r--contrib/python/ydb/py3/ydb/aio/credentials.py2
-rw-r--r--contrib/python/ydb/py3/ydb/iam/auth.py16
-rw-r--r--contrib/python/ydb/py3/ydb/ydb_version.py2
847 files changed, 35267 insertions, 919 deletions
diff --git a/contrib/python/clickhouse-connect/.dist-info/METADATA b/contrib/python/clickhouse-connect/.dist-info/METADATA
index 7b69f6db6d5..a0dc6a83ebe 100644
--- a/contrib/python/clickhouse-connect/.dist-info/METADATA
+++ b/contrib/python/clickhouse-connect/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: clickhouse-connect
-Version: 0.7.11
+Version: 0.7.12
Summary: ClickHouse Database Core Driver for Python, Pandas, and Superset
Home-page: https://github.com/ClickHouse/clickhouse-connect
Author: ClickHouse Inc.
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
index 49289afed2e..03ae4dc075f 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
@@ -1 +1 @@
-version = '0.7.11'
+version = '0.7.12'
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/datatypes/string.py b/contrib/python/clickhouse-connect/clickhouse_connect/datatypes/string.py
index efc04df015e..3cfcd386307 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/datatypes/string.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/datatypes/string.py
@@ -80,6 +80,11 @@ class FixedString(ClickHouseType):
return source.read_fixed_str_col(self.byte_size, num_rows, ctx.encoding or self.encoding )
return source.read_bytes_col(self.byte_size, num_rows)
+ def _finalize_column(self, column: Sequence, ctx: QueryContext) -> Sequence:
+ if ctx.use_extended_dtypes and self.read_format(ctx) == 'string':
+ return pd.array(column, dtype=pd.StringDtype())
+ return column
+
# pylint: disable=too-many-branches,duplicate-code
def _write_column_binary(self, column: Union[Sequence, MutableSequence], dest: bytearray, ctx: InsertContext):
ext = dest.extend
diff --git a/contrib/python/clickhouse-connect/ya.make b/contrib/python/clickhouse-connect/ya.make
index 6957d8ba2bb..35add5741f3 100644
--- a/contrib/python/clickhouse-connect/ya.make
+++ b/contrib/python/clickhouse-connect/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(0.7.11)
+VERSION(0.7.12)
LICENSE(Apache-2.0)
diff --git a/contrib/python/docker/.dist-info/METADATA b/contrib/python/docker/.dist-info/METADATA
new file mode 100644
index 00000000000..90e41721a6f
--- /dev/null
+++ b/contrib/python/docker/.dist-info/METADATA
@@ -0,0 +1,122 @@
+Metadata-Version: 2.3
+Name: docker
+Version: 7.1.0
+Summary: A Python library for the Docker Engine API.
+Project-URL: Changelog, https://docker-py.readthedocs.io/en/stable/change-log.html
+Project-URL: Documentation, https://docker-py.readthedocs.io
+Project-URL: Homepage, https://github.com/docker/docker-py
+Project-URL: Source, https://github.com/docker/docker-py
+Project-URL: Tracker, https://github.com/docker/docker-py/issues
+Maintainer-email: "Docker Inc." <[email protected]>
+License-Expression: Apache-2.0
+License-File: LICENSE
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Other Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.8
+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: Topic :: Software Development
+Classifier: Topic :: Utilities
+Requires-Python: >=3.8
+Requires-Dist: pywin32>=304; sys_platform == 'win32'
+Requires-Dist: requests>=2.26.0
+Requires-Dist: urllib3>=1.26.0
+Provides-Extra: dev
+Requires-Dist: coverage==7.2.7; extra == 'dev'
+Requires-Dist: pytest-cov==4.1.0; extra == 'dev'
+Requires-Dist: pytest-timeout==2.1.0; extra == 'dev'
+Requires-Dist: pytest==7.4.2; extra == 'dev'
+Requires-Dist: ruff==0.1.8; extra == 'dev'
+Provides-Extra: docs
+Requires-Dist: myst-parser==0.18.0; extra == 'docs'
+Requires-Dist: sphinx==5.1.1; extra == 'docs'
+Provides-Extra: ssh
+Requires-Dist: paramiko>=2.4.3; extra == 'ssh'
+Provides-Extra: tls
+Provides-Extra: websockets
+Requires-Dist: websocket-client>=1.3.0; extra == 'websockets'
+Description-Content-Type: text/markdown
+
+# Docker SDK for Python
+
+[![Build Status](https://github.com/docker/docker-py/actions/workflows/ci.yml/badge.svg)](https://github.com/docker/docker-py/actions/workflows/ci.yml)
+
+A Python library for the Docker Engine API. It lets you do anything the `docker` command does, but from within Python apps – run containers, manage containers, manage Swarms, etc.
+
+## Installation
+
+The latest stable version [is available on PyPI](https://pypi.python.org/pypi/docker/). Install with pip:
+
+ pip install docker
+
+> Older versions (< 6.0) required installing `docker[tls]` for SSL/TLS support.
+> This is no longer necessary and is a no-op, but is supported for backwards compatibility.
+
+## Usage
+
+Connect to Docker using the default socket or the configuration in your environment:
+
+```python
+import docker
+client = docker.from_env()
+```
+
+You can run containers:
+
+```python
+>>> client.containers.run("ubuntu:latest", "echo hello world")
+'hello world\n'
+```
+
+You can run containers in the background:
+
+```python
+>>> client.containers.run("bfirsh/reticulate-splines", detach=True)
+<Container '45e6d2de7c54'>
+```
+
+You can manage containers:
+
+```python
+>>> client.containers.list()
+[<Container '45e6d2de7c54'>, <Container 'db18e4f20eaa'>, ...]
+
+>>> container = client.containers.get('45e6d2de7c54')
+
+>>> container.attrs['Config']['Image']
+"bfirsh/reticulate-splines"
+
+>>> container.logs()
+"Reticulating spline 1...\n"
+
+>>> container.stop()
+```
+
+You can stream logs:
+
+```python
+>>> for line in container.logs(stream=True):
+... print(line.strip())
+Reticulating spline 2...
+Reticulating spline 3...
+...
+```
+
+You can manage images:
+
+```python
+>>> client.images.pull('nginx')
+<Image 'nginx'>
+
+>>> client.images.list()
+[<Image 'ubuntu'>, <Image 'nginx'>, ...]
+```
+
+[Read the full documentation](https://docker-py.readthedocs.io) to see everything you can do.
diff --git a/contrib/python/docker/.dist-info/top_level.txt b/contrib/python/docker/.dist-info/top_level.txt
new file mode 100644
index 00000000000..bdb9670965e
--- /dev/null
+++ b/contrib/python/docker/.dist-info/top_level.txt
@@ -0,0 +1 @@
+docker
diff --git a/contrib/python/docker/LICENSE b/contrib/python/docker/LICENSE
new file mode 100644
index 00000000000..75191a4dc71
--- /dev/null
+++ b/contrib/python/docker/LICENSE
@@ -0,0 +1,191 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2016 Docker, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/contrib/python/docker/README.md b/contrib/python/docker/README.md
new file mode 100644
index 00000000000..a6e06a229f3
--- /dev/null
+++ b/contrib/python/docker/README.md
@@ -0,0 +1,76 @@
+# Docker SDK for Python
+
+[![Build Status](https://github.com/docker/docker-py/actions/workflows/ci.yml/badge.svg)](https://github.com/docker/docker-py/actions/workflows/ci.yml)
+
+A Python library for the Docker Engine API. It lets you do anything the `docker` command does, but from within Python apps – run containers, manage containers, manage Swarms, etc.
+
+## Installation
+
+The latest stable version [is available on PyPI](https://pypi.python.org/pypi/docker/). Install with pip:
+
+ pip install docker
+
+> Older versions (< 6.0) required installing `docker[tls]` for SSL/TLS support.
+> This is no longer necessary and is a no-op, but is supported for backwards compatibility.
+
+## Usage
+
+Connect to Docker using the default socket or the configuration in your environment:
+
+```python
+import docker
+client = docker.from_env()
+```
+
+You can run containers:
+
+```python
+>>> client.containers.run("ubuntu:latest", "echo hello world")
+'hello world\n'
+```
+
+You can run containers in the background:
+
+```python
+>>> client.containers.run("bfirsh/reticulate-splines", detach=True)
+<Container '45e6d2de7c54'>
+```
+
+You can manage containers:
+
+```python
+>>> client.containers.list()
+[<Container '45e6d2de7c54'>, <Container 'db18e4f20eaa'>, ...]
+
+>>> container = client.containers.get('45e6d2de7c54')
+
+>>> container.attrs['Config']['Image']
+"bfirsh/reticulate-splines"
+
+>>> container.logs()
+"Reticulating spline 1...\n"
+
+>>> container.stop()
+```
+
+You can stream logs:
+
+```python
+>>> for line in container.logs(stream=True):
+... print(line.strip())
+Reticulating spline 2...
+Reticulating spline 3...
+...
+```
+
+You can manage images:
+
+```python
+>>> client.images.pull('nginx')
+<Image 'nginx'>
+
+>>> client.images.list()
+[<Image 'ubuntu'>, <Image 'nginx'>, ...]
+```
+
+[Read the full documentation](https://docker-py.readthedocs.io) to see everything you can do.
diff --git a/contrib/python/docker/docker/__init__.py b/contrib/python/docker/docker/__init__.py
new file mode 100644
index 00000000000..fb7a5e921ad
--- /dev/null
+++ b/contrib/python/docker/docker/__init__.py
@@ -0,0 +1,7 @@
+from .api import APIClient
+from .client import DockerClient, from_env
+from .context import Context, ContextAPI
+from .tls import TLSConfig
+from .version import __version__
+
+__title__ = 'docker'
diff --git a/contrib/python/docker/docker/_version.py b/contrib/python/docker/docker/_version.py
new file mode 100644
index 00000000000..32913e53d55
--- /dev/null
+++ b/contrib/python/docker/docker/_version.py
@@ -0,0 +1,16 @@
+# file generated by setuptools_scm
+# don't change, don't track in version control
+TYPE_CHECKING = False
+if TYPE_CHECKING:
+ from typing import Tuple, Union
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
+else:
+ VERSION_TUPLE = object
+
+version: str
+__version__: str
+__version_tuple__: VERSION_TUPLE
+version_tuple: VERSION_TUPLE
+
+__version__ = version = '7.1.0'
+__version_tuple__ = version_tuple = (7, 1, 0)
diff --git a/contrib/python/docker/docker/api/__init__.py b/contrib/python/docker/docker/api/__init__.py
new file mode 100644
index 00000000000..7260e9537e1
--- /dev/null
+++ b/contrib/python/docker/docker/api/__init__.py
@@ -0,0 +1 @@
+from .client import APIClient
diff --git a/contrib/python/docker/docker/api/build.py b/contrib/python/docker/docker/api/build.py
new file mode 100644
index 00000000000..47216a58fd4
--- /dev/null
+++ b/contrib/python/docker/docker/api/build.py
@@ -0,0 +1,382 @@
+import json
+import logging
+import os
+import random
+
+from .. import auth, constants, errors, utils
+
+log = logging.getLogger(__name__)
+
+
+class BuildApiMixin:
+ def build(self, path=None, tag=None, quiet=False, fileobj=None,
+ nocache=False, rm=False, timeout=None,
+ custom_context=False, encoding=None, pull=False,
+ forcerm=False, dockerfile=None, container_limits=None,
+ decode=False, buildargs=None, gzip=False, shmsize=None,
+ labels=None, cache_from=None, target=None, network_mode=None,
+ squash=None, extra_hosts=None, platform=None, isolation=None,
+ use_config_proxy=True):
+ """
+ Similar to the ``docker build`` command. Either ``path`` or ``fileobj``
+ needs to be set. ``path`` can be a local path (to a directory
+ containing a Dockerfile) or a remote URL. ``fileobj`` must be a
+ readable file-like object to a Dockerfile.
+
+ If you have a tar file for the Docker build context (including a
+ Dockerfile) already, pass a readable file-like object to ``fileobj``
+ and also pass ``custom_context=True``. If the stream is compressed
+ also, set ``encoding`` to the correct value (e.g ``gzip``).
+
+ Example:
+ >>> from io import BytesIO
+ >>> from docker import APIClient
+ >>> dockerfile = '''
+ ... # Shared Volume
+ ... FROM busybox:buildroot-2014.02
+ ... VOLUME /data
+ ... CMD ["/bin/sh"]
+ ... '''
+ >>> f = BytesIO(dockerfile.encode('utf-8'))
+ >>> cli = APIClient(base_url='tcp://127.0.0.1:2375')
+ >>> response = [line for line in cli.build(
+ ... fileobj=f, rm=True, tag='yourname/volume'
+ ... )]
+ >>> response
+ ['{"stream":" ---\\u003e a9eb17255234\\n"}',
+ '{"stream":"Step 1 : VOLUME /data\\n"}',
+ '{"stream":" ---\\u003e Running in abdc1e6896c6\\n"}',
+ '{"stream":" ---\\u003e 713bca62012e\\n"}',
+ '{"stream":"Removing intermediate container abdc1e6896c6\\n"}',
+ '{"stream":"Step 2 : CMD [\\"/bin/sh\\"]\\n"}',
+ '{"stream":" ---\\u003e Running in dba30f2a1a7e\\n"}',
+ '{"stream":" ---\\u003e 032b8b2855fc\\n"}',
+ '{"stream":"Removing intermediate container dba30f2a1a7e\\n"}',
+ '{"stream":"Successfully built 032b8b2855fc\\n"}']
+
+ Args:
+ path (str): Path to the directory containing the Dockerfile
+ fileobj: A file object to use as the Dockerfile. (Or a file-like
+ object)
+ tag (str): A tag to add to the final image
+ quiet (bool): Whether to return the status
+ nocache (bool): Don't use the cache when set to ``True``
+ rm (bool): Remove intermediate containers. The ``docker build``
+ command now defaults to ``--rm=true``, but we have kept the old
+ default of `False` to preserve backward compatibility
+ timeout (int): HTTP timeout
+ custom_context (bool): Optional if using ``fileobj``
+ encoding (str): The encoding for a stream. Set to ``gzip`` for
+ compressing
+ pull (bool): Downloads any updates to the FROM image in Dockerfiles
+ forcerm (bool): Always remove intermediate containers, even after
+ unsuccessful builds
+ dockerfile (str): path within the build context to the Dockerfile
+ gzip (bool): If set to ``True``, gzip compression/encoding is used
+ buildargs (dict): A dictionary of build arguments
+ container_limits (dict): A dictionary of limits applied to each
+ container created by the build process. Valid keys:
+
+ - memory (int): set memory limit for build
+ - memswap (int): Total memory (memory + swap), -1 to disable
+ swap
+ - cpushares (int): CPU shares (relative weight)
+ - cpusetcpus (str): CPUs in which to allow execution, e.g.,
+ ``"0-3"``, ``"0,1"``
+ decode (bool): If set to ``True``, the returned stream will be
+ decoded into dicts on the fly. Default ``False``
+ shmsize (int): Size of `/dev/shm` in bytes. The size must be
+ greater than 0. If omitted the system uses 64MB
+ labels (dict): A dictionary of labels to set on the image
+ cache_from (:py:class:`list`): A list of images used for build
+ cache resolution
+ target (str): Name of the build-stage to build in a multi-stage
+ Dockerfile
+ network_mode (str): networking mode for the run commands during
+ build
+ squash (bool): Squash the resulting images layers into a
+ single layer.
+ extra_hosts (dict): Extra hosts to add to /etc/hosts in building
+ containers, as a mapping of hostname to IP address.
+ platform (str): Platform in the format ``os[/arch[/variant]]``
+ isolation (str): Isolation technology used during build.
+ Default: `None`.
+ use_config_proxy (bool): If ``True``, and if the docker client
+ configuration file (``~/.docker/config.json`` by default)
+ contains a proxy configuration, the corresponding environment
+ variables will be set in the container being built.
+
+ Returns:
+ A generator for the build output.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ ``TypeError``
+ If neither ``path`` nor ``fileobj`` is specified.
+ """
+ remote = context = None
+ headers = {}
+ container_limits = container_limits or {}
+ buildargs = buildargs or {}
+ if path is None and fileobj is None:
+ raise TypeError("Either path or fileobj needs to be provided.")
+ if gzip and encoding is not None:
+ raise errors.DockerException(
+ 'Can not use custom encoding if gzip is enabled'
+ )
+ if tag is not None:
+ if not utils.match_tag(tag):
+ raise errors.DockerException(
+ f"invalid tag '{tag}': invalid reference format"
+ )
+ for key in container_limits.keys():
+ if key not in constants.CONTAINER_LIMITS_KEYS:
+ raise errors.DockerException(
+ f"invalid tag '{tag}': invalid reference format"
+ )
+ if custom_context:
+ if not fileobj:
+ raise TypeError("You must specify fileobj with custom_context")
+ context = fileobj
+ elif fileobj is not None:
+ context = utils.mkbuildcontext(fileobj)
+ elif path.startswith(('http://', 'https://',
+ 'git://', 'github.com/', 'git@')):
+ remote = path
+ elif not os.path.isdir(path):
+ raise TypeError("You must specify a directory to build in path")
+ else:
+ dockerignore = os.path.join(path, '.dockerignore')
+ exclude = None
+ if os.path.exists(dockerignore):
+ with open(dockerignore) as f:
+ exclude = list(filter(
+ lambda x: x != '' and x[0] != '#',
+ [line.strip() for line in f.read().splitlines()]
+ ))
+ dockerfile = process_dockerfile(dockerfile, path)
+ context = utils.tar(
+ path, exclude=exclude, dockerfile=dockerfile, gzip=gzip
+ )
+ encoding = 'gzip' if gzip else encoding
+
+ u = self._url('/build')
+ params = {
+ 't': tag,
+ 'remote': remote,
+ 'q': quiet,
+ 'nocache': nocache,
+ 'rm': rm,
+ 'forcerm': forcerm,
+ 'pull': pull,
+ 'dockerfile': dockerfile,
+ }
+ params.update(container_limits)
+
+ if use_config_proxy:
+ proxy_args = self._proxy_configs.get_environment()
+ for k, v in proxy_args.items():
+ buildargs.setdefault(k, v)
+ if buildargs:
+ params.update({'buildargs': json.dumps(buildargs)})
+
+ if shmsize:
+ if utils.version_gte(self._version, '1.22'):
+ params.update({'shmsize': shmsize})
+ else:
+ raise errors.InvalidVersion(
+ 'shmsize was only introduced in API version 1.22'
+ )
+
+ if labels:
+ if utils.version_gte(self._version, '1.23'):
+ params.update({'labels': json.dumps(labels)})
+ else:
+ raise errors.InvalidVersion(
+ 'labels was only introduced in API version 1.23'
+ )
+
+ if cache_from:
+ if utils.version_gte(self._version, '1.25'):
+ params.update({'cachefrom': json.dumps(cache_from)})
+ else:
+ raise errors.InvalidVersion(
+ 'cache_from was only introduced in API version 1.25'
+ )
+
+ if target:
+ if utils.version_gte(self._version, '1.29'):
+ params.update({'target': target})
+ else:
+ raise errors.InvalidVersion(
+ 'target was only introduced in API version 1.29'
+ )
+
+ if network_mode:
+ if utils.version_gte(self._version, '1.25'):
+ params.update({'networkmode': network_mode})
+ else:
+ raise errors.InvalidVersion(
+ 'network_mode was only introduced in API version 1.25'
+ )
+
+ if squash:
+ if utils.version_gte(self._version, '1.25'):
+ params.update({'squash': squash})
+ else:
+ raise errors.InvalidVersion(
+ 'squash was only introduced in API version 1.25'
+ )
+
+ if extra_hosts is not None:
+ if utils.version_lt(self._version, '1.27'):
+ raise errors.InvalidVersion(
+ 'extra_hosts was only introduced in API version 1.27'
+ )
+
+ if isinstance(extra_hosts, dict):
+ extra_hosts = utils.format_extra_hosts(extra_hosts)
+ params.update({'extrahosts': extra_hosts})
+
+ if platform is not None:
+ if utils.version_lt(self._version, '1.32'):
+ raise errors.InvalidVersion(
+ 'platform was only introduced in API version 1.32'
+ )
+ params['platform'] = platform
+
+ if isolation is not None:
+ if utils.version_lt(self._version, '1.24'):
+ raise errors.InvalidVersion(
+ 'isolation was only introduced in API version 1.24'
+ )
+ params['isolation'] = isolation
+
+ if context is not None:
+ headers = {'Content-Type': 'application/tar'}
+ if encoding:
+ headers['Content-Encoding'] = encoding
+
+ self._set_auth_headers(headers)
+
+ response = self._post(
+ u,
+ data=context,
+ params=params,
+ headers=headers,
+ stream=True,
+ timeout=timeout,
+ )
+
+ if context is not None and not custom_context:
+ context.close()
+
+ return self._stream_helper(response, decode=decode)
+
+ @utils.minimum_version('1.31')
+ def prune_builds(self, filters=None, keep_storage=None, all=None):
+ """
+ Delete the builder cache
+
+ Args:
+ filters (dict): Filters to process on the prune list.
+ Needs Docker API v1.39+
+ Available filters:
+ - dangling (bool): When set to true (or 1), prune only
+ unused and untagged images.
+ - until (str): Can be Unix timestamps, date formatted
+ timestamps, or Go duration strings (e.g. 10m, 1h30m) computed
+ relative to the daemon's local time.
+ keep_storage (int): Amount of disk space in bytes to keep for cache.
+ Needs Docker API v1.39+
+ all (bool): Remove all types of build cache.
+ Needs Docker API v1.39+
+
+ Returns:
+ (dict): A dictionary containing information about the operation's
+ result. The ``SpaceReclaimed`` key indicates the amount of
+ bytes of disk space reclaimed.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url("/build/prune")
+ if (filters, keep_storage, all) != (None, None, None) \
+ and utils.version_lt(self._version, '1.39'):
+ raise errors.InvalidVersion(
+ '`filters`, `keep_storage`, and `all` args are only available '
+ 'for API version > 1.38'
+ )
+ params = {}
+ if filters is not None:
+ params['filters'] = utils.convert_filters(filters)
+ if keep_storage is not None:
+ params['keep-storage'] = keep_storage
+ if all is not None:
+ params['all'] = all
+ return self._result(self._post(url, params=params), True)
+
+ def _set_auth_headers(self, headers):
+ log.debug('Looking for auth config')
+
+ # If we don't have any auth data so far, try reloading the config
+ # file one more time in case anything showed up in there.
+ if not self._auth_configs or self._auth_configs.is_empty:
+ log.debug("No auth config in memory - loading from filesystem")
+ self._auth_configs = auth.load_config(
+ credstore_env=self.credstore_env
+ )
+
+ # Send the full auth configuration (if any exists), since the build
+ # could use any (or all) of the registries.
+ if self._auth_configs:
+ auth_data = self._auth_configs.get_all_credentials()
+
+ # See https://github.com/docker/docker-py/issues/1683
+ if (auth.INDEX_URL not in auth_data and
+ auth.INDEX_NAME in auth_data):
+ auth_data[auth.INDEX_URL] = auth_data.get(auth.INDEX_NAME, {})
+
+ log.debug(
+ "Sending auth config (%s)",
+ ', '.join(repr(k) for k in auth_data),
+ )
+
+ if auth_data:
+ headers['X-Registry-Config'] = auth.encode_header(
+ auth_data
+ )
+ else:
+ log.debug('No auth config found')
+
+
+def process_dockerfile(dockerfile, path):
+ if not dockerfile:
+ return (None, None)
+
+ abs_dockerfile = dockerfile
+ if not os.path.isabs(dockerfile):
+ abs_dockerfile = os.path.join(path, dockerfile)
+ if constants.IS_WINDOWS_PLATFORM and path.startswith(
+ constants.WINDOWS_LONGPATH_PREFIX):
+ normpath = os.path.normpath(
+ abs_dockerfile[len(constants.WINDOWS_LONGPATH_PREFIX):])
+ abs_dockerfile = f'{constants.WINDOWS_LONGPATH_PREFIX}{normpath}'
+ if (os.path.splitdrive(path)[0] != os.path.splitdrive(abs_dockerfile)[0] or
+ os.path.relpath(abs_dockerfile, path).startswith('..')):
+ # Dockerfile not in context - read data to insert into tar later
+ with open(abs_dockerfile) as df:
+ return (
+ f'.dockerfile.{random.getrandbits(160):x}',
+ df.read()
+ )
+
+ # Dockerfile is inside the context - return path relative to context root
+ if dockerfile == abs_dockerfile:
+ # Only calculate relpath if necessary to avoid errors
+ # on Windows client -> Linux Docker
+ # see https://github.com/docker/compose/issues/5969
+ dockerfile = os.path.relpath(abs_dockerfile, path)
+ return (dockerfile, None)
diff --git a/contrib/python/docker/docker/api/client.py b/contrib/python/docker/docker/api/client.py
new file mode 100644
index 00000000000..45f68bfbf82
--- /dev/null
+++ b/contrib/python/docker/docker/api/client.py
@@ -0,0 +1,536 @@
+import json
+import struct
+import urllib
+from functools import partial
+
+import requests
+import requests.adapters
+import requests.exceptions
+
+from .. import auth
+from ..constants import (
+ DEFAULT_DOCKER_API_VERSION,
+ DEFAULT_MAX_POOL_SIZE,
+ DEFAULT_NUM_POOLS,
+ DEFAULT_NUM_POOLS_SSH,
+ DEFAULT_TIMEOUT_SECONDS,
+ DEFAULT_USER_AGENT,
+ IS_WINDOWS_PLATFORM,
+ MINIMUM_DOCKER_API_VERSION,
+ STREAM_HEADER_SIZE_BYTES,
+)
+from ..errors import (
+ DockerException,
+ InvalidVersion,
+ TLSParameterError,
+ create_api_error_from_http_exception,
+)
+from ..tls import TLSConfig
+from ..transport import UnixHTTPAdapter
+from ..utils import check_resource, config, update_headers, utils
+from ..utils.json_stream import json_stream
+from ..utils.proxy import ProxyConfig
+from ..utils.socket import consume_socket_output, demux_adaptor, frames_iter
+from .build import BuildApiMixin
+from .config import ConfigApiMixin
+from .container import ContainerApiMixin
+from .daemon import DaemonApiMixin
+from .exec_api import ExecApiMixin
+from .image import ImageApiMixin
+from .network import NetworkApiMixin
+from .plugin import PluginApiMixin
+from .secret import SecretApiMixin
+from .service import ServiceApiMixin
+from .swarm import SwarmApiMixin
+from .volume import VolumeApiMixin
+
+try:
+ from ..transport import NpipeHTTPAdapter
+except ImportError:
+ pass
+
+try:
+ from ..transport import SSHHTTPAdapter
+except ImportError:
+ pass
+
+
+class APIClient(
+ requests.Session,
+ BuildApiMixin,
+ ConfigApiMixin,
+ ContainerApiMixin,
+ DaemonApiMixin,
+ ExecApiMixin,
+ ImageApiMixin,
+ NetworkApiMixin,
+ PluginApiMixin,
+ SecretApiMixin,
+ ServiceApiMixin,
+ SwarmApiMixin,
+ VolumeApiMixin):
+ """
+ A low-level client for the Docker Engine API.
+
+ Example:
+
+ >>> import docker
+ >>> client = docker.APIClient(base_url='unix://var/run/docker.sock')
+ >>> client.version()
+ {u'ApiVersion': u'1.33',
+ u'Arch': u'amd64',
+ u'BuildTime': u'2017-11-19T18:46:37.000000000+00:00',
+ u'GitCommit': u'f4ffd2511c',
+ u'GoVersion': u'go1.9.2',
+ u'KernelVersion': u'4.14.3-1-ARCH',
+ u'MinAPIVersion': u'1.12',
+ u'Os': u'linux',
+ u'Version': u'17.10.0-ce'}
+
+ Args:
+ base_url (str): URL to the Docker server. For example,
+ ``unix:///var/run/docker.sock`` or ``tcp://127.0.0.1:1234``.
+ version (str): The version of the API to use. Set to ``auto`` to
+ automatically detect the server's version. Default: ``1.35``
+ timeout (int): Default timeout for API calls, in seconds.
+ tls (bool or :py:class:`~docker.tls.TLSConfig`): Enable TLS. Pass
+ ``True`` to enable it with default options, or pass a
+ :py:class:`~docker.tls.TLSConfig` object to use custom
+ configuration.
+ user_agent (str): Set a custom user agent for requests to the server.
+ credstore_env (dict): Override environment variables when calling the
+ credential store process.
+ use_ssh_client (bool): If set to `True`, an ssh connection is made
+ via shelling out to the ssh client. Ensure the ssh client is
+ installed and configured on the host.
+ max_pool_size (int): The maximum number of connections
+ to save in the pool.
+ """
+
+ __attrs__ = requests.Session.__attrs__ + ['_auth_configs',
+ '_general_configs',
+ '_version',
+ 'base_url',
+ 'timeout']
+
+ def __init__(self, base_url=None, version=None,
+ timeout=DEFAULT_TIMEOUT_SECONDS, tls=False,
+ user_agent=DEFAULT_USER_AGENT, num_pools=None,
+ credstore_env=None, use_ssh_client=False,
+ max_pool_size=DEFAULT_MAX_POOL_SIZE):
+ super().__init__()
+
+ if tls and not base_url:
+ raise TLSParameterError(
+ 'If using TLS, the base_url argument must be provided.'
+ )
+
+ self.base_url = base_url
+ self.timeout = timeout
+ self.headers['User-Agent'] = user_agent
+
+ self._general_configs = config.load_general_config()
+
+ proxy_config = self._general_configs.get('proxies', {})
+ try:
+ proxies = proxy_config[base_url]
+ except KeyError:
+ proxies = proxy_config.get('default', {})
+
+ self._proxy_configs = ProxyConfig.from_dict(proxies)
+
+ self._auth_configs = auth.load_config(
+ config_dict=self._general_configs, credstore_env=credstore_env,
+ )
+ self.credstore_env = credstore_env
+
+ base_url = utils.parse_host(
+ base_url, IS_WINDOWS_PLATFORM, tls=bool(tls)
+ )
+ # SSH has a different default for num_pools to all other adapters
+ num_pools = num_pools or DEFAULT_NUM_POOLS_SSH if \
+ base_url.startswith('ssh://') else DEFAULT_NUM_POOLS
+
+ if base_url.startswith('http+unix://'):
+ self._custom_adapter = UnixHTTPAdapter(
+ base_url, timeout, pool_connections=num_pools,
+ max_pool_size=max_pool_size
+ )
+ self.mount('http+docker://', self._custom_adapter)
+ self._unmount('http://', 'https://')
+ # host part of URL should be unused, but is resolved by requests
+ # module in proxy_bypass_macosx_sysconf()
+ self.base_url = 'http+docker://localhost'
+ elif base_url.startswith('npipe://'):
+ if not IS_WINDOWS_PLATFORM:
+ raise DockerException(
+ 'The npipe:// protocol is only supported on Windows'
+ )
+ try:
+ self._custom_adapter = NpipeHTTPAdapter(
+ base_url, timeout, pool_connections=num_pools,
+ max_pool_size=max_pool_size
+ )
+ except NameError as err:
+ raise DockerException(
+ 'Install pypiwin32 package to enable npipe:// support'
+ ) from err
+ self.mount('http+docker://', self._custom_adapter)
+ self.base_url = 'http+docker://localnpipe'
+ elif base_url.startswith('ssh://'):
+ try:
+ self._custom_adapter = SSHHTTPAdapter(
+ base_url, timeout, pool_connections=num_pools,
+ max_pool_size=max_pool_size, shell_out=use_ssh_client
+ )
+ except NameError as err:
+ raise DockerException(
+ 'Install paramiko package to enable ssh:// support'
+ ) from err
+ self.mount('http+docker://ssh', self._custom_adapter)
+ self._unmount('http://', 'https://')
+ self.base_url = 'http+docker://ssh'
+ else:
+ # Use SSLAdapter for the ability to specify SSL version
+ if isinstance(tls, TLSConfig):
+ tls.configure_client(self)
+ elif tls:
+ self._custom_adapter = requests.adapters.HTTPAdapter(
+ pool_connections=num_pools)
+ self.mount('https://', self._custom_adapter)
+ self.base_url = base_url
+
+ # version detection needs to be after unix adapter mounting
+ if version is None or (isinstance(
+ version,
+ str
+ ) and version.lower() == 'auto'):
+ try:
+ self._version = self._retrieve_server_version()
+ except:
+ self._version = DEFAULT_DOCKER_API_VERSION
+ else:
+ self._version = version
+ if not isinstance(self._version, str):
+ raise DockerException(
+ 'Version parameter must be a string or None. '
+ f'Found {type(version).__name__}'
+ )
+ if utils.version_lt(self._version, MINIMUM_DOCKER_API_VERSION):
+ raise InvalidVersion(
+ f'API versions below {MINIMUM_DOCKER_API_VERSION} are '
+ f'no longer supported by this library.'
+ )
+
+ def _retrieve_server_version(self):
+ try:
+ return self.version(api_version=False)["ApiVersion"]
+ except KeyError as ke:
+ raise DockerException(
+ 'Invalid response from docker daemon: key "ApiVersion"'
+ ' is missing.'
+ ) from ke
+ except Exception as e:
+ raise DockerException(
+ f'Error while fetching server API version: {e}'
+ ) from e
+
+ def _set_request_timeout(self, kwargs):
+ """Prepare the kwargs for an HTTP request by inserting the timeout
+ parameter, if not already present."""
+ kwargs.setdefault('timeout', self.timeout)
+ return kwargs
+
+ @update_headers
+ def _post(self, url, **kwargs):
+ return self.post(url, **self._set_request_timeout(kwargs))
+
+ @update_headers
+ def _get(self, url, **kwargs):
+ return self.get(url, **self._set_request_timeout(kwargs))
+
+ @update_headers
+ def _put(self, url, **kwargs):
+ return self.put(url, **self._set_request_timeout(kwargs))
+
+ @update_headers
+ def _delete(self, url, **kwargs):
+ return self.delete(url, **self._set_request_timeout(kwargs))
+
+ def _url(self, pathfmt, *args, **kwargs):
+ for arg in args:
+ if not isinstance(arg, str):
+ raise ValueError(
+ f'Expected a string but found {arg} ({type(arg)}) instead'
+ )
+
+ quote_f = partial(urllib.parse.quote, safe="/:")
+ args = map(quote_f, args)
+
+ formatted_path = pathfmt.format(*args)
+ if kwargs.get('versioned_api', True):
+ return f'{self.base_url}/v{self._version}{formatted_path}'
+ else:
+ return f'{self.base_url}{formatted_path}'
+
+ def _raise_for_status(self, response):
+ """Raises stored :class:`APIError`, if one occurred."""
+ try:
+ response.raise_for_status()
+ except requests.exceptions.HTTPError as e:
+ raise create_api_error_from_http_exception(e) from e
+
+ def _result(self, response, json=False, binary=False):
+ assert not (json and binary)
+ self._raise_for_status(response)
+
+ if json:
+ return response.json()
+ if binary:
+ return response.content
+ return response.text
+
+ def _post_json(self, url, data, **kwargs):
+ # Go <1.1 can't unserialize null to a string
+ # so we do this disgusting thing here.
+ data2 = {}
+ if data is not None and isinstance(data, dict):
+ for k, v in iter(data.items()):
+ if v is not None:
+ data2[k] = v
+ elif data is not None:
+ data2 = data
+
+ if 'headers' not in kwargs:
+ kwargs['headers'] = {}
+ kwargs['headers']['Content-Type'] = 'application/json'
+ return self._post(url, data=json.dumps(data2), **kwargs)
+
+ def _attach_params(self, override=None):
+ return override or {
+ 'stdout': 1,
+ 'stderr': 1,
+ 'stream': 1
+ }
+
+ @check_resource('container')
+ def _attach_websocket(self, container, params=None):
+ url = self._url("/containers/{0}/attach/ws", container)
+ req = requests.Request("POST", url, params=self._attach_params(params))
+ full_url = req.prepare().url
+ full_url = full_url.replace("http://", "ws://", 1)
+ full_url = full_url.replace("https://", "wss://", 1)
+ return self._create_websocket_connection(full_url)
+
+ def _create_websocket_connection(self, url):
+ try:
+ import websocket
+ return websocket.create_connection(url)
+ except ImportError as ie:
+ raise DockerException(
+ 'The `websocket-client` library is required '
+ 'for using websocket connections. '
+ 'You can install the `docker` library '
+ 'with the [websocket] extra to install it.'
+ ) from ie
+
+ def _get_raw_response_socket(self, response):
+ self._raise_for_status(response)
+ if self.base_url == "http+docker://localnpipe":
+ sock = response.raw._fp.fp.raw.sock
+ elif self.base_url.startswith('http+docker://ssh'):
+ sock = response.raw._fp.fp.channel
+ else:
+ sock = response.raw._fp.fp.raw
+ if self.base_url.startswith("https://"):
+ sock = sock._sock
+ try:
+ # Keep a reference to the response to stop it being garbage
+ # collected. If the response is garbage collected, it will
+ # close TLS sockets.
+ sock._response = response
+ except AttributeError:
+ # UNIX sockets can't have attributes set on them, but that's
+ # fine because we won't be doing TLS over them
+ pass
+
+ return sock
+
+ def _stream_helper(self, response, decode=False):
+ """Generator for data coming from a chunked-encoded HTTP response."""
+
+ if response.raw._fp.chunked:
+ if decode:
+ yield from json_stream(self._stream_helper(response, False))
+ else:
+ reader = response.raw
+ while not reader.closed:
+ # this read call will block until we get a chunk
+ data = reader.read(1)
+ if not data:
+ break
+ if reader._fp.chunk_left:
+ data += reader.read(reader._fp.chunk_left)
+ yield data
+ else:
+ # Response isn't chunked, meaning we probably
+ # encountered an error immediately
+ yield self._result(response, json=decode)
+
+ def _multiplexed_buffer_helper(self, response):
+ """A generator of multiplexed data blocks read from a buffered
+ response."""
+ buf = self._result(response, binary=True)
+ buf_length = len(buf)
+ walker = 0
+ while True:
+ if buf_length - walker < STREAM_HEADER_SIZE_BYTES:
+ break
+ header = buf[walker:walker + STREAM_HEADER_SIZE_BYTES]
+ _, length = struct.unpack_from('>BxxxL', header)
+ start = walker + STREAM_HEADER_SIZE_BYTES
+ end = start + length
+ walker = end
+ yield buf[start:end]
+
+ def _multiplexed_response_stream_helper(self, response):
+ """A generator of multiplexed data blocks coming from a response
+ stream."""
+
+ # Disable timeout on the underlying socket to prevent
+ # Read timed out(s) for long running processes
+ socket = self._get_raw_response_socket(response)
+ self._disable_socket_timeout(socket)
+
+ while True:
+ header = response.raw.read(STREAM_HEADER_SIZE_BYTES)
+ if not header:
+ break
+ _, length = struct.unpack('>BxxxL', header)
+ if not length:
+ continue
+ data = response.raw.read(length)
+ if not data:
+ break
+ yield data
+
+ def _stream_raw_result(self, response, chunk_size=1, decode=True):
+ ''' Stream result for TTY-enabled container and raw binary data'''
+ self._raise_for_status(response)
+
+ # Disable timeout on the underlying socket to prevent
+ # Read timed out(s) for long running processes
+ socket = self._get_raw_response_socket(response)
+ self._disable_socket_timeout(socket)
+
+ yield from response.iter_content(chunk_size, decode)
+
+ def _read_from_socket(self, response, stream, tty=True, demux=False):
+ """Consume all data from the socket, close the response and return the
+ data. If stream=True, then a generator is returned instead and the
+ caller is responsible for closing the response.
+ """
+ socket = self._get_raw_response_socket(response)
+
+ gen = frames_iter(socket, tty)
+
+ if demux:
+ # The generator will output tuples (stdout, stderr)
+ gen = (demux_adaptor(*frame) for frame in gen)
+ else:
+ # The generator will output strings
+ gen = (data for (_, data) in gen)
+
+ if stream:
+ return gen
+ else:
+ try:
+ # Wait for all frames, concatenate them, and return the result
+ return consume_socket_output(gen, demux=demux)
+ finally:
+ response.close()
+
+ def _disable_socket_timeout(self, socket):
+ """ Depending on the combination of python version and whether we're
+ connecting over http or https, we might need to access _sock, which
+ may or may not exist; or we may need to just settimeout on socket
+ itself, which also may or may not have settimeout on it. To avoid
+ missing the correct one, we try both.
+
+ We also do not want to set the timeout if it is already disabled, as
+ you run the risk of changing a socket that was non-blocking to
+ blocking, for example when using gevent.
+ """
+ sockets = [socket, getattr(socket, '_sock', None)]
+
+ for s in sockets:
+ if not hasattr(s, 'settimeout'):
+ continue
+
+ timeout = -1
+
+ if hasattr(s, 'gettimeout'):
+ timeout = s.gettimeout()
+
+ # Don't change the timeout if it is already disabled.
+ if timeout is None or timeout == 0.0:
+ continue
+
+ s.settimeout(None)
+
+ @check_resource('container')
+ def _check_is_tty(self, container):
+ cont = self.inspect_container(container)
+ return cont['Config']['Tty']
+
+ def _get_result(self, container, stream, res):
+ return self._get_result_tty(stream, res, self._check_is_tty(container))
+
+ def _get_result_tty(self, stream, res, is_tty):
+ # We should also use raw streaming (without keep-alives)
+ # if we're dealing with a tty-enabled container.
+ if is_tty:
+ return self._stream_raw_result(res) if stream else \
+ self._result(res, binary=True)
+
+ self._raise_for_status(res)
+ sep = b''
+ if stream:
+ return self._multiplexed_response_stream_helper(res)
+ else:
+ return sep.join(
+ list(self._multiplexed_buffer_helper(res))
+ )
+
+ def _unmount(self, *args):
+ for proto in args:
+ self.adapters.pop(proto)
+
+ def get_adapter(self, url):
+ try:
+ return super().get_adapter(url)
+ except requests.exceptions.InvalidSchema as e:
+ if self._custom_adapter:
+ return self._custom_adapter
+ else:
+ raise e
+
+ @property
+ def api_version(self):
+ return self._version
+
+ def reload_config(self, dockercfg_path=None):
+ """
+ Force a reload of the auth configuration
+
+ Args:
+ dockercfg_path (str): Use a custom path for the Docker config file
+ (default ``$HOME/.docker/config.json`` if present,
+ otherwise ``$HOME/.dockercfg``)
+
+ Returns:
+ None
+ """
+ self._auth_configs = auth.load_config(
+ dockercfg_path, credstore_env=self.credstore_env
+ )
diff --git a/contrib/python/docker/docker/api/config.py b/contrib/python/docker/docker/api/config.py
new file mode 100644
index 00000000000..88c367ec34b
--- /dev/null
+++ b/contrib/python/docker/docker/api/config.py
@@ -0,0 +1,92 @@
+import base64
+
+from .. import utils
+
+
+class ConfigApiMixin:
+ @utils.minimum_version('1.30')
+ def create_config(self, name, data, labels=None, templating=None):
+ """
+ Create a config
+
+ Args:
+ name (string): Name of the config
+ data (bytes): Config data to be stored
+ labels (dict): A mapping of labels to assign to the config
+ templating (dict): dictionary containing the name of the
+ templating driver to be used expressed as
+ { name: <templating_driver_name>}
+
+ Returns (dict): ID of the newly created config
+ """
+ if not isinstance(data, bytes):
+ data = data.encode('utf-8')
+
+ data = base64.b64encode(data)
+ data = data.decode('ascii')
+ body = {
+ 'Data': data,
+ 'Name': name,
+ 'Labels': labels,
+ 'Templating': templating
+ }
+
+ url = self._url('/configs/create')
+ return self._result(
+ self._post_json(url, data=body), True
+ )
+
+ @utils.minimum_version('1.30')
+ @utils.check_resource('id')
+ def inspect_config(self, id):
+ """
+ Retrieve config metadata
+
+ Args:
+ id (string): Full ID of the config to inspect
+
+ Returns (dict): A dictionary of metadata
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ if no config with that ID exists
+ """
+ url = self._url('/configs/{0}', id)
+ return self._result(self._get(url), True)
+
+ @utils.minimum_version('1.30')
+ @utils.check_resource('id')
+ def remove_config(self, id):
+ """
+ Remove a config
+
+ Args:
+ id (string): Full ID of the config to remove
+
+ Returns (boolean): True if successful
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ if no config with that ID exists
+ """
+ url = self._url('/configs/{0}', id)
+ res = self._delete(url)
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.30')
+ def configs(self, filters=None):
+ """
+ List configs
+
+ Args:
+ filters (dict): A map of filters to process on the configs
+ list. Available filters: ``names``
+
+ Returns (list): A list of configs
+ """
+ url = self._url('/configs')
+ params = {}
+ if filters:
+ params['filters'] = utils.convert_filters(filters)
+ return self._result(self._get(url, params=params), True)
diff --git a/contrib/python/docker/docker/api/container.py b/contrib/python/docker/docker/api/container.py
new file mode 100644
index 00000000000..d1b870f9c23
--- /dev/null
+++ b/contrib/python/docker/docker/api/container.py
@@ -0,0 +1,1348 @@
+from datetime import datetime
+
+from .. import errors, utils
+from ..constants import DEFAULT_DATA_CHUNK_SIZE
+from ..types import (
+ CancellableStream,
+ ContainerConfig,
+ EndpointConfig,
+ HostConfig,
+ NetworkingConfig,
+)
+
+
+class ContainerApiMixin:
+ @utils.check_resource('container')
+ def attach(self, container, stdout=True, stderr=True,
+ stream=False, logs=False, demux=False):
+ """
+ Attach to a container.
+
+ The ``.logs()`` function is a wrapper around this method, which you can
+ use instead if you want to fetch/stream container output without first
+ retrieving the entire backlog.
+
+ Args:
+ container (str): The container to attach to.
+ stdout (bool): Include stdout.
+ stderr (bool): Include stderr.
+ stream (bool): Return container output progressively as an iterator
+ of strings, rather than a single string.
+ logs (bool): Include the container's previous output.
+ demux (bool): Keep stdout and stderr separate.
+
+ Returns:
+ By default, the container's output as a single string (two if
+ ``demux=True``: one for stdout and one for stderr).
+
+ If ``stream=True``, an iterator of output strings. If
+ ``demux=True``, two iterators are returned: one for stdout and one
+ for stderr.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {
+ 'logs': logs and 1 or 0,
+ 'stdout': stdout and 1 or 0,
+ 'stderr': stderr and 1 or 0,
+ 'stream': stream and 1 or 0
+ }
+
+ headers = {
+ 'Connection': 'Upgrade',
+ 'Upgrade': 'tcp'
+ }
+
+ u = self._url("/containers/{0}/attach", container)
+ response = self._post(u, headers=headers, params=params, stream=True)
+
+ output = self._read_from_socket(
+ response, stream, self._check_is_tty(container), demux=demux)
+
+ if stream:
+ return CancellableStream(output, response)
+ else:
+ return output
+
+ @utils.check_resource('container')
+ def attach_socket(self, container, params=None, ws=False):
+ """
+ Like ``attach``, but returns the underlying socket-like object for the
+ HTTP request.
+
+ Args:
+ container (str): The container to attach to.
+ params (dict): Dictionary of request parameters (e.g. ``stdout``,
+ ``stderr``, ``stream``).
+ For ``detachKeys``, ~/.docker/config.json is used by default.
+ ws (bool): Use websockets instead of raw HTTP.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if params is None:
+ params = {
+ 'stdout': 1,
+ 'stderr': 1,
+ 'stream': 1
+ }
+
+ if 'detachKeys' not in params \
+ and 'detachKeys' in self._general_configs:
+
+ params['detachKeys'] = self._general_configs['detachKeys']
+
+ if ws:
+ return self._attach_websocket(container, params)
+
+ headers = {
+ 'Connection': 'Upgrade',
+ 'Upgrade': 'tcp'
+ }
+
+ u = self._url("/containers/{0}/attach", container)
+ return self._get_raw_response_socket(
+ self.post(
+ u, None, params=self._attach_params(params), stream=True,
+ headers=headers
+ )
+ )
+
+ @utils.check_resource('container')
+ def commit(self, container, repository=None, tag=None, message=None,
+ author=None, pause=True, changes=None, conf=None):
+ """
+ Commit a container to an image. Similar to the ``docker commit``
+ command.
+
+ Args:
+ container (str): The image hash of the container
+ repository (str): The repository to push the image to
+ tag (str): The tag to push
+ message (str): A commit message
+ author (str): The name of the author
+ pause (bool): Whether to pause the container before committing
+ changes (str): Dockerfile instructions to apply while committing
+ conf (dict): The configuration for the container. See the
+ `Engine API documentation
+ <https://docs.docker.com/reference/api/docker_remote_api/>`_
+ for full details.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {
+ 'container': container,
+ 'repo': repository,
+ 'tag': tag,
+ 'comment': message,
+ 'author': author,
+ 'pause': pause,
+ 'changes': changes
+ }
+ u = self._url("/commit")
+ return self._result(
+ self._post_json(u, data=conf, params=params), json=True
+ )
+
+ def containers(self, quiet=False, all=False, trunc=False, latest=False,
+ since=None, before=None, limit=-1, size=False,
+ filters=None):
+ """
+ List containers. Similar to the ``docker ps`` command.
+
+ Args:
+ quiet (bool): Only display numeric Ids
+ all (bool): Show all containers. Only running containers are shown
+ by default
+ trunc (bool): Truncate output
+ latest (bool): Show only the latest created container, include
+ non-running ones.
+ since (str): Show only containers created since Id or Name, include
+ non-running ones
+ before (str): Show only container created before Id or Name,
+ include non-running ones
+ limit (int): Show `limit` last created containers, include
+ non-running ones
+ size (bool): Display sizes
+ filters (dict): Filters to be processed on the image list.
+ Available filters:
+
+ - `exited` (int): Only containers with specified exit code
+ - `status` (str): One of ``restarting``, ``running``,
+ ``paused``, ``exited``
+ - `label` (str|list): format either ``"key"``, ``"key=value"``
+ or a list of such.
+ - `id` (str): The id of the container.
+ - `name` (str): The name of the container.
+ - `ancestor` (str): Filter by container ancestor. Format of
+ ``<image-name>[:tag]``, ``<image-id>``, or
+ ``<image@digest>``.
+ - `before` (str): Only containers created before a particular
+ container. Give the container name or id.
+ - `since` (str): Only containers created after a particular
+ container. Give container name or id.
+
+ A comprehensive list can be found in the documentation for
+ `docker ps
+ <https://docs.docker.com/engine/reference/commandline/ps>`_.
+
+ Returns:
+ A list of dicts, one per container
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {
+ 'limit': 1 if latest else limit,
+ 'all': 1 if all else 0,
+ 'size': 1 if size else 0,
+ 'trunc_cmd': 1 if trunc else 0,
+ 'since': since,
+ 'before': before
+ }
+ if filters:
+ params['filters'] = utils.convert_filters(filters)
+ u = self._url("/containers/json")
+ res = self._result(self._get(u, params=params), True)
+
+ if quiet:
+ return [{'Id': x['Id']} for x in res]
+ if trunc:
+ for x in res:
+ x['Id'] = x['Id'][:12]
+ return res
+
+ def create_container(self, image, command=None, hostname=None, user=None,
+ detach=False, stdin_open=False, tty=False, ports=None,
+ environment=None, volumes=None,
+ network_disabled=False, name=None, entrypoint=None,
+ working_dir=None, domainname=None, host_config=None,
+ mac_address=None, labels=None, stop_signal=None,
+ networking_config=None, healthcheck=None,
+ stop_timeout=None, runtime=None,
+ use_config_proxy=True, platform=None):
+ """
+ Creates a container. Parameters are similar to those for the ``docker
+ run`` command except it doesn't support the attach options (``-a``).
+
+ The arguments that are passed directly to this function are
+ host-independent configuration options. Host-specific configuration
+ is passed with the `host_config` argument. You'll normally want to
+ use this method in combination with the :py:meth:`create_host_config`
+ method to generate ``host_config``.
+
+ **Port bindings**
+
+ Port binding is done in two parts: first, provide a list of ports to
+ open inside the container with the ``ports`` parameter, then declare
+ bindings with the ``host_config`` parameter. For example:
+
+ .. code-block:: python
+
+ container_id = client.api.create_container(
+ 'busybox', 'ls', ports=[1111, 2222],
+ host_config=client.api.create_host_config(port_bindings={
+ 1111: 4567,
+ 2222: None
+ })
+ )
+
+
+ You can limit the host address on which the port will be exposed like
+ such:
+
+ .. code-block:: python
+
+ client.api.create_host_config(
+ port_bindings={1111: ('127.0.0.1', 4567)}
+ )
+
+ Or without host port assignment:
+
+ .. code-block:: python
+
+ client.api.create_host_config(port_bindings={1111: ('127.0.0.1',)})
+
+ If you wish to use UDP instead of TCP (default), you need to declare
+ ports as such in both the config and host config:
+
+ .. code-block:: python
+
+ container_id = client.api.create_container(
+ 'busybox', 'ls', ports=[(1111, 'udp'), 2222],
+ host_config=client.api.create_host_config(port_bindings={
+ '1111/udp': 4567, 2222: None
+ })
+ )
+
+ To bind multiple host ports to a single container port, use the
+ following syntax:
+
+ .. code-block:: python
+
+ client.api.create_host_config(port_bindings={
+ 1111: [1234, 4567]
+ })
+
+ You can also bind multiple IPs to a single container port:
+
+ .. code-block:: python
+
+ client.api.create_host_config(port_bindings={
+ 1111: [
+ ('192.168.0.100', 1234),
+ ('192.168.0.101', 1234)
+ ]
+ })
+
+ **Using volumes**
+
+ Volume declaration is done in two parts. Provide a list of
+ paths to use as mountpoints inside the container with the
+ ``volumes`` parameter, and declare mappings from paths on the host
+ in the ``host_config`` section.
+
+ .. code-block:: python
+
+ container_id = client.api.create_container(
+ 'busybox', 'ls', volumes=['/mnt/vol1', '/mnt/vol2'],
+ host_config=client.api.create_host_config(binds={
+ '/home/user1/': {
+ 'bind': '/mnt/vol2',
+ 'mode': 'rw',
+ },
+ '/var/www': {
+ 'bind': '/mnt/vol1',
+ 'mode': 'ro',
+ },
+ '/autofs/user1': {
+ 'bind': '/mnt/vol3',
+ 'mode': 'rw',
+ 'propagation': 'shared'
+ }
+ })
+ )
+
+ You can alternatively specify binds as a list. This code is equivalent
+ to the example above:
+
+ .. code-block:: python
+
+ container_id = client.api.create_container(
+ 'busybox', 'ls', volumes=['/mnt/vol1', '/mnt/vol2', '/mnt/vol3'],
+ host_config=client.api.create_host_config(binds=[
+ '/home/user1/:/mnt/vol2',
+ '/var/www:/mnt/vol1:ro',
+ '/autofs/user1:/mnt/vol3:rw,shared',
+ ])
+ )
+
+ **Networking**
+
+ You can specify networks to connect the container to by using the
+ ``networking_config`` parameter. At the time of creation, you can
+ only connect a container to a single networking, but you
+ can create more connections by using
+ :py:meth:`~connect_container_to_network`.
+
+ For example:
+
+ .. code-block:: python
+
+ networking_config = client.api.create_networking_config({
+ 'network1': client.api.create_endpoint_config(
+ ipv4_address='172.28.0.124',
+ aliases=['foo', 'bar'],
+ links=['container2']
+ )
+ })
+
+ ctnr = client.api.create_container(
+ img, command, networking_config=networking_config
+ )
+
+ Args:
+ image (str): The image to run
+ command (str or list): The command to be run in the container
+ hostname (str): Optional hostname for the container
+ user (str or int): Username or UID
+ detach (bool): Detached mode: run container in the background and
+ return container ID
+ stdin_open (bool): Keep STDIN open even if not attached
+ tty (bool): Allocate a pseudo-TTY
+ ports (list of ints): A list of port numbers
+ environment (dict or list): A dictionary or a list of strings in
+ the following format ``["PASSWORD=xxx"]`` or
+ ``{"PASSWORD": "xxx"}``.
+ volumes (str or list): List of paths inside the container to use
+ as volumes.
+ network_disabled (bool): Disable networking
+ name (str): A name for the container
+ entrypoint (str or list): An entrypoint
+ working_dir (str): Path to the working directory
+ domainname (str): The domain name to use for the container
+ host_config (dict): A dictionary created with
+ :py:meth:`create_host_config`.
+ mac_address (str): The Mac Address to assign the container
+ labels (dict or list): A dictionary of name-value labels (e.g.
+ ``{"label1": "value1", "label2": "value2"}``) or a list of
+ names of labels to set with empty values (e.g.
+ ``["label1", "label2"]``)
+ stop_signal (str): The stop signal to use to stop the container
+ (e.g. ``SIGINT``).
+ stop_timeout (int): Timeout to stop the container, in seconds.
+ Default: 10
+ networking_config (dict): A networking configuration generated
+ by :py:meth:`create_networking_config`.
+ runtime (str): Runtime to use with this container.
+ healthcheck (dict): Specify a test to perform to check that the
+ container is healthy.
+ use_config_proxy (bool): If ``True``, and if the docker client
+ configuration file (``~/.docker/config.json`` by default)
+ contains a proxy configuration, the corresponding environment
+ variables will be set in the container being created.
+ platform (str): Platform in the format ``os[/arch[/variant]]``.
+
+ Returns:
+ A dictionary with an image 'Id' key and a 'Warnings' key.
+
+ Raises:
+ :py:class:`docker.errors.ImageNotFound`
+ If the specified image does not exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if isinstance(volumes, str):
+ volumes = [volumes, ]
+
+ if isinstance(environment, dict):
+ environment = utils.utils.format_environment(environment)
+
+ if use_config_proxy:
+ environment = self._proxy_configs.inject_proxy_environment(
+ environment
+ ) or None
+
+ config = self.create_container_config(
+ image, command, hostname, user, detach, stdin_open, tty,
+ ports, environment, volumes,
+ network_disabled, entrypoint, working_dir, domainname,
+ host_config, mac_address, labels,
+ stop_signal, networking_config, healthcheck,
+ stop_timeout, runtime
+ )
+ return self.create_container_from_config(config, name, platform)
+
+ def create_container_config(self, *args, **kwargs):
+ return ContainerConfig(self._version, *args, **kwargs)
+
+ def create_container_from_config(self, config, name=None, platform=None):
+ u = self._url("/containers/create")
+ params = {
+ 'name': name
+ }
+ if platform:
+ if utils.version_lt(self._version, '1.41'):
+ raise errors.InvalidVersion(
+ 'platform is not supported for API version < 1.41'
+ )
+ params['platform'] = platform
+ res = self._post_json(u, data=config, params=params)
+ return self._result(res, True)
+
+ def create_host_config(self, *args, **kwargs):
+ """
+ Create a dictionary for the ``host_config`` argument to
+ :py:meth:`create_container`.
+
+ Args:
+ auto_remove (bool): enable auto-removal of the container on daemon
+ side when the container's process exits.
+ binds (dict): Volumes to bind. See :py:meth:`create_container`
+ for more information.
+ blkio_weight_device: Block IO weight (relative device weight) in
+ the form of: ``[{"Path": "device_path", "Weight": weight}]``.
+ blkio_weight: Block IO weight (relative weight), accepts a weight
+ value between 10 and 1000.
+ cap_add (list of str): Add kernel capabilities. For example,
+ ``["SYS_ADMIN", "MKNOD"]``.
+ cap_drop (list of str): Drop kernel capabilities.
+ cpu_period (int): The length of a CPU period in microseconds.
+ cpu_quota (int): Microseconds of CPU time that the container can
+ get in a CPU period.
+ cpu_shares (int): CPU shares (relative weight).
+ cpuset_cpus (str): CPUs in which to allow execution (``0-3``,
+ ``0,1``).
+ cpuset_mems (str): Memory nodes (MEMs) in which to allow execution
+ (``0-3``, ``0,1``). Only effective on NUMA systems.
+ device_cgroup_rules (:py:class:`list`): A list of cgroup rules to
+ apply to the container.
+ device_read_bps: Limit read rate (bytes per second) from a device
+ in the form of: `[{"Path": "device_path", "Rate": rate}]`
+ device_read_iops: Limit read rate (IO per second) from a device.
+ device_write_bps: Limit write rate (bytes per second) from a
+ device.
+ device_write_iops: Limit write rate (IO per second) from a device.
+ devices (:py:class:`list`): Expose host devices to the container,
+ as a list of strings in the form
+ ``<path_on_host>:<path_in_container>:<cgroup_permissions>``.
+
+ For example, ``/dev/sda:/dev/xvda:rwm`` allows the container
+ to have read-write access to the host's ``/dev/sda`` via a
+ node named ``/dev/xvda`` inside the container.
+ device_requests (:py:class:`list`): Expose host resources such as
+ GPUs to the container, as a list of
+ :py:class:`docker.types.DeviceRequest` instances.
+ dns (:py:class:`list`): Set custom DNS servers.
+ dns_opt (:py:class:`list`): Additional options to be added to the
+ container's ``resolv.conf`` file
+ dns_search (:py:class:`list`): DNS search domains.
+ extra_hosts (dict): Additional hostnames to resolve inside the
+ container, as a mapping of hostname to IP address.
+ group_add (:py:class:`list`): List of additional group names and/or
+ IDs that the container process will run as.
+ init (bool): Run an init inside the container that forwards
+ signals and reaps processes
+ ipc_mode (str): Set the IPC mode for the container.
+ isolation (str): Isolation technology to use. Default: ``None``.
+ links (dict): Mapping of links using the
+ ``{'container': 'alias'}`` format. The alias is optional.
+ Containers declared in this dict will be linked to the new
+ container using the provided alias. Default: ``None``.
+ log_config (LogConfig): Logging configuration
+ lxc_conf (dict): LXC config.
+ mem_limit (float or str): Memory limit. Accepts float values
+ (which represent the memory limit of the created container in
+ bytes) or a string with a units identification char
+ (``100000b``, ``1000k``, ``128m``, ``1g``). If a string is
+ specified without a units character, bytes are assumed as an
+ mem_reservation (float or str): Memory soft limit.
+ mem_swappiness (int): Tune a container's memory swappiness
+ behavior. Accepts number between 0 and 100.
+ memswap_limit (str or int): Maximum amount of memory + swap a
+ container is allowed to consume.
+ mounts (:py:class:`list`): Specification for mounts to be added to
+ the container. More powerful alternative to ``binds``. Each
+ item in the list is expected to be a
+ :py:class:`docker.types.Mount` object.
+ network_mode (str): One of:
+
+ - ``bridge`` Create a new network stack for the container on
+ the bridge network.
+ - ``none`` No networking for this container.
+ - ``container:<name|id>`` Reuse another container's network
+ stack.
+ - ``host`` Use the host network stack.
+ This mode is incompatible with ``port_bindings``.
+
+ oom_kill_disable (bool): Whether to disable OOM killer.
+ oom_score_adj (int): An integer value containing the score given
+ to the container in order to tune OOM killer preferences.
+ pid_mode (str): If set to ``host``, use the host PID namespace
+ inside the container.
+ pids_limit (int): Tune a container's pids limit. Set ``-1`` for
+ unlimited.
+ port_bindings (dict): See :py:meth:`create_container`
+ for more information.
+ Imcompatible with ``host`` in ``network_mode``.
+ privileged (bool): Give extended privileges to this container.
+ publish_all_ports (bool): Publish all ports to the host.
+ read_only (bool): Mount the container's root filesystem as read
+ only.
+ restart_policy (dict): Restart the container when it exits.
+ Configured as a dictionary with keys:
+
+ - ``Name`` One of ``on-failure``, or ``always``.
+ - ``MaximumRetryCount`` Number of times to restart the
+ container on failure.
+ security_opt (:py:class:`list`): A list of string values to
+ customize labels for MLS systems, such as SELinux.
+ shm_size (str or int): Size of /dev/shm (e.g. ``1G``).
+ storage_opt (dict): Storage driver options per container as a
+ key-value mapping.
+ sysctls (dict): Kernel parameters to set in the container.
+ tmpfs (dict): Temporary filesystems to mount, as a dictionary
+ mapping a path inside the container to options for that path.
+
+ For example:
+
+ .. code-block:: python
+
+ {
+ '/mnt/vol2': '',
+ '/mnt/vol1': 'size=3G,uid=1000'
+ }
+
+ ulimits (:py:class:`list`): Ulimits to set inside the container,
+ as a list of :py:class:`docker.types.Ulimit` instances.
+ userns_mode (str): Sets the user namespace mode for the container
+ when user namespace remapping option is enabled. Supported
+ values are: ``host``
+ uts_mode (str): Sets the UTS namespace mode for the container.
+ Supported values are: ``host``
+ volumes_from (:py:class:`list`): List of container names or IDs to
+ get volumes from.
+ runtime (str): Runtime to use with this container.
+
+
+ Returns:
+ (dict) A dictionary which can be passed to the ``host_config``
+ argument to :py:meth:`create_container`.
+
+ Example:
+
+ >>> client.api.create_host_config(
+ ... privileged=True,
+ ... cap_drop=['MKNOD'],
+ ... volumes_from=['nostalgic_newton'],
+ ... )
+ {'CapDrop': ['MKNOD'], 'LxcConf': None, 'Privileged': True,
+ 'VolumesFrom': ['nostalgic_newton'], 'PublishAllPorts': False}
+
+"""
+ if not kwargs:
+ kwargs = {}
+ if 'version' in kwargs:
+ raise TypeError(
+ "create_host_config() got an unexpected "
+ "keyword argument 'version'"
+ )
+ kwargs['version'] = self._version
+ return HostConfig(*args, **kwargs)
+
+ def create_networking_config(self, *args, **kwargs):
+ """
+ Create a networking config dictionary to be used as the
+ ``networking_config`` parameter in :py:meth:`create_container`.
+
+ Args:
+ endpoints_config (dict): A dictionary mapping network names to
+ endpoint configurations generated by
+ :py:meth:`create_endpoint_config`.
+
+ Returns:
+ (dict) A networking config.
+
+ Example:
+
+ >>> client.api.create_network('network1')
+ >>> networking_config = client.api.create_networking_config({
+ 'network1': client.api.create_endpoint_config()
+ })
+ >>> container = client.api.create_container(
+ img, command, networking_config=networking_config
+ )
+
+ """
+ return NetworkingConfig(*args, **kwargs)
+
+ def create_endpoint_config(self, *args, **kwargs):
+ """
+ Create an endpoint config dictionary to be used with
+ :py:meth:`create_networking_config`.
+
+ Args:
+ aliases (:py:class:`list`): A list of aliases for this endpoint.
+ Names in that list can be used within the network to reach the
+ container. Defaults to ``None``.
+ links (dict): Mapping of links for this endpoint using the
+ ``{'container': 'alias'}`` format. The alias is optional.
+ Containers declared in this dict will be linked to this
+ container using the provided alias. Defaults to ``None``.
+ ipv4_address (str): The IP address of this container on the
+ network, using the IPv4 protocol. Defaults to ``None``.
+ ipv6_address (str): The IP address of this container on the
+ network, using the IPv6 protocol. Defaults to ``None``.
+ link_local_ips (:py:class:`list`): A list of link-local (IPv4/IPv6)
+ addresses.
+ driver_opt (dict): A dictionary of options to provide to the
+ network driver. Defaults to ``None``.
+
+ Returns:
+ (dict) An endpoint config.
+
+ Example:
+
+ >>> endpoint_config = client.api.create_endpoint_config(
+ aliases=['web', 'app'],
+ links={'app_db': 'db', 'another': None},
+ ipv4_address='132.65.0.123'
+ )
+
+ """
+ return EndpointConfig(self._version, *args, **kwargs)
+
+ @utils.check_resource('container')
+ def diff(self, container):
+ """
+ Inspect changes on a container's filesystem.
+
+ Args:
+ container (str): The container to diff
+
+ Returns:
+ (list) A list of dictionaries containing the attributes `Path`
+ and `Kind`.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self._result(
+ self._get(self._url("/containers/{0}/changes", container)), True
+ )
+
+ @utils.check_resource('container')
+ def export(self, container, chunk_size=DEFAULT_DATA_CHUNK_SIZE):
+ """
+ Export the contents of a filesystem as a tar archive.
+
+ Args:
+ container (str): The container to export
+ chunk_size (int): The number of bytes returned by each iteration
+ of the generator. If ``None``, data will be streamed as it is
+ received. Default: 2 MB
+
+ Returns:
+ (generator): The archived filesystem data stream
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ res = self._get(
+ self._url("/containers/{0}/export", container), stream=True
+ )
+ return self._stream_raw_result(res, chunk_size, False)
+
+ @utils.check_resource('container')
+ def get_archive(self, container, path, chunk_size=DEFAULT_DATA_CHUNK_SIZE,
+ encode_stream=False):
+ """
+ Retrieve a file or folder from a container in the form of a tar
+ archive.
+
+ Args:
+ container (str): The container where the file is located
+ path (str): Path to the file or folder to retrieve
+ chunk_size (int): The number of bytes returned by each iteration
+ of the generator. If ``None``, data will be streamed as it is
+ received. Default: 2 MB
+ encode_stream (bool): Determines if data should be encoded
+ (gzip-compressed) during transmission. Default: False
+
+ Returns:
+ (tuple): First element is a raw tar data stream. Second element is
+ a dict containing ``stat`` information on the specified ``path``.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> c = docker.APIClient()
+ >>> f = open('./sh_bin.tar', 'wb')
+ >>> bits, stat = c.api.get_archive(container, '/bin/sh')
+ >>> print(stat)
+ {'name': 'sh', 'size': 1075464, 'mode': 493,
+ 'mtime': '2018-10-01T15:37:48-07:00', 'linkTarget': ''}
+ >>> for chunk in bits:
+ ... f.write(chunk)
+ >>> f.close()
+ """
+ params = {
+ 'path': path
+ }
+ headers = {
+ "Accept-Encoding": "gzip, deflate"
+ } if encode_stream else {
+ "Accept-Encoding": "identity"
+ }
+ url = self._url('/containers/{0}/archive', container)
+ res = self._get(url, params=params, stream=True, headers=headers)
+ self._raise_for_status(res)
+ encoded_stat = res.headers.get('x-docker-container-path-stat')
+ return (
+ self._stream_raw_result(res, chunk_size, False),
+ utils.decode_json_header(encoded_stat) if encoded_stat else None
+ )
+
+ @utils.check_resource('container')
+ def inspect_container(self, container):
+ """
+ Identical to the `docker inspect` command, but only for containers.
+
+ Args:
+ container (str): The container to inspect
+
+ Returns:
+ (dict): Similar to the output of `docker inspect`, but as a
+ single dict
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self._result(
+ self._get(self._url("/containers/{0}/json", container)), True
+ )
+
+ @utils.check_resource('container')
+ def kill(self, container, signal=None):
+ """
+ Kill a container or send a signal to a container.
+
+ Args:
+ container (str): The container to kill
+ signal (str or int): The signal to send. Defaults to ``SIGKILL``
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url("/containers/{0}/kill", container)
+ params = {}
+ if signal is not None:
+ if not isinstance(signal, str):
+ signal = int(signal)
+ params['signal'] = signal
+ res = self._post(url, params=params)
+
+ self._raise_for_status(res)
+
+ @utils.check_resource('container')
+ def logs(self, container, stdout=True, stderr=True, stream=False,
+ timestamps=False, tail='all', since=None, follow=None,
+ until=None):
+ """
+ Get logs from a container. Similar to the ``docker logs`` command.
+
+ The ``stream`` parameter makes the ``logs`` function return a blocking
+ generator you can iterate over to retrieve log output as it happens.
+
+ Args:
+ container (str): The container to get logs from
+ stdout (bool): Get ``STDOUT``. Default ``True``
+ stderr (bool): Get ``STDERR``. Default ``True``
+ stream (bool): Stream the response. Default ``False``
+ timestamps (bool): Show timestamps. Default ``False``
+ tail (str or int): Output specified number of lines at the end of
+ logs. Either an integer of number of lines or the string
+ ``all``. Default ``all``
+ since (datetime, int, or float): Show logs since a given datetime,
+ integer epoch (in seconds) or float (in fractional seconds)
+ follow (bool): Follow log output. Default ``False``
+ until (datetime, int, or float): Show logs that occurred before
+ the given datetime, integer epoch (in seconds), or
+ float (in fractional seconds)
+
+ Returns:
+ (generator of bytes or bytes)
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if follow is None:
+ follow = stream
+ params = {'stderr': stderr and 1 or 0,
+ 'stdout': stdout and 1 or 0,
+ 'timestamps': timestamps and 1 or 0,
+ 'follow': follow and 1 or 0,
+ }
+ if tail != 'all' and (not isinstance(tail, int) or tail < 0):
+ tail = 'all'
+ params['tail'] = tail
+
+ if since is not None:
+ if isinstance(since, datetime):
+ params['since'] = utils.datetime_to_timestamp(since)
+ elif (isinstance(since, int) and since > 0):
+ params['since'] = since
+ elif (isinstance(since, float) and since > 0.0):
+ params['since'] = since
+ else:
+ raise errors.InvalidArgument(
+ 'since value should be datetime or positive int/float,'
+ f' not {type(since)}'
+ )
+
+ if until is not None:
+ if utils.version_lt(self._version, '1.35'):
+ raise errors.InvalidVersion(
+ 'until is not supported for API version < 1.35'
+ )
+ if isinstance(until, datetime):
+ params['until'] = utils.datetime_to_timestamp(until)
+ elif (isinstance(until, int) and until > 0):
+ params['until'] = until
+ elif (isinstance(until, float) and until > 0.0):
+ params['until'] = until
+ else:
+ raise errors.InvalidArgument(
+ f'until value should be datetime or positive int/float, '
+ f'not {type(until)}'
+ )
+
+ url = self._url("/containers/{0}/logs", container)
+ res = self._get(url, params=params, stream=stream)
+ output = self._get_result(container, stream, res)
+
+ if stream:
+ return CancellableStream(output, res)
+ else:
+ return output
+
+ @utils.check_resource('container')
+ def pause(self, container):
+ """
+ Pauses all processes within a container.
+
+ Args:
+ container (str): The container to pause
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/containers/{0}/pause', container)
+ res = self._post(url)
+ self._raise_for_status(res)
+
+ @utils.check_resource('container')
+ def port(self, container, private_port):
+ """
+ Lookup the public-facing port that is NAT-ed to ``private_port``.
+ Identical to the ``docker port`` command.
+
+ Args:
+ container (str): The container to look up
+ private_port (int): The private port to inspect
+
+ Returns:
+ (list of dict): The mapping for the host ports
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+ .. code-block:: bash
+
+ $ docker run -d -p 80:80 ubuntu:14.04 /bin/sleep 30
+ 7174d6347063a83f412fad6124c99cffd25ffe1a0807eb4b7f9cec76ac8cb43b
+
+ .. code-block:: python
+
+ >>> client.api.port('7174d6347063', 80)
+ [{'HostIp': '0.0.0.0', 'HostPort': '80'}]
+ """
+ res = self._get(self._url("/containers/{0}/json", container))
+ self._raise_for_status(res)
+ json_ = res.json()
+ private_port = str(private_port)
+ h_ports = None
+
+ # Port settings is None when the container is running with
+ # network_mode=host.
+ port_settings = json_.get('NetworkSettings', {}).get('Ports')
+ if port_settings is None:
+ return None
+
+ if '/' in private_port:
+ return port_settings.get(private_port)
+
+ for protocol in ['tcp', 'udp', 'sctp']:
+ h_ports = port_settings.get(f"{private_port}/{protocol}")
+ if h_ports:
+ break
+
+ return h_ports
+
+ @utils.check_resource('container')
+ def put_archive(self, container, path, data):
+ """
+ Insert a file or folder in an existing container using a tar archive as
+ source.
+
+ Args:
+ container (str): The container where the file(s) will be extracted
+ path (str): Path inside the container where the file(s) will be
+ extracted. Must exist.
+ data (bytes or stream): tar data to be extracted
+
+ Returns:
+ (bool): True if the call succeeds.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {'path': path}
+ url = self._url('/containers/{0}/archive', container)
+ res = self._put(url, params=params, data=data)
+ self._raise_for_status(res)
+ return res.status_code == 200
+
+ @utils.minimum_version('1.25')
+ def prune_containers(self, filters=None):
+ """
+ Delete stopped containers
+
+ Args:
+ filters (dict): Filters to process on the prune list.
+
+ Returns:
+ (dict): A dict containing a list of deleted container IDs and
+ the amount of disk space reclaimed in bytes.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {}
+ if filters:
+ params['filters'] = utils.convert_filters(filters)
+ url = self._url('/containers/prune')
+ return self._result(self._post(url, params=params), True)
+
+ @utils.check_resource('container')
+ def remove_container(self, container, v=False, link=False, force=False):
+ """
+ Remove a container. Similar to the ``docker rm`` command.
+
+ Args:
+ container (str): The container to remove
+ v (bool): Remove the volumes associated with the container
+ link (bool): Remove the specified link and not the underlying
+ container
+ force (bool): Force the removal of a running container (uses
+ ``SIGKILL``)
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {'v': v, 'link': link, 'force': force}
+ res = self._delete(
+ self._url("/containers/{0}", container), params=params
+ )
+ self._raise_for_status(res)
+
+ @utils.check_resource('container')
+ def rename(self, container, name):
+ """
+ Rename a container. Similar to the ``docker rename`` command.
+
+ Args:
+ container (str): ID of the container to rename
+ name (str): New name for the container
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url("/containers/{0}/rename", container)
+ params = {'name': name}
+ res = self._post(url, params=params)
+ self._raise_for_status(res)
+
+ @utils.check_resource('container')
+ def resize(self, container, height, width):
+ """
+ Resize the tty session.
+
+ Args:
+ container (str or dict): The container to resize
+ height (int): Height of tty session
+ width (int): Width of tty session
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {'h': height, 'w': width}
+ url = self._url("/containers/{0}/resize", container)
+ res = self._post(url, params=params)
+ self._raise_for_status(res)
+
+ @utils.check_resource('container')
+ def restart(self, container, timeout=10):
+ """
+ Restart a container. Similar to the ``docker restart`` command.
+
+ Args:
+ container (str or dict): The container to restart. If a dict, the
+ ``Id`` key is used.
+ timeout (int): Number of seconds to try to stop for before killing
+ the container. Once killed it will then be restarted. Default
+ is 10 seconds.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {'t': timeout}
+ url = self._url("/containers/{0}/restart", container)
+ conn_timeout = self.timeout
+ if conn_timeout is not None:
+ conn_timeout += timeout
+ res = self._post(url, params=params, timeout=conn_timeout)
+ self._raise_for_status(res)
+
+ @utils.check_resource('container')
+ def start(self, container, *args, **kwargs):
+ """
+ Start a container. Similar to the ``docker start`` command, but
+ doesn't support attach options.
+
+ **Deprecation warning:** Passing configuration options in ``start`` is
+ no longer supported. Users are expected to provide host config options
+ in the ``host_config`` parameter of
+ :py:meth:`~ContainerApiMixin.create_container`.
+
+
+ Args:
+ container (str): The container to start
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ :py:class:`docker.errors.DeprecatedMethod`
+ If any argument besides ``container`` are provided.
+
+ Example:
+
+ >>> container = client.api.create_container(
+ ... image='busybox:latest',
+ ... command='/bin/sleep 30')
+ >>> client.api.start(container=container.get('Id'))
+ """
+ if args or kwargs:
+ raise errors.DeprecatedMethod(
+ 'Providing configuration in the start() method is no longer '
+ 'supported. Use the host_config param in create_container '
+ 'instead.'
+ )
+ url = self._url("/containers/{0}/start", container)
+ res = self._post(url)
+ self._raise_for_status(res)
+
+ @utils.check_resource('container')
+ def stats(self, container, decode=None, stream=True, one_shot=None):
+ """
+ Stream statistics for a specific container. Similar to the
+ ``docker stats`` command.
+
+ Args:
+ container (str): The container to stream statistics from
+ decode (bool): If set to true, stream will be decoded into dicts
+ on the fly. Only applicable if ``stream`` is True.
+ False by default.
+ stream (bool): If set to false, only the current stats will be
+ returned instead of a stream. True by default.
+ one_shot (bool): If set to true, Only get a single stat instead of
+ waiting for 2 cycles. Must be used with stream=false. False by
+ default.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ """
+ url = self._url("/containers/{0}/stats", container)
+ params = {
+ 'stream': stream
+ }
+ if one_shot is not None:
+ if utils.version_lt(self._version, '1.41'):
+ raise errors.InvalidVersion(
+ 'one_shot is not supported for API version < 1.41'
+ )
+ params['one-shot'] = one_shot
+ if stream:
+ if one_shot:
+ raise errors.InvalidArgument(
+ 'one_shot is only available in conjunction with '
+ 'stream=False'
+ )
+ return self._stream_helper(
+ self._get(url, stream=True, params=params), decode=decode
+ )
+ else:
+ if decode:
+ raise errors.InvalidArgument(
+ "decode is only available in conjunction with stream=True"
+ )
+ return self._result(self._get(url, params=params), json=True)
+
+ @utils.check_resource('container')
+ def stop(self, container, timeout=None):
+ """
+ Stops a container. Similar to the ``docker stop`` command.
+
+ Args:
+ container (str): The container to stop
+ timeout (int): Timeout in seconds to wait for the container to
+ stop before sending a ``SIGKILL``. If None, then the
+ StopTimeout value of the container will be used.
+ Default: None
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if timeout is None:
+ params = {}
+ timeout = 10
+ else:
+ params = {'t': timeout}
+ url = self._url("/containers/{0}/stop", container)
+ conn_timeout = self.timeout
+ if conn_timeout is not None:
+ conn_timeout += timeout
+ res = self._post(url, params=params, timeout=conn_timeout)
+ self._raise_for_status(res)
+
+ @utils.check_resource('container')
+ def top(self, container, ps_args=None):
+ """
+ Display the running processes of a container.
+
+ Args:
+ container (str): The container to inspect
+ ps_args (str): An optional arguments passed to ps (e.g. ``aux``)
+
+ Returns:
+ (str): The output of the top
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ u = self._url("/containers/{0}/top", container)
+ params = {}
+ if ps_args is not None:
+ params['ps_args'] = ps_args
+ return self._result(self._get(u, params=params), True)
+
+ @utils.check_resource('container')
+ def unpause(self, container):
+ """
+ Unpause all processes within a container.
+
+ Args:
+ container (str): The container to unpause
+ """
+ url = self._url('/containers/{0}/unpause', container)
+ res = self._post(url)
+ self._raise_for_status(res)
+
+ @utils.minimum_version('1.22')
+ @utils.check_resource('container')
+ def update_container(
+ self, container, blkio_weight=None, cpu_period=None, cpu_quota=None,
+ cpu_shares=None, cpuset_cpus=None, cpuset_mems=None, mem_limit=None,
+ mem_reservation=None, memswap_limit=None, kernel_memory=None,
+ restart_policy=None
+ ):
+ """
+ Update resource configs of one or more containers.
+
+ Args:
+ container (str): The container to inspect
+ blkio_weight (int): Block IO (relative weight), between 10 and 1000
+ cpu_period (int): Limit CPU CFS (Completely Fair Scheduler) period
+ cpu_quota (int): Limit CPU CFS (Completely Fair Scheduler) quota
+ cpu_shares (int): CPU shares (relative weight)
+ cpuset_cpus (str): CPUs in which to allow execution
+ cpuset_mems (str): MEMs in which to allow execution
+ mem_limit (float or str): Memory limit
+ mem_reservation (float or str): Memory soft limit
+ memswap_limit (int or str): Total memory (memory + swap), -1 to
+ disable swap
+ kernel_memory (int or str): Kernel memory limit
+ restart_policy (dict): Restart policy dictionary
+
+ Returns:
+ (dict): Dictionary containing a ``Warnings`` key.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/containers/{0}/update', container)
+ data = {}
+ if blkio_weight:
+ data['BlkioWeight'] = blkio_weight
+ if cpu_period:
+ data['CpuPeriod'] = cpu_period
+ if cpu_shares:
+ data['CpuShares'] = cpu_shares
+ if cpu_quota:
+ data['CpuQuota'] = cpu_quota
+ if cpuset_cpus:
+ data['CpusetCpus'] = cpuset_cpus
+ if cpuset_mems:
+ data['CpusetMems'] = cpuset_mems
+ if mem_limit:
+ data['Memory'] = utils.parse_bytes(mem_limit)
+ if mem_reservation:
+ data['MemoryReservation'] = utils.parse_bytes(mem_reservation)
+ if memswap_limit:
+ data['MemorySwap'] = utils.parse_bytes(memswap_limit)
+ if kernel_memory:
+ data['KernelMemory'] = utils.parse_bytes(kernel_memory)
+ if restart_policy:
+ if utils.version_lt(self._version, '1.23'):
+ raise errors.InvalidVersion(
+ 'restart policy update is not supported '
+ 'for API version < 1.23'
+ )
+ data['RestartPolicy'] = restart_policy
+
+ res = self._post_json(url, data=data)
+ return self._result(res, True)
+
+ @utils.check_resource('container')
+ def wait(self, container, timeout=None, condition=None):
+ """
+ Block until a container stops, then return its exit code. Similar to
+ the ``docker wait`` command.
+
+ Args:
+ container (str or dict): The container to wait on. If a dict, the
+ ``Id`` key is used.
+ timeout (int): Request timeout
+ condition (str): Wait until a container state reaches the given
+ condition, either ``not-running`` (default), ``next-exit``,
+ or ``removed``
+
+ Returns:
+ (dict): The API's response as a Python dictionary, including
+ the container's exit code under the ``StatusCode`` attribute.
+
+ Raises:
+ :py:class:`requests.exceptions.ReadTimeout`
+ If the timeout is exceeded.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url("/containers/{0}/wait", container)
+ params = {}
+ if condition is not None:
+ if utils.version_lt(self._version, '1.30'):
+ raise errors.InvalidVersion(
+ 'wait condition is not supported for API version < 1.30'
+ )
+ params['condition'] = condition
+
+ res = self._post(url, timeout=timeout, params=params)
+ return self._result(res, True)
diff --git a/contrib/python/docker/docker/api/daemon.py b/contrib/python/docker/docker/api/daemon.py
new file mode 100644
index 00000000000..a8572132651
--- /dev/null
+++ b/contrib/python/docker/docker/api/daemon.py
@@ -0,0 +1,181 @@
+import os
+from datetime import datetime
+
+from .. import auth, types, utils
+
+
+class DaemonApiMixin:
+ @utils.minimum_version('1.25')
+ def df(self):
+ """
+ Get data usage information.
+
+ Returns:
+ (dict): A dictionary representing different resource categories
+ and their respective data usage.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/system/df')
+ return self._result(self._get(url), True)
+
+ def events(self, since=None, until=None, filters=None, decode=None):
+ """
+ Get real-time events from the server. Similar to the ``docker events``
+ command.
+
+ Args:
+ since (UTC datetime or int): Get events from this point
+ until (UTC datetime or int): Get events until this point
+ filters (dict): Filter the events by event time, container or image
+ decode (bool): If set to true, stream will be decoded into dicts on
+ the fly. False by default.
+
+ Returns:
+ A :py:class:`docker.types.daemon.CancellableStream` generator
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> for event in client.events(decode=True)
+ ... print(event)
+ {u'from': u'image/with:tag',
+ u'id': u'container-id',
+ u'status': u'start',
+ u'time': 1423339459}
+ ...
+
+ or
+
+ >>> events = client.events()
+ >>> for event in events:
+ ... print(event)
+ >>> # and cancel from another thread
+ >>> events.close()
+ """
+
+ if isinstance(since, datetime):
+ since = utils.datetime_to_timestamp(since)
+
+ if isinstance(until, datetime):
+ until = utils.datetime_to_timestamp(until)
+
+ if filters:
+ filters = utils.convert_filters(filters)
+
+ params = {
+ 'since': since,
+ 'until': until,
+ 'filters': filters
+ }
+ url = self._url('/events')
+
+ response = self._get(url, params=params, stream=True, timeout=None)
+ stream = self._stream_helper(response, decode=decode)
+
+ return types.CancellableStream(stream, response)
+
+ def info(self):
+ """
+ Display system-wide information. Identical to the ``docker info``
+ command.
+
+ Returns:
+ (dict): The info as a dict
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self._result(self._get(self._url("/info")), True)
+
+ def login(self, username, password=None, email=None, registry=None,
+ reauth=False, dockercfg_path=None):
+ """
+ Authenticate with a registry. Similar to the ``docker login`` command.
+
+ Args:
+ username (str): The registry username
+ password (str): The plaintext password
+ email (str): The email for the registry account
+ registry (str): URL to the registry. E.g.
+ ``https://index.docker.io/v1/``
+ reauth (bool): Whether or not to refresh existing authentication on
+ the Docker server.
+ dockercfg_path (str): Use a custom path for the Docker config file
+ (default ``$HOME/.docker/config.json`` if present,
+ otherwise ``$HOME/.dockercfg``)
+
+ Returns:
+ (dict): The response from the login request
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ # If we don't have any auth data so far, try reloading the config file
+ # one more time in case anything showed up in there.
+ # If dockercfg_path is passed check to see if the config file exists,
+ # if so load that config.
+ if dockercfg_path and os.path.exists(dockercfg_path):
+ self._auth_configs = auth.load_config(
+ dockercfg_path, credstore_env=self.credstore_env
+ )
+ elif not self._auth_configs or self._auth_configs.is_empty:
+ self._auth_configs = auth.load_config(
+ credstore_env=self.credstore_env
+ )
+
+ authcfg = self._auth_configs.resolve_authconfig(registry)
+ # If we found an existing auth config for this registry and username
+ # combination, we can return it immediately unless reauth is requested.
+ if authcfg and authcfg.get('username', None) == username \
+ and not reauth:
+ return authcfg
+
+ req_data = {
+ 'username': username,
+ 'password': password,
+ 'email': email,
+ 'serveraddress': registry,
+ }
+
+ response = self._post_json(self._url('/auth'), data=req_data)
+ if response.status_code == 200:
+ self._auth_configs.add_auth(registry or auth.INDEX_NAME, req_data)
+ return self._result(response, json=True)
+
+ def ping(self):
+ """
+ Checks the server is responsive. An exception will be raised if it
+ isn't responding.
+
+ Returns:
+ (bool) The response from the server.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self._result(self._get(self._url('/_ping'))) == 'OK'
+
+ def version(self, api_version=True):
+ """
+ Returns version information from the server. Similar to the ``docker
+ version`` command.
+
+ Returns:
+ (dict): The server version information
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url("/version", versioned_api=api_version)
+ return self._result(self._get(url), json=True)
diff --git a/contrib/python/docker/docker/api/exec_api.py b/contrib/python/docker/docker/api/exec_api.py
new file mode 100644
index 00000000000..d8fc50dd3d9
--- /dev/null
+++ b/contrib/python/docker/docker/api/exec_api.py
@@ -0,0 +1,176 @@
+from .. import errors, utils
+from ..types import CancellableStream
+
+
+class ExecApiMixin:
+ @utils.check_resource('container')
+ def exec_create(self, container, cmd, stdout=True, stderr=True,
+ stdin=False, tty=False, privileged=False, user='',
+ environment=None, workdir=None, detach_keys=None):
+ """
+ Sets up an exec instance in a running container.
+
+ Args:
+ container (str): Target container where exec instance will be
+ created
+ cmd (str or list): Command to be executed
+ stdout (bool): Attach to stdout. Default: ``True``
+ stderr (bool): Attach to stderr. Default: ``True``
+ stdin (bool): Attach to stdin. Default: ``False``
+ tty (bool): Allocate a pseudo-TTY. Default: False
+ privileged (bool): Run as privileged.
+ user (str): User to execute command as. Default: root
+ environment (dict or list): A dictionary or a list of strings in
+ the following format ``["PASSWORD=xxx"]`` or
+ ``{"PASSWORD": "xxx"}``.
+ workdir (str): Path to working directory for this exec session
+ detach_keys (str): Override the key sequence for detaching
+ a container. Format is a single character `[a-Z]`
+ or `ctrl-<value>` where `<value>` is one of:
+ `a-z`, `@`, `^`, `[`, `,` or `_`.
+ ~/.docker/config.json is used by default.
+
+ Returns:
+ (dict): A dictionary with an exec ``Id`` key.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ if environment is not None and utils.version_lt(self._version, '1.25'):
+ raise errors.InvalidVersion(
+ 'Setting environment for exec is not supported in API < 1.25'
+ )
+
+ if isinstance(cmd, str):
+ cmd = utils.split_command(cmd)
+
+ if isinstance(environment, dict):
+ environment = utils.utils.format_environment(environment)
+
+ data = {
+ 'Container': container,
+ 'User': user,
+ 'Privileged': privileged,
+ 'Tty': tty,
+ 'AttachStdin': stdin,
+ 'AttachStdout': stdout,
+ 'AttachStderr': stderr,
+ 'Cmd': cmd,
+ 'Env': environment,
+ }
+
+ if workdir is not None:
+ if utils.version_lt(self._version, '1.35'):
+ raise errors.InvalidVersion(
+ 'workdir is not supported for API version < 1.35'
+ )
+ data['WorkingDir'] = workdir
+
+ if detach_keys:
+ data['detachKeys'] = detach_keys
+ elif 'detachKeys' in self._general_configs:
+ data['detachKeys'] = self._general_configs['detachKeys']
+
+ url = self._url('/containers/{0}/exec', container)
+ res = self._post_json(url, data=data)
+ return self._result(res, True)
+
+ def exec_inspect(self, exec_id):
+ """
+ Return low-level information about an exec command.
+
+ Args:
+ exec_id (str): ID of the exec instance
+
+ Returns:
+ (dict): Dictionary of values returned by the endpoint.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if isinstance(exec_id, dict):
+ exec_id = exec_id.get('Id')
+ res = self._get(self._url("/exec/{0}/json", exec_id))
+ return self._result(res, True)
+
+ def exec_resize(self, exec_id, height=None, width=None):
+ """
+ Resize the tty session used by the specified exec command.
+
+ Args:
+ exec_id (str): ID of the exec instance
+ height (int): Height of tty session
+ width (int): Width of tty session
+ """
+
+ if isinstance(exec_id, dict):
+ exec_id = exec_id.get('Id')
+
+ params = {'h': height, 'w': width}
+ url = self._url("/exec/{0}/resize", exec_id)
+ res = self._post(url, params=params)
+ self._raise_for_status(res)
+
+ @utils.check_resource('exec_id')
+ def exec_start(self, exec_id, detach=False, tty=False, stream=False,
+ socket=False, demux=False):
+ """
+ Start a previously set up exec instance.
+
+ Args:
+ exec_id (str): ID of the exec instance
+ detach (bool): If true, detach from the exec command.
+ Default: False
+ tty (bool): Allocate a pseudo-TTY. Default: False
+ stream (bool): Return response data progressively as an iterator
+ of strings, rather than a single string.
+ socket (bool): Return the connection socket to allow custom
+ read/write operations. Must be closed by the caller when done.
+ demux (bool): Return stdout and stderr separately
+
+ Returns:
+
+ (generator or str or tuple): If ``stream=True``, a generator
+ yielding response chunks. If ``socket=True``, a socket object for
+ the connection. A string containing response data otherwise. If
+ ``demux=True``, a tuple with two elements of type byte: stdout and
+ stderr.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ # we want opened socket if socket == True
+
+ data = {
+ 'Tty': tty,
+ 'Detach': detach
+ }
+
+ headers = {} if detach else {
+ 'Connection': 'Upgrade',
+ 'Upgrade': 'tcp'
+ }
+
+ res = self._post_json(
+ self._url('/exec/{0}/start', exec_id),
+ headers=headers,
+ data=data,
+ stream=True
+ )
+ if detach:
+ try:
+ return self._result(res)
+ finally:
+ res.close()
+ if socket:
+ return self._get_raw_response_socket(res)
+
+ output = self._read_from_socket(res, stream, tty=tty, demux=demux)
+ if stream:
+ return CancellableStream(output, res)
+ else:
+ return output
diff --git a/contrib/python/docker/docker/api/image.py b/contrib/python/docker/docker/api/image.py
new file mode 100644
index 00000000000..85109473bc9
--- /dev/null
+++ b/contrib/python/docker/docker/api/image.py
@@ -0,0 +1,601 @@
+import logging
+import os
+
+from .. import auth, errors, utils
+from ..constants import DEFAULT_DATA_CHUNK_SIZE
+
+log = logging.getLogger(__name__)
+
+
+class ImageApiMixin:
+
+ @utils.check_resource('image')
+ def get_image(self, image, chunk_size=DEFAULT_DATA_CHUNK_SIZE):
+ """
+ Get a tarball of an image. Similar to the ``docker save`` command.
+
+ Args:
+ image (str): Image name to get
+ chunk_size (int): The number of bytes returned by each iteration
+ of the generator. If ``None``, data will be streamed as it is
+ received. Default: 2 MB
+
+ Returns:
+ (generator): A stream of raw archive data.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> image = client.api.get_image("busybox:latest")
+ >>> f = open('/tmp/busybox-latest.tar', 'wb')
+ >>> for chunk in image:
+ >>> f.write(chunk)
+ >>> f.close()
+ """
+ res = self._get(self._url("/images/{0}/get", image), stream=True)
+ return self._stream_raw_result(res, chunk_size, False)
+
+ @utils.check_resource('image')
+ def history(self, image):
+ """
+ Show the history of an image.
+
+ Args:
+ image (str): The image to show history for
+
+ Returns:
+ (list): The history of the image
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ res = self._get(self._url("/images/{0}/history", image))
+ return self._result(res, True)
+
+ def images(self, name=None, quiet=False, all=False, filters=None):
+ """
+ List images. Similar to the ``docker images`` command.
+
+ Args:
+ name (str): Only show images belonging to the repository ``name``
+ quiet (bool): Only return numeric IDs as a list.
+ all (bool): Show intermediate image layers. By default, these are
+ filtered out.
+ filters (dict): Filters to be processed on the image list.
+ Available filters:
+ - ``dangling`` (bool)
+ - `label` (str|list): format either ``"key"``, ``"key=value"``
+ or a list of such.
+
+ Returns:
+ (dict or list): A list if ``quiet=True``, otherwise a dict.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {
+ 'only_ids': 1 if quiet else 0,
+ 'all': 1 if all else 0,
+ }
+ if name:
+ if utils.version_lt(self._version, '1.25'):
+ # only use "filter" on API 1.24 and under, as it is deprecated
+ params['filter'] = name
+ else:
+ if filters:
+ filters['reference'] = name
+ else:
+ filters = {'reference': name}
+ if filters:
+ params['filters'] = utils.convert_filters(filters)
+ res = self._result(self._get(self._url("/images/json"), params=params),
+ True)
+ if quiet:
+ return [x['Id'] for x in res]
+ return res
+
+ def import_image(self, src=None, repository=None, tag=None, image=None,
+ changes=None, stream_src=False):
+ """
+ Import an image. Similar to the ``docker import`` command.
+
+ If ``src`` is a string or unicode string, it will first be treated as a
+ path to a tarball on the local system. If there is an error reading
+ from that file, ``src`` will be treated as a URL instead to fetch the
+ image from. You can also pass an open file handle as ``src``, in which
+ case the data will be read from that file.
+
+ If ``src`` is unset but ``image`` is set, the ``image`` parameter will
+ be taken as the name of an existing image to import from.
+
+ Args:
+ src (str or file): Path to tarfile, URL, or file-like object
+ repository (str): The repository to create
+ tag (str): The tag to apply
+ image (str): Use another image like the ``FROM`` Dockerfile
+ parameter
+ """
+ if not (src or image):
+ raise errors.DockerException(
+ 'Must specify src or image to import from'
+ )
+ u = self._url('/images/create')
+
+ params = _import_image_params(
+ repository, tag, image,
+ src=(src if isinstance(src, str) else None),
+ changes=changes
+ )
+ headers = {'Content-Type': 'application/tar'}
+
+ if image or params.get('fromSrc') != '-': # from image or URL
+ return self._result(
+ self._post(u, data=None, params=params)
+ )
+ elif isinstance(src, str): # from file path
+ with open(src, 'rb') as f:
+ return self._result(
+ self._post(
+ u, data=f, params=params, headers=headers, timeout=None
+ )
+ )
+ else: # from raw data
+ if stream_src:
+ headers['Transfer-Encoding'] = 'chunked'
+ return self._result(
+ self._post(u, data=src, params=params, headers=headers)
+ )
+
+ def import_image_from_data(self, data, repository=None, tag=None,
+ changes=None):
+ """
+ Like :py:meth:`~docker.api.image.ImageApiMixin.import_image`, but
+ allows importing in-memory bytes data.
+
+ Args:
+ data (bytes collection): Bytes collection containing valid tar data
+ repository (str): The repository to create
+ tag (str): The tag to apply
+ """
+
+ u = self._url('/images/create')
+ params = _import_image_params(
+ repository, tag, src='-', changes=changes
+ )
+ headers = {'Content-Type': 'application/tar'}
+ return self._result(
+ self._post(
+ u, data=data, params=params, headers=headers, timeout=None
+ )
+ )
+
+ def import_image_from_file(self, filename, repository=None, tag=None,
+ changes=None):
+ """
+ Like :py:meth:`~docker.api.image.ImageApiMixin.import_image`, but only
+ supports importing from a tar file on disk.
+
+ Args:
+ filename (str): Full path to a tar file.
+ repository (str): The repository to create
+ tag (str): The tag to apply
+
+ Raises:
+ IOError: File does not exist.
+ """
+
+ return self.import_image(
+ src=filename, repository=repository, tag=tag, changes=changes
+ )
+
+ def import_image_from_stream(self, stream, repository=None, tag=None,
+ changes=None):
+ return self.import_image(
+ src=stream, stream_src=True, repository=repository, tag=tag,
+ changes=changes
+ )
+
+ def import_image_from_url(self, url, repository=None, tag=None,
+ changes=None):
+ """
+ Like :py:meth:`~docker.api.image.ImageApiMixin.import_image`, but only
+ supports importing from a URL.
+
+ Args:
+ url (str): A URL pointing to a tar file.
+ repository (str): The repository to create
+ tag (str): The tag to apply
+ """
+ return self.import_image(
+ src=url, repository=repository, tag=tag, changes=changes
+ )
+
+ def import_image_from_image(self, image, repository=None, tag=None,
+ changes=None):
+ """
+ Like :py:meth:`~docker.api.image.ImageApiMixin.import_image`, but only
+ supports importing from another image, like the ``FROM`` Dockerfile
+ parameter.
+
+ Args:
+ image (str): Image name to import from
+ repository (str): The repository to create
+ tag (str): The tag to apply
+ """
+ return self.import_image(
+ image=image, repository=repository, tag=tag, changes=changes
+ )
+
+ @utils.check_resource('image')
+ def inspect_image(self, image):
+ """
+ Get detailed information about an image. Similar to the ``docker
+ inspect`` command, but only for images.
+
+ Args:
+ image (str): The image to inspect
+
+ Returns:
+ (dict): Similar to the output of ``docker inspect``, but as a
+ single dict
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self._result(
+ self._get(self._url("/images/{0}/json", image)), True
+ )
+
+ @utils.minimum_version('1.30')
+ @utils.check_resource('image')
+ def inspect_distribution(self, image, auth_config=None):
+ """
+ Get image digest and platform information by contacting the registry.
+
+ Args:
+ image (str): The image name to inspect
+ auth_config (dict): Override the credentials that are found in the
+ config for this request. ``auth_config`` should contain the
+ ``username`` and ``password`` keys to be valid.
+
+ Returns:
+ (dict): A dict containing distribution data
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ registry, _ = auth.resolve_repository_name(image)
+
+ headers = {}
+ if auth_config is None:
+ header = auth.get_config_header(self, registry)
+ if header:
+ headers['X-Registry-Auth'] = header
+ else:
+ log.debug('Sending supplied auth config')
+ headers['X-Registry-Auth'] = auth.encode_header(auth_config)
+
+ url = self._url("/distribution/{0}/json", image)
+
+ return self._result(
+ self._get(url, headers=headers), True
+ )
+
+ def load_image(self, data, quiet=None):
+ """
+ Load an image that was previously saved using
+ :py:meth:`~docker.api.image.ImageApiMixin.get_image` (or ``docker
+ save``). Similar to ``docker load``.
+
+ Args:
+ data (binary): Image data to be loaded.
+ quiet (boolean): Suppress progress details in response.
+
+ Returns:
+ (generator): Progress output as JSON objects. Only available for
+ API version >= 1.23
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {}
+
+ if quiet is not None:
+ if utils.version_lt(self._version, '1.23'):
+ raise errors.InvalidVersion(
+ 'quiet is not supported in API version < 1.23'
+ )
+ params['quiet'] = quiet
+
+ res = self._post(
+ self._url("/images/load"), data=data, params=params, stream=True
+ )
+ if utils.version_gte(self._version, '1.23'):
+ return self._stream_helper(res, decode=True)
+
+ self._raise_for_status(res)
+
+ @utils.minimum_version('1.25')
+ def prune_images(self, filters=None):
+ """
+ Delete unused images
+
+ Args:
+ filters (dict): Filters to process on the prune list.
+ Available filters:
+ - dangling (bool): When set to true (or 1), prune only
+ unused and untagged images.
+
+ Returns:
+ (dict): A dict containing a list of deleted image IDs and
+ the amount of disk space reclaimed in bytes.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url("/images/prune")
+ params = {}
+ if filters is not None:
+ params['filters'] = utils.convert_filters(filters)
+ return self._result(self._post(url, params=params), True)
+
+ def pull(self, repository, tag=None, stream=False, auth_config=None,
+ decode=False, platform=None, all_tags=False):
+ """
+ Pulls an image. Similar to the ``docker pull`` command.
+
+ Args:
+ repository (str): The repository to pull
+ tag (str): The tag to pull. If ``tag`` is ``None`` or empty, it
+ is set to ``latest``.
+ stream (bool): Stream the output as a generator. Make sure to
+ consume the generator, otherwise pull might get cancelled.
+ auth_config (dict): Override the credentials that are found in the
+ config for this request. ``auth_config`` should contain the
+ ``username`` and ``password`` keys to be valid.
+ decode (bool): Decode the JSON data from the server into dicts.
+ Only applies with ``stream=True``
+ platform (str): Platform in the format ``os[/arch[/variant]]``
+ all_tags (bool): Pull all image tags, the ``tag`` parameter is
+ ignored.
+
+ Returns:
+ (generator or str): The output
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> resp = client.api.pull('busybox', stream=True, decode=True)
+ ... for line in resp:
+ ... print(json.dumps(line, indent=4))
+ {
+ "status": "Pulling image (latest) from busybox",
+ "progressDetail": {},
+ "id": "e72ac664f4f0"
+ }
+ {
+ "status": "Pulling image (latest) from busybox, endpoint: ...",
+ "progressDetail": {},
+ "id": "e72ac664f4f0"
+ }
+
+ """
+ repository, image_tag = utils.parse_repository_tag(repository)
+ tag = tag or image_tag or 'latest'
+
+ if all_tags:
+ tag = None
+
+ registry, repo_name = auth.resolve_repository_name(repository)
+
+ params = {
+ 'tag': tag,
+ 'fromImage': repository
+ }
+ headers = {}
+
+ if auth_config is None:
+ header = auth.get_config_header(self, registry)
+ if header:
+ headers['X-Registry-Auth'] = header
+ else:
+ log.debug('Sending supplied auth config')
+ headers['X-Registry-Auth'] = auth.encode_header(auth_config)
+
+ if platform is not None:
+ if utils.version_lt(self._version, '1.32'):
+ raise errors.InvalidVersion(
+ 'platform was only introduced in API version 1.32'
+ )
+ params['platform'] = platform
+
+ response = self._post(
+ self._url('/images/create'), params=params, headers=headers,
+ stream=stream, timeout=None
+ )
+
+ self._raise_for_status(response)
+
+ if stream:
+ return self._stream_helper(response, decode=decode)
+
+ return self._result(response)
+
+ def push(self, repository, tag=None, stream=False, auth_config=None,
+ decode=False):
+ """
+ Push an image or a repository to the registry. Similar to the ``docker
+ push`` command.
+
+ Args:
+ repository (str): The repository to push to
+ tag (str): An optional tag to push
+ stream (bool): Stream the output as a blocking generator
+ auth_config (dict): Override the credentials that are found in the
+ config for this request. ``auth_config`` should contain the
+ ``username`` and ``password`` keys to be valid.
+ decode (bool): Decode the JSON data from the server into dicts.
+ Only applies with ``stream=True``
+
+ Returns:
+ (generator or str): The output from the server.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+ >>> resp = client.api.push(
+ ... 'yourname/app',
+ ... stream=True,
+ ... decode=True,
+ ... )
+ ... for line in resp:
+ ... print(line)
+ {'status': 'Pushing repository yourname/app (1 tags)'}
+ {'status': 'Pushing','progressDetail': {}, 'id': '511136ea3c5a'}
+ {'status': 'Image already pushed, skipping', 'progressDetail':{},
+ 'id': '511136ea3c5a'}
+ ...
+
+ """
+ if not tag:
+ repository, tag = utils.parse_repository_tag(repository)
+ registry, repo_name = auth.resolve_repository_name(repository)
+ u = self._url("/images/{0}/push", repository)
+ params = {
+ 'tag': tag
+ }
+ headers = {}
+
+ if auth_config is None:
+ header = auth.get_config_header(self, registry)
+ if header:
+ headers['X-Registry-Auth'] = header
+ else:
+ log.debug('Sending supplied auth config')
+ headers['X-Registry-Auth'] = auth.encode_header(auth_config)
+
+ response = self._post_json(
+ u, None, headers=headers, stream=stream, params=params
+ )
+
+ self._raise_for_status(response)
+
+ if stream:
+ return self._stream_helper(response, decode=decode)
+
+ return self._result(response)
+
+ @utils.check_resource('image')
+ def remove_image(self, image, force=False, noprune=False):
+ """
+ Remove an image. Similar to the ``docker rmi`` command.
+
+ Args:
+ image (str): The image to remove
+ force (bool): Force removal of the image
+ noprune (bool): Do not delete untagged parents
+ """
+ params = {'force': force, 'noprune': noprune}
+ res = self._delete(self._url("/images/{0}", image), params=params)
+ return self._result(res, True)
+
+ def search(self, term, limit=None):
+ """
+ Search for images on Docker Hub. Similar to the ``docker search``
+ command.
+
+ Args:
+ term (str): A term to search for.
+ limit (int): The maximum number of results to return.
+
+ Returns:
+ (list of dicts): The response of the search.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {'term': term}
+ if limit is not None:
+ params['limit'] = limit
+
+ return self._result(
+ self._get(self._url("/images/search"), params=params),
+ True
+ )
+
+ @utils.check_resource('image')
+ def tag(self, image, repository, tag=None, force=False):
+ """
+ Tag an image into a repository. Similar to the ``docker tag`` command.
+
+ Args:
+ image (str): The image to tag
+ repository (str): The repository to set for the tag
+ tag (str): The tag name
+ force (bool): Force
+
+ Returns:
+ (bool): ``True`` if successful
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> client.api.tag('ubuntu', 'localhost:5000/ubuntu', 'latest',
+ force=True)
+ """
+ params = {
+ 'tag': tag,
+ 'repo': repository,
+ 'force': 1 if force else 0
+ }
+ url = self._url("/images/{0}/tag", image)
+ res = self._post(url, params=params)
+ self._raise_for_status(res)
+ return res.status_code == 201
+
+
+def is_file(src):
+ try:
+ return (
+ isinstance(src, str) and
+ os.path.isfile(src)
+ )
+ except TypeError: # a data string will make isfile() raise a TypeError
+ return False
+
+
+def _import_image_params(repo, tag, image=None, src=None,
+ changes=None):
+ params = {
+ 'repo': repo,
+ 'tag': tag,
+ }
+ if image:
+ params['fromImage'] = image
+ elif src and not is_file(src):
+ params['fromSrc'] = src
+ else:
+ params['fromSrc'] = '-'
+
+ if changes:
+ params['changes'] = changes
+
+ return params
diff --git a/contrib/python/docker/docker/api/network.py b/contrib/python/docker/docker/api/network.py
new file mode 100644
index 00000000000..2b1925710ea
--- /dev/null
+++ b/contrib/python/docker/docker/api/network.py
@@ -0,0 +1,277 @@
+from .. import utils
+from ..errors import InvalidVersion
+from ..utils import check_resource, minimum_version, version_lt
+
+
+class NetworkApiMixin:
+ def networks(self, names=None, ids=None, filters=None):
+ """
+ List networks. Similar to the ``docker network ls`` command.
+
+ Args:
+ names (:py:class:`list`): List of names to filter by
+ ids (:py:class:`list`): List of ids to filter by
+ filters (dict): Filters to be processed on the network list.
+ Available filters:
+ - ``driver=[<driver-name>]`` Matches a network's driver.
+ - ``label=[<key>]``, ``label=[<key>=<value>]`` or a list of
+ such.
+ - ``type=["custom"|"builtin"]`` Filters networks by type.
+
+ Returns:
+ (dict): List of network objects.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ if filters is None:
+ filters = {}
+ if names:
+ filters['name'] = names
+ if ids:
+ filters['id'] = ids
+ params = {'filters': utils.convert_filters(filters)}
+ url = self._url("/networks")
+ res = self._get(url, params=params)
+ return self._result(res, json=True)
+
+ def create_network(self, name, driver=None, options=None, ipam=None,
+ check_duplicate=None, internal=False, labels=None,
+ enable_ipv6=False, attachable=None, scope=None,
+ ingress=None):
+ """
+ Create a network. Similar to the ``docker network create``.
+
+ Args:
+ name (str): Name of the network
+ driver (str): Name of the driver used to create the network
+ options (dict): Driver options as a key-value dictionary
+ ipam (IPAMConfig): Optional custom IP scheme for the network.
+ check_duplicate (bool): Request daemon to check for networks with
+ same name. Default: ``None``.
+ internal (bool): Restrict external access to the network. Default
+ ``False``.
+ labels (dict): Map of labels to set on the network. Default
+ ``None``.
+ enable_ipv6 (bool): Enable IPv6 on the network. Default ``False``.
+ attachable (bool): If enabled, and the network is in the global
+ scope, non-service containers on worker nodes will be able to
+ connect to the network.
+ scope (str): Specify the network's scope (``local``, ``global`` or
+ ``swarm``)
+ ingress (bool): If set, create an ingress network which provides
+ the routing-mesh in swarm mode.
+
+ Returns:
+ (dict): The created network reference object
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+ A network using the bridge driver:
+
+ >>> client.api.create_network("network1", driver="bridge")
+
+ You can also create more advanced networks with custom IPAM
+ configurations. For example, setting the subnet to
+ ``192.168.52.0/24`` and gateway address to ``192.168.52.254``.
+
+ .. code-block:: python
+
+ >>> ipam_pool = docker.types.IPAMPool(
+ subnet='192.168.52.0/24',
+ gateway='192.168.52.254'
+ )
+ >>> ipam_config = docker.types.IPAMConfig(
+ pool_configs=[ipam_pool]
+ )
+ >>> client.api.create_network("network1", driver="bridge",
+ ipam=ipam_config)
+ """
+ if options is not None and not isinstance(options, dict):
+ raise TypeError('options must be a dictionary')
+
+ data = {
+ 'Name': name,
+ 'Driver': driver,
+ 'Options': options,
+ 'IPAM': ipam,
+ 'CheckDuplicate': check_duplicate,
+ }
+
+ if labels is not None:
+ if version_lt(self._version, '1.23'):
+ raise InvalidVersion(
+ 'network labels were introduced in API 1.23'
+ )
+ if not isinstance(labels, dict):
+ raise TypeError('labels must be a dictionary')
+ data["Labels"] = labels
+
+ if enable_ipv6:
+ if version_lt(self._version, '1.23'):
+ raise InvalidVersion(
+ 'enable_ipv6 was introduced in API 1.23'
+ )
+ data['EnableIPv6'] = True
+
+ if internal:
+ if version_lt(self._version, '1.22'):
+ raise InvalidVersion('Internal networks are not '
+ 'supported in API version < 1.22')
+ data['Internal'] = True
+
+ if attachable is not None:
+ if version_lt(self._version, '1.24'):
+ raise InvalidVersion(
+ 'attachable is not supported in API version < 1.24'
+ )
+ data['Attachable'] = attachable
+
+ if ingress is not None:
+ if version_lt(self._version, '1.29'):
+ raise InvalidVersion(
+ 'ingress is not supported in API version < 1.29'
+ )
+
+ data['Ingress'] = ingress
+
+ if scope is not None:
+ if version_lt(self._version, '1.30'):
+ raise InvalidVersion(
+ 'scope is not supported in API version < 1.30'
+ )
+ data['Scope'] = scope
+
+ url = self._url("/networks/create")
+ res = self._post_json(url, data=data)
+ return self._result(res, json=True)
+
+ @minimum_version('1.25')
+ def prune_networks(self, filters=None):
+ """
+ Delete unused networks
+
+ Args:
+ filters (dict): Filters to process on the prune list.
+
+ Returns:
+ (dict): A dict containing a list of deleted network names and
+ the amount of disk space reclaimed in bytes.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {}
+ if filters:
+ params['filters'] = utils.convert_filters(filters)
+ url = self._url('/networks/prune')
+ return self._result(self._post(url, params=params), True)
+
+ @check_resource('net_id')
+ def remove_network(self, net_id):
+ """
+ Remove a network. Similar to the ``docker network rm`` command.
+
+ Args:
+ net_id (str): The network's id
+ """
+ url = self._url("/networks/{0}", net_id)
+ res = self._delete(url)
+ self._raise_for_status(res)
+
+ @check_resource('net_id')
+ def inspect_network(self, net_id, verbose=None, scope=None):
+ """
+ Get detailed information about a network.
+
+ Args:
+ net_id (str): ID of network
+ verbose (bool): Show the service details across the cluster in
+ swarm mode.
+ scope (str): Filter the network by scope (``swarm``, ``global``
+ or ``local``).
+ """
+ params = {}
+ if verbose is not None:
+ if version_lt(self._version, '1.28'):
+ raise InvalidVersion('verbose was introduced in API 1.28')
+ params['verbose'] = verbose
+ if scope is not None:
+ if version_lt(self._version, '1.31'):
+ raise InvalidVersion('scope was introduced in API 1.31')
+ params['scope'] = scope
+
+ url = self._url("/networks/{0}", net_id)
+ res = self._get(url, params=params)
+ return self._result(res, json=True)
+
+ @check_resource('container')
+ def connect_container_to_network(self, container, net_id,
+ ipv4_address=None, ipv6_address=None,
+ aliases=None, links=None,
+ link_local_ips=None, driver_opt=None,
+ mac_address=None):
+ """
+ Connect a container to a network.
+
+ Args:
+ container (str): container-id/name to be connected to the network
+ net_id (str): network id
+ aliases (:py:class:`list`): A list of aliases for this endpoint.
+ Names in that list can be used within the network to reach the
+ container. Defaults to ``None``.
+ links (:py:class:`list`): A list of links for this endpoint.
+ Containers declared in this list will be linked to this
+ container. Defaults to ``None``.
+ ipv4_address (str): The IP address of this container on the
+ network, using the IPv4 protocol. Defaults to ``None``.
+ ipv6_address (str): The IP address of this container on the
+ network, using the IPv6 protocol. Defaults to ``None``.
+ link_local_ips (:py:class:`list`): A list of link-local
+ (IPv4/IPv6) addresses.
+ mac_address (str): The MAC address of this container on the
+ network. Defaults to ``None``.
+ """
+ data = {
+ "Container": container,
+ "EndpointConfig": self.create_endpoint_config(
+ aliases=aliases, links=links, ipv4_address=ipv4_address,
+ ipv6_address=ipv6_address, link_local_ips=link_local_ips,
+ driver_opt=driver_opt,
+ mac_address=mac_address
+ ),
+ }
+
+ url = self._url("/networks/{0}/connect", net_id)
+ res = self._post_json(url, data=data)
+ self._raise_for_status(res)
+
+ @check_resource('container')
+ def disconnect_container_from_network(self, container, net_id,
+ force=False):
+ """
+ Disconnect a container from a network.
+
+ Args:
+ container (str): container ID or name to be disconnected from the
+ network
+ net_id (str): network ID
+ force (bool): Force the container to disconnect from a network.
+ Default: ``False``
+ """
+ data = {"Container": container}
+ if force:
+ if version_lt(self._version, '1.22'):
+ raise InvalidVersion(
+ 'Forced disconnect was introduced in API 1.22'
+ )
+ data['Force'] = force
+ url = self._url("/networks/{0}/disconnect", net_id)
+ res = self._post_json(url, data=data)
+ self._raise_for_status(res)
diff --git a/contrib/python/docker/docker/api/plugin.py b/contrib/python/docker/docker/api/plugin.py
new file mode 100644
index 00000000000..10210c1a230
--- /dev/null
+++ b/contrib/python/docker/docker/api/plugin.py
@@ -0,0 +1,261 @@
+from .. import auth, utils
+
+
+class PluginApiMixin:
+ @utils.minimum_version('1.25')
+ @utils.check_resource('name')
+ def configure_plugin(self, name, options):
+ """
+ Configure a plugin.
+
+ Args:
+ name (string): The name of the plugin. The ``:latest`` tag is
+ optional, and is the default if omitted.
+ options (dict): A key-value mapping of options
+
+ Returns:
+ ``True`` if successful
+ """
+ url = self._url('/plugins/{0}/set', name)
+ data = options
+ if isinstance(data, dict):
+ data = [f'{k}={v}' for k, v in data.items()]
+ res = self._post_json(url, data=data)
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.25')
+ def create_plugin(self, name, plugin_data_dir, gzip=False):
+ """
+ Create a new plugin.
+
+ Args:
+ name (string): The name of the plugin. The ``:latest`` tag is
+ optional, and is the default if omitted.
+ plugin_data_dir (string): Path to the plugin data directory.
+ Plugin data directory must contain the ``config.json``
+ manifest file and the ``rootfs`` directory.
+ gzip (bool): Compress the context using gzip. Default: False
+
+ Returns:
+ ``True`` if successful
+ """
+ url = self._url('/plugins/create')
+
+ with utils.create_archive(
+ root=plugin_data_dir, gzip=gzip,
+ files=set(utils.build.walk(plugin_data_dir, []))
+ ) as archv:
+ res = self._post(url, params={'name': name}, data=archv)
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.25')
+ def disable_plugin(self, name, force=False):
+ """
+ Disable an installed plugin.
+
+ Args:
+ name (string): The name of the plugin. The ``:latest`` tag is
+ optional, and is the default if omitted.
+ force (bool): To enable the force query parameter.
+
+ Returns:
+ ``True`` if successful
+ """
+ url = self._url('/plugins/{0}/disable', name)
+ res = self._post(url, params={'force': force})
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.25')
+ def enable_plugin(self, name, timeout=0):
+ """
+ Enable an installed plugin.
+
+ Args:
+ name (string): The name of the plugin. The ``:latest`` tag is
+ optional, and is the default if omitted.
+ timeout (int): Operation timeout (in seconds). Default: 0
+
+ Returns:
+ ``True`` if successful
+ """
+ url = self._url('/plugins/{0}/enable', name)
+ params = {'timeout': timeout}
+ res = self._post(url, params=params)
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.25')
+ def inspect_plugin(self, name):
+ """
+ Retrieve plugin metadata.
+
+ Args:
+ name (string): The name of the plugin. The ``:latest`` tag is
+ optional, and is the default if omitted.
+
+ Returns:
+ A dict containing plugin info
+ """
+ url = self._url('/plugins/{0}/json', name)
+ return self._result(self._get(url), True)
+
+ @utils.minimum_version('1.25')
+ def pull_plugin(self, remote, privileges, name=None):
+ """
+ Pull and install a plugin. After the plugin is installed, it can be
+ enabled using :py:meth:`~enable_plugin`.
+
+ Args:
+ remote (string): Remote reference for the plugin to install.
+ The ``:latest`` tag is optional, and is the default if
+ omitted.
+ privileges (:py:class:`list`): A list of privileges the user
+ consents to grant to the plugin. Can be retrieved using
+ :py:meth:`~plugin_privileges`.
+ name (string): Local name for the pulled plugin. The
+ ``:latest`` tag is optional, and is the default if omitted.
+
+ Returns:
+ An iterable object streaming the decoded API logs
+ """
+ url = self._url('/plugins/pull')
+ params = {
+ 'remote': remote,
+ }
+ if name:
+ params['name'] = name
+
+ headers = {}
+ registry, repo_name = auth.resolve_repository_name(remote)
+ header = auth.get_config_header(self, registry)
+ if header:
+ headers['X-Registry-Auth'] = header
+ response = self._post_json(
+ url, params=params, headers=headers, data=privileges,
+ stream=True
+ )
+ self._raise_for_status(response)
+ return self._stream_helper(response, decode=True)
+
+ @utils.minimum_version('1.25')
+ def plugins(self):
+ """
+ Retrieve a list of installed plugins.
+
+ Returns:
+ A list of dicts, one per plugin
+ """
+ url = self._url('/plugins')
+ return self._result(self._get(url), True)
+
+ @utils.minimum_version('1.25')
+ def plugin_privileges(self, name):
+ """
+ Retrieve list of privileges to be granted to a plugin.
+
+ Args:
+ name (string): Name of the remote plugin to examine. The
+ ``:latest`` tag is optional, and is the default if omitted.
+
+ Returns:
+ A list of dictionaries representing the plugin's
+ permissions
+
+ """
+ params = {
+ 'remote': name,
+ }
+
+ headers = {}
+ registry, repo_name = auth.resolve_repository_name(name)
+ header = auth.get_config_header(self, registry)
+ if header:
+ headers['X-Registry-Auth'] = header
+
+ url = self._url('/plugins/privileges')
+ return self._result(
+ self._get(url, params=params, headers=headers), True
+ )
+
+ @utils.minimum_version('1.25')
+ @utils.check_resource('name')
+ def push_plugin(self, name):
+ """
+ Push a plugin to the registry.
+
+ Args:
+ name (string): Name of the plugin to upload. The ``:latest``
+ tag is optional, and is the default if omitted.
+
+ Returns:
+ ``True`` if successful
+ """
+ url = self._url('/plugins/{0}/pull', name)
+
+ headers = {}
+ registry, repo_name = auth.resolve_repository_name(name)
+ header = auth.get_config_header(self, registry)
+ if header:
+ headers['X-Registry-Auth'] = header
+ res = self._post(url, headers=headers)
+ self._raise_for_status(res)
+ return self._stream_helper(res, decode=True)
+
+ @utils.minimum_version('1.25')
+ @utils.check_resource('name')
+ def remove_plugin(self, name, force=False):
+ """
+ Remove an installed plugin.
+
+ Args:
+ name (string): Name of the plugin to remove. The ``:latest``
+ tag is optional, and is the default if omitted.
+ force (bool): Disable the plugin before removing. This may
+ result in issues if the plugin is in use by a container.
+
+ Returns:
+ ``True`` if successful
+ """
+ url = self._url('/plugins/{0}', name)
+ res = self._delete(url, params={'force': force})
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.26')
+ @utils.check_resource('name')
+ def upgrade_plugin(self, name, remote, privileges):
+ """
+ Upgrade an installed plugin.
+
+ Args:
+ name (string): Name of the plugin to upgrade. The ``:latest``
+ tag is optional and is the default if omitted.
+ remote (string): Remote reference to upgrade to. The
+ ``:latest`` tag is optional and is the default if omitted.
+ privileges (:py:class:`list`): A list of privileges the user
+ consents to grant to the plugin. Can be retrieved using
+ :py:meth:`~plugin_privileges`.
+
+ Returns:
+ An iterable object streaming the decoded API logs
+ """
+
+ url = self._url('/plugins/{0}/upgrade', name)
+ params = {
+ 'remote': remote,
+ }
+
+ headers = {}
+ registry, repo_name = auth.resolve_repository_name(remote)
+ header = auth.get_config_header(self, registry)
+ if header:
+ headers['X-Registry-Auth'] = header
+ response = self._post_json(
+ url, params=params, headers=headers, data=privileges,
+ stream=True
+ )
+ self._raise_for_status(response)
+ return self._stream_helper(response, decode=True)
diff --git a/contrib/python/docker/docker/api/secret.py b/contrib/python/docker/docker/api/secret.py
new file mode 100644
index 00000000000..db1701bdc05
--- /dev/null
+++ b/contrib/python/docker/docker/api/secret.py
@@ -0,0 +1,98 @@
+import base64
+
+from .. import errors, utils
+
+
+class SecretApiMixin:
+ @utils.minimum_version('1.25')
+ def create_secret(self, name, data, labels=None, driver=None):
+ """
+ Create a secret
+
+ Args:
+ name (string): Name of the secret
+ data (bytes): Secret data to be stored
+ labels (dict): A mapping of labels to assign to the secret
+ driver (DriverConfig): A custom driver configuration. If
+ unspecified, the default ``internal`` driver will be used
+
+ Returns (dict): ID of the newly created secret
+ """
+ if not isinstance(data, bytes):
+ data = data.encode('utf-8')
+
+ data = base64.b64encode(data)
+ data = data.decode('ascii')
+ body = {
+ 'Data': data,
+ 'Name': name,
+ 'Labels': labels
+ }
+
+ if driver is not None:
+ if utils.version_lt(self._version, '1.31'):
+ raise errors.InvalidVersion(
+ 'Secret driver is only available for API version > 1.31'
+ )
+
+ body['Driver'] = driver
+
+ url = self._url('/secrets/create')
+ return self._result(
+ self._post_json(url, data=body), True
+ )
+
+ @utils.minimum_version('1.25')
+ @utils.check_resource('id')
+ def inspect_secret(self, id):
+ """
+ Retrieve secret metadata
+
+ Args:
+ id (string): Full ID of the secret to inspect
+
+ Returns (dict): A dictionary of metadata
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ if no secret with that ID exists
+ """
+ url = self._url('/secrets/{0}', id)
+ return self._result(self._get(url), True)
+
+ @utils.minimum_version('1.25')
+ @utils.check_resource('id')
+ def remove_secret(self, id):
+ """
+ Remove a secret
+
+ Args:
+ id (string): Full ID of the secret to remove
+
+ Returns (boolean): True if successful
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ if no secret with that ID exists
+ """
+ url = self._url('/secrets/{0}', id)
+ res = self._delete(url)
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.25')
+ def secrets(self, filters=None):
+ """
+ List secrets
+
+ Args:
+ filters (dict): A map of filters to process on the secrets
+ list. Available filters: ``names``
+
+ Returns (list): A list of secrets
+ """
+ url = self._url('/secrets')
+ params = {}
+ if filters:
+ params['filters'] = utils.convert_filters(filters)
+ return self._result(self._get(url, params=params), True)
diff --git a/contrib/python/docker/docker/api/service.py b/contrib/python/docker/docker/api/service.py
new file mode 100644
index 00000000000..3aed0651750
--- /dev/null
+++ b/contrib/python/docker/docker/api/service.py
@@ -0,0 +1,486 @@
+from .. import auth, errors, utils
+from ..types import ServiceMode
+
+
+def _check_api_features(version, task_template, update_config, endpoint_spec,
+ rollback_config):
+
+ def raise_version_error(param, min_version):
+ raise errors.InvalidVersion(
+ f'{param} is not supported in API version < {min_version}'
+ )
+
+ if update_config is not None:
+ if utils.version_lt(version, '1.25'):
+ if 'MaxFailureRatio' in update_config:
+ raise_version_error('UpdateConfig.max_failure_ratio', '1.25')
+ if 'Monitor' in update_config:
+ raise_version_error('UpdateConfig.monitor', '1.25')
+
+ if utils.version_lt(version, '1.28'):
+ if update_config.get('FailureAction') == 'rollback':
+ raise_version_error(
+ 'UpdateConfig.failure_action rollback', '1.28'
+ )
+
+ if utils.version_lt(version, '1.29'):
+ if 'Order' in update_config:
+ raise_version_error('UpdateConfig.order', '1.29')
+
+ if rollback_config is not None:
+ if utils.version_lt(version, '1.28'):
+ raise_version_error('rollback_config', '1.28')
+
+ if utils.version_lt(version, '1.29'):
+ if 'Order' in update_config:
+ raise_version_error('RollbackConfig.order', '1.29')
+
+ if endpoint_spec is not None:
+ if utils.version_lt(version, '1.32') and 'Ports' in endpoint_spec:
+ if any(p.get('PublishMode') for p in endpoint_spec['Ports']):
+ raise_version_error('EndpointSpec.Ports[].mode', '1.32')
+
+ if task_template is not None:
+ if 'ForceUpdate' in task_template and utils.version_lt(
+ version, '1.25'):
+ raise_version_error('force_update', '1.25')
+
+ if task_template.get('Placement'):
+ if utils.version_lt(version, '1.30'):
+ if task_template['Placement'].get('Platforms'):
+ raise_version_error('Placement.platforms', '1.30')
+ if utils.version_lt(version, '1.27'):
+ if task_template['Placement'].get('Preferences'):
+ raise_version_error('Placement.preferences', '1.27')
+
+ if task_template.get('ContainerSpec'):
+ container_spec = task_template.get('ContainerSpec')
+
+ if utils.version_lt(version, '1.25'):
+ if container_spec.get('TTY'):
+ raise_version_error('ContainerSpec.tty', '1.25')
+ if container_spec.get('Hostname') is not None:
+ raise_version_error('ContainerSpec.hostname', '1.25')
+ if container_spec.get('Hosts') is not None:
+ raise_version_error('ContainerSpec.hosts', '1.25')
+ if container_spec.get('Groups') is not None:
+ raise_version_error('ContainerSpec.groups', '1.25')
+ if container_spec.get('DNSConfig') is not None:
+ raise_version_error('ContainerSpec.dns_config', '1.25')
+ if container_spec.get('Healthcheck') is not None:
+ raise_version_error('ContainerSpec.healthcheck', '1.25')
+
+ if utils.version_lt(version, '1.28'):
+ if container_spec.get('ReadOnly') is not None:
+ raise_version_error('ContainerSpec.dns_config', '1.28')
+ if container_spec.get('StopSignal') is not None:
+ raise_version_error('ContainerSpec.stop_signal', '1.28')
+
+ if utils.version_lt(version, '1.30'):
+ if container_spec.get('Configs') is not None:
+ raise_version_error('ContainerSpec.configs', '1.30')
+ if container_spec.get('Privileges') is not None:
+ raise_version_error('ContainerSpec.privileges', '1.30')
+
+ if utils.version_lt(version, '1.35'):
+ if container_spec.get('Isolation') is not None:
+ raise_version_error('ContainerSpec.isolation', '1.35')
+
+ if utils.version_lt(version, '1.38'):
+ if container_spec.get('Init') is not None:
+ raise_version_error('ContainerSpec.init', '1.38')
+
+ if task_template.get('Resources'):
+ if utils.version_lt(version, '1.32'):
+ if task_template['Resources'].get('GenericResources'):
+ raise_version_error('Resources.generic_resources', '1.32')
+
+
+def _merge_task_template(current, override):
+ merged = current.copy()
+ if override is not None:
+ for ts_key, ts_value in override.items():
+ if ts_key == 'ContainerSpec':
+ if 'ContainerSpec' not in merged:
+ merged['ContainerSpec'] = {}
+ for cs_key, cs_value in override['ContainerSpec'].items():
+ if cs_value is not None:
+ merged['ContainerSpec'][cs_key] = cs_value
+ elif ts_value is not None:
+ merged[ts_key] = ts_value
+ return merged
+
+
+class ServiceApiMixin:
+ @utils.minimum_version('1.24')
+ def create_service(
+ self, task_template, name=None, labels=None, mode=None,
+ update_config=None, networks=None, endpoint_config=None,
+ endpoint_spec=None, rollback_config=None
+ ):
+ """
+ Create a service.
+
+ Args:
+ task_template (TaskTemplate): Specification of the task to start as
+ part of the new service.
+ name (string): User-defined name for the service. Optional.
+ labels (dict): A map of labels to associate with the service.
+ Optional.
+ mode (ServiceMode): Scheduling mode for the service (replicated
+ or global). Defaults to replicated.
+ update_config (UpdateConfig): Specification for the update strategy
+ of the service. Default: ``None``
+ rollback_config (RollbackConfig): Specification for the rollback
+ strategy of the service. Default: ``None``
+ networks (:py:class:`list`): List of network names or IDs or
+ :py:class:`~docker.types.NetworkAttachmentConfig` to attach the
+ service to. Default: ``None``.
+ endpoint_spec (EndpointSpec): Properties that can be configured to
+ access and load balance a service. Default: ``None``.
+
+ Returns:
+ A dictionary containing an ``ID`` key for the newly created
+ service.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ _check_api_features(
+ self._version, task_template, update_config, endpoint_spec,
+ rollback_config
+ )
+
+ url = self._url('/services/create')
+ headers = {}
+ image = task_template.get('ContainerSpec', {}).get('Image', None)
+ if image is None:
+ raise errors.DockerException(
+ 'Missing mandatory Image key in ContainerSpec'
+ )
+ if mode and not isinstance(mode, dict):
+ mode = ServiceMode(mode)
+
+ registry, repo_name = auth.resolve_repository_name(image)
+ auth_header = auth.get_config_header(self, registry)
+ if auth_header:
+ headers['X-Registry-Auth'] = auth_header
+ if utils.version_lt(self._version, '1.25'):
+ networks = networks or task_template.pop('Networks', None)
+ data = {
+ 'Name': name,
+ 'Labels': labels,
+ 'TaskTemplate': task_template,
+ 'Mode': mode,
+ 'Networks': utils.convert_service_networks(networks),
+ 'EndpointSpec': endpoint_spec
+ }
+
+ if update_config is not None:
+ data['UpdateConfig'] = update_config
+
+ if rollback_config is not None:
+ data['RollbackConfig'] = rollback_config
+
+ return self._result(
+ self._post_json(url, data=data, headers=headers), True
+ )
+
+ @utils.minimum_version('1.24')
+ @utils.check_resource('service')
+ def inspect_service(self, service, insert_defaults=None):
+ """
+ Return information about a service.
+
+ Args:
+ service (str): Service name or ID.
+ insert_defaults (boolean): If true, default values will be merged
+ into the service inspect output.
+
+ Returns:
+ (dict): A dictionary of the server-side representation of the
+ service, including all relevant properties.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/services/{0}', service)
+ params = {}
+ if insert_defaults is not None:
+ if utils.version_lt(self._version, '1.29'):
+ raise errors.InvalidVersion(
+ 'insert_defaults is not supported in API version < 1.29'
+ )
+ params['insertDefaults'] = insert_defaults
+
+ return self._result(self._get(url, params=params), True)
+
+ @utils.minimum_version('1.24')
+ @utils.check_resource('task')
+ def inspect_task(self, task):
+ """
+ Retrieve information about a task.
+
+ Args:
+ task (str): Task ID
+
+ Returns:
+ (dict): Information about the task.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/tasks/{0}', task)
+ return self._result(self._get(url), True)
+
+ @utils.minimum_version('1.24')
+ @utils.check_resource('service')
+ def remove_service(self, service):
+ """
+ Stop and remove a service.
+
+ Args:
+ service (str): Service name or ID
+
+ Returns:
+ ``True`` if successful.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ url = self._url('/services/{0}', service)
+ resp = self._delete(url)
+ self._raise_for_status(resp)
+ return True
+
+ @utils.minimum_version('1.24')
+ def services(self, filters=None, status=None):
+ """
+ List services.
+
+ Args:
+ filters (dict): Filters to process on the nodes list. Valid
+ filters: ``id``, ``name`` , ``label`` and ``mode``.
+ Default: ``None``.
+ status (bool): Include the service task count of running and
+ desired tasks. Default: ``None``.
+
+ Returns:
+ A list of dictionaries containing data about each service.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {
+ 'filters': utils.convert_filters(filters) if filters else None
+ }
+ if status is not None:
+ if utils.version_lt(self._version, '1.41'):
+ raise errors.InvalidVersion(
+ 'status is not supported in API version < 1.41'
+ )
+ params['status'] = status
+ url = self._url('/services')
+ return self._result(self._get(url, params=params), True)
+
+ @utils.minimum_version('1.25')
+ @utils.check_resource('service')
+ def service_logs(self, service, details=False, follow=False, stdout=False,
+ stderr=False, since=0, timestamps=False, tail='all',
+ is_tty=None):
+ """
+ Get log stream for a service.
+ Note: This endpoint works only for services with the ``json-file``
+ or ``journald`` logging drivers.
+
+ Args:
+ service (str): ID or name of the service
+ details (bool): Show extra details provided to logs.
+ Default: ``False``
+ follow (bool): Keep connection open to read logs as they are
+ sent by the Engine. Default: ``False``
+ stdout (bool): Return logs from ``stdout``. Default: ``False``
+ stderr (bool): Return logs from ``stderr``. Default: ``False``
+ since (int): UNIX timestamp for the logs staring point.
+ Default: 0
+ timestamps (bool): Add timestamps to every log line.
+ tail (string or int): Number of log lines to be returned,
+ counting from the current end of the logs. Specify an
+ integer or ``'all'`` to output all log lines.
+ Default: ``all``
+ is_tty (bool): Whether the service's :py:class:`ContainerSpec`
+ enables the TTY option. If omitted, the method will query
+ the Engine for the information, causing an additional
+ roundtrip.
+
+ Returns (generator): Logs for the service.
+ """
+ params = {
+ 'details': details,
+ 'follow': follow,
+ 'stdout': stdout,
+ 'stderr': stderr,
+ 'since': since,
+ 'timestamps': timestamps,
+ 'tail': tail
+ }
+
+ url = self._url('/services/{0}/logs', service)
+ res = self._get(url, params=params, stream=True)
+ if is_tty is None:
+ is_tty = self.inspect_service(
+ service
+ )['Spec']['TaskTemplate']['ContainerSpec'].get('TTY', False)
+ return self._get_result_tty(True, res, is_tty)
+
+ @utils.minimum_version('1.24')
+ def tasks(self, filters=None):
+ """
+ Retrieve a list of tasks.
+
+ Args:
+ filters (dict): A map of filters to process on the tasks list.
+ Valid filters: ``id``, ``name``, ``service``, ``node``,
+ ``label`` and ``desired-state``.
+
+ Returns:
+ (:py:class:`list`): List of task dictionaries.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ params = {
+ 'filters': utils.convert_filters(filters) if filters else None
+ }
+ url = self._url('/tasks')
+ return self._result(self._get(url, params=params), True)
+
+ @utils.minimum_version('1.24')
+ @utils.check_resource('service')
+ def update_service(self, service, version, task_template=None, name=None,
+ labels=None, mode=None, update_config=None,
+ networks=None, endpoint_config=None,
+ endpoint_spec=None, fetch_current_spec=False,
+ rollback_config=None):
+ """
+ Update a service.
+
+ Args:
+ service (string): A service identifier (either its name or service
+ ID).
+ version (int): The version number of the service object being
+ updated. This is required to avoid conflicting writes.
+ task_template (TaskTemplate): Specification of the updated task to
+ start as part of the service.
+ name (string): New name for the service. Optional.
+ labels (dict): A map of labels to associate with the service.
+ Optional.
+ mode (ServiceMode): Scheduling mode for the service (replicated
+ or global). Defaults to replicated.
+ update_config (UpdateConfig): Specification for the update strategy
+ of the service. Default: ``None``.
+ rollback_config (RollbackConfig): Specification for the rollback
+ strategy of the service. Default: ``None``
+ networks (:py:class:`list`): List of network names or IDs or
+ :py:class:`~docker.types.NetworkAttachmentConfig` to attach the
+ service to. Default: ``None``.
+ endpoint_spec (EndpointSpec): Properties that can be configured to
+ access and load balance a service. Default: ``None``.
+ fetch_current_spec (boolean): Use the undefined settings from the
+ current specification of the service. Default: ``False``
+
+ Returns:
+ A dictionary containing a ``Warnings`` key.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ _check_api_features(
+ self._version, task_template, update_config, endpoint_spec,
+ rollback_config
+ )
+
+ if fetch_current_spec:
+ inspect_defaults = True
+ if utils.version_lt(self._version, '1.29'):
+ inspect_defaults = None
+ current = self.inspect_service(
+ service, insert_defaults=inspect_defaults
+ )['Spec']
+
+ else:
+ current = {}
+
+ url = self._url('/services/{0}/update', service)
+ data = {}
+ headers = {}
+
+ data['Name'] = current.get('Name') if name is None else name
+
+ data['Labels'] = current.get('Labels') if labels is None else labels
+
+ if mode is not None:
+ if not isinstance(mode, dict):
+ mode = ServiceMode(mode)
+ data['Mode'] = mode
+ else:
+ data['Mode'] = current.get('Mode')
+
+ data['TaskTemplate'] = _merge_task_template(
+ current.get('TaskTemplate', {}), task_template
+ )
+
+ container_spec = data['TaskTemplate'].get('ContainerSpec', {})
+ image = container_spec.get('Image', None)
+ if image is not None:
+ registry, repo_name = auth.resolve_repository_name(image)
+ auth_header = auth.get_config_header(self, registry)
+ if auth_header:
+ headers['X-Registry-Auth'] = auth_header
+
+ if update_config is not None:
+ data['UpdateConfig'] = update_config
+ else:
+ data['UpdateConfig'] = current.get('UpdateConfig')
+
+ if rollback_config is not None:
+ data['RollbackConfig'] = rollback_config
+ else:
+ data['RollbackConfig'] = current.get('RollbackConfig')
+
+ if networks is not None:
+ converted_networks = utils.convert_service_networks(networks)
+ if utils.version_lt(self._version, '1.25'):
+ data['Networks'] = converted_networks
+ else:
+ data['TaskTemplate']['Networks'] = converted_networks
+ elif utils.version_lt(self._version, '1.25'):
+ data['Networks'] = current.get('Networks')
+ elif data['TaskTemplate'].get('Networks') is None:
+ current_task_template = current.get('TaskTemplate', {})
+ current_networks = current_task_template.get('Networks')
+ if current_networks is None:
+ current_networks = current.get('Networks')
+ if current_networks is not None:
+ data['TaskTemplate']['Networks'] = current_networks
+
+ if endpoint_spec is not None:
+ data['EndpointSpec'] = endpoint_spec
+ else:
+ data['EndpointSpec'] = current.get('EndpointSpec')
+
+ resp = self._post_json(
+ url, data=data, params={'version': version}, headers=headers
+ )
+ return self._result(resp, json=True)
diff --git a/contrib/python/docker/docker/api/swarm.py b/contrib/python/docker/docker/api/swarm.py
new file mode 100644
index 00000000000..d60d18b619c
--- /dev/null
+++ b/contrib/python/docker/docker/api/swarm.py
@@ -0,0 +1,462 @@
+import http.client as http_client
+import logging
+
+from .. import errors, types, utils
+from ..constants import DEFAULT_SWARM_ADDR_POOL, DEFAULT_SWARM_SUBNET_SIZE
+
+log = logging.getLogger(__name__)
+
+
+class SwarmApiMixin:
+
+ def create_swarm_spec(self, *args, **kwargs):
+ """
+ Create a :py:class:`docker.types.SwarmSpec` instance that can be used
+ as the ``swarm_spec`` argument in
+ :py:meth:`~docker.api.swarm.SwarmApiMixin.init_swarm`.
+
+ Args:
+ task_history_retention_limit (int): Maximum number of tasks
+ history stored.
+ snapshot_interval (int): Number of logs entries between snapshot.
+ keep_old_snapshots (int): Number of snapshots to keep beyond the
+ current snapshot.
+ log_entries_for_slow_followers (int): Number of log entries to
+ keep around to sync up slow followers after a snapshot is
+ created.
+ heartbeat_tick (int): Amount of ticks (in seconds) between each
+ heartbeat.
+ election_tick (int): Amount of ticks (in seconds) needed without a
+ leader to trigger a new election.
+ dispatcher_heartbeat_period (int): The delay for an agent to send
+ a heartbeat to the dispatcher.
+ node_cert_expiry (int): Automatic expiry for nodes certificates.
+ external_cas (:py:class:`list`): Configuration for forwarding
+ signing requests to an external certificate authority. Use
+ a list of :py:class:`docker.types.SwarmExternalCA`.
+ name (string): Swarm's name
+ labels (dict): User-defined key/value metadata.
+ signing_ca_cert (str): The desired signing CA certificate for all
+ swarm node TLS leaf certificates, in PEM format.
+ signing_ca_key (str): The desired signing CA key for all swarm
+ node TLS leaf certificates, in PEM format.
+ ca_force_rotate (int): An integer whose purpose is to force swarm
+ to generate a new signing CA certificate and key, if none have
+ been specified.
+ autolock_managers (boolean): If set, generate a key and use it to
+ lock data stored on the managers.
+ log_driver (DriverConfig): The default log driver to use for tasks
+ created in the orchestrator.
+
+ Returns:
+ :py:class:`docker.types.SwarmSpec`
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> spec = client.api.create_swarm_spec(
+ snapshot_interval=5000, log_entries_for_slow_followers=1200
+ )
+ >>> client.api.init_swarm(
+ advertise_addr='eth0', listen_addr='0.0.0.0:5000',
+ force_new_cluster=False, swarm_spec=spec
+ )
+ """
+ ext_ca = kwargs.pop('external_ca', None)
+ if ext_ca:
+ kwargs['external_cas'] = [ext_ca]
+ return types.SwarmSpec(self._version, *args, **kwargs)
+
+ @utils.minimum_version('1.24')
+ def get_unlock_key(self):
+ """
+ Get the unlock key for this Swarm manager.
+
+ Returns:
+ A ``dict`` containing an ``UnlockKey`` member
+ """
+ return self._result(self._get(self._url('/swarm/unlockkey')), True)
+
+ @utils.minimum_version('1.24')
+ def init_swarm(self, advertise_addr=None, listen_addr='0.0.0.0:2377',
+ force_new_cluster=False, swarm_spec=None,
+ default_addr_pool=None, subnet_size=None,
+ data_path_addr=None, data_path_port=None):
+ """
+ Initialize a new Swarm using the current connected engine as the first
+ node.
+
+ Args:
+ advertise_addr (string): Externally reachable address advertised
+ to other nodes. This can either be an address/port combination
+ in the form ``192.168.1.1:4567``, or an interface followed by a
+ port number, like ``eth0:4567``. If the port number is omitted,
+ the port number from the listen address is used. If
+ ``advertise_addr`` is not specified, it will be automatically
+ detected when possible. Default: None
+ listen_addr (string): Listen address used for inter-manager
+ communication, as well as determining the networking interface
+ used for the VXLAN Tunnel Endpoint (VTEP). This can either be
+ an address/port combination in the form ``192.168.1.1:4567``,
+ or an interface followed by a port number, like ``eth0:4567``.
+ If the port number is omitted, the default swarm listening port
+ is used. Default: '0.0.0.0:2377'
+ force_new_cluster (bool): Force creating a new Swarm, even if
+ already part of one. Default: False
+ swarm_spec (dict): Configuration settings of the new Swarm. Use
+ ``APIClient.create_swarm_spec`` to generate a valid
+ configuration. Default: None
+ default_addr_pool (list of strings): Default Address Pool specifies
+ default subnet pools for global scope networks. Each pool
+ should be specified as a CIDR block, like '10.0.0.0/8'.
+ Default: None
+ subnet_size (int): SubnetSize specifies the subnet size of the
+ networks created from the default subnet pool. Default: None
+ data_path_addr (string): Address or interface to use for data path
+ traffic. For example, 192.168.1.1, or an interface, like eth0.
+ data_path_port (int): Port number to use for data path traffic.
+ Acceptable port range is 1024 to 49151. If set to ``None`` or
+ 0, the default port 4789 will be used. Default: None
+
+ Returns:
+ (str): The ID of the created node.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ url = self._url('/swarm/init')
+ if swarm_spec is not None and not isinstance(swarm_spec, dict):
+ raise TypeError('swarm_spec must be a dictionary')
+
+ if default_addr_pool is not None:
+ if utils.version_lt(self._version, '1.39'):
+ raise errors.InvalidVersion(
+ 'Address pool is only available for API version >= 1.39'
+ )
+ # subnet_size becomes 0 if not set with default_addr_pool
+ if subnet_size is None:
+ subnet_size = DEFAULT_SWARM_SUBNET_SIZE
+
+ if subnet_size is not None:
+ if utils.version_lt(self._version, '1.39'):
+ raise errors.InvalidVersion(
+ 'Subnet size is only available for API version >= 1.39'
+ )
+ # subnet_size is ignored if set without default_addr_pool
+ if default_addr_pool is None:
+ default_addr_pool = DEFAULT_SWARM_ADDR_POOL
+
+ data = {
+ 'AdvertiseAddr': advertise_addr,
+ 'ListenAddr': listen_addr,
+ 'DefaultAddrPool': default_addr_pool,
+ 'SubnetSize': subnet_size,
+ 'ForceNewCluster': force_new_cluster,
+ 'Spec': swarm_spec,
+ }
+
+ if data_path_addr is not None:
+ if utils.version_lt(self._version, '1.30'):
+ raise errors.InvalidVersion(
+ 'Data address path is only available for '
+ 'API version >= 1.30'
+ )
+ data['DataPathAddr'] = data_path_addr
+
+ if data_path_port is not None:
+ if utils.version_lt(self._version, '1.40'):
+ raise errors.InvalidVersion(
+ 'Data path port is only available for '
+ 'API version >= 1.40'
+ )
+ data['DataPathPort'] = data_path_port
+
+ response = self._post_json(url, data=data)
+ return self._result(response, json=True)
+
+ @utils.minimum_version('1.24')
+ def inspect_swarm(self):
+ """
+ Retrieve low-level information about the current swarm.
+
+ Returns:
+ A dictionary containing data about the swarm.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/swarm')
+ return self._result(self._get(url), True)
+
+ @utils.check_resource('node_id')
+ @utils.minimum_version('1.24')
+ def inspect_node(self, node_id):
+ """
+ Retrieve low-level information about a swarm node
+
+ Args:
+ node_id (string): ID of the node to be inspected.
+
+ Returns:
+ A dictionary containing data about this node.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/nodes/{0}', node_id)
+ return self._result(self._get(url), True)
+
+ @utils.minimum_version('1.24')
+ def join_swarm(self, remote_addrs, join_token, listen_addr='0.0.0.0:2377',
+ advertise_addr=None, data_path_addr=None):
+ """
+ Make this Engine join a swarm that has already been created.
+
+ Args:
+ remote_addrs (:py:class:`list`): Addresses of one or more manager
+ nodes already participating in the Swarm to join.
+ join_token (string): Secret token for joining this Swarm.
+ listen_addr (string): Listen address used for inter-manager
+ communication if the node gets promoted to manager, as well as
+ determining the networking interface used for the VXLAN Tunnel
+ Endpoint (VTEP). Default: ``'0.0.0.0:2377``
+ advertise_addr (string): Externally reachable address advertised
+ to other nodes. This can either be an address/port combination
+ in the form ``192.168.1.1:4567``, or an interface followed by a
+ port number, like ``eth0:4567``. If the port number is omitted,
+ the port number from the listen address is used. If
+ AdvertiseAddr is not specified, it will be automatically
+ detected when possible. Default: ``None``
+ data_path_addr (string): Address or interface to use for data path
+ traffic. For example, 192.168.1.1, or an interface, like eth0.
+
+ Returns:
+ ``True`` if the request went through.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ data = {
+ 'RemoteAddrs': remote_addrs,
+ 'ListenAddr': listen_addr,
+ 'JoinToken': join_token,
+ 'AdvertiseAddr': advertise_addr,
+ }
+
+ if data_path_addr is not None:
+ if utils.version_lt(self._version, '1.30'):
+ raise errors.InvalidVersion(
+ 'Data address path is only available for '
+ 'API version >= 1.30'
+ )
+ data['DataPathAddr'] = data_path_addr
+
+ url = self._url('/swarm/join')
+ response = self._post_json(url, data=data)
+ self._raise_for_status(response)
+ return True
+
+ @utils.minimum_version('1.24')
+ def leave_swarm(self, force=False):
+ """
+ Leave a swarm.
+
+ Args:
+ force (bool): Leave the swarm even if this node is a manager.
+ Default: ``False``
+
+ Returns:
+ ``True`` if the request went through.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/swarm/leave')
+ response = self._post(url, params={'force': force})
+ # Ignore "this node is not part of a swarm" error
+ if force and response.status_code == http_client.NOT_ACCEPTABLE:
+ return True
+ # FIXME: Temporary workaround for 1.13.0-rc bug
+ # https://github.com/docker/docker/issues/29192
+ if force and response.status_code == http_client.SERVICE_UNAVAILABLE:
+ return True
+ self._raise_for_status(response)
+ return True
+
+ @utils.minimum_version('1.24')
+ def nodes(self, filters=None):
+ """
+ List swarm nodes.
+
+ Args:
+ filters (dict): Filters to process on the nodes list. Valid
+ filters: ``id``, ``name``, ``membership`` and ``role``.
+ Default: ``None``
+
+ Returns:
+ A list of dictionaries containing data about each swarm node.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/nodes')
+ params = {}
+ if filters:
+ params['filters'] = utils.convert_filters(filters)
+
+ return self._result(self._get(url, params=params), True)
+
+ @utils.check_resource('node_id')
+ @utils.minimum_version('1.24')
+ def remove_node(self, node_id, force=False):
+ """
+ Remove a node from the swarm.
+
+ Args:
+ node_id (string): ID of the node to be removed.
+ force (bool): Force remove an active node. Default: `False`
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ If the node referenced doesn't exist in the swarm.
+
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ Returns:
+ `True` if the request was successful.
+ """
+ url = self._url('/nodes/{0}', node_id)
+ params = {
+ 'force': force
+ }
+ res = self._delete(url, params=params)
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.24')
+ def unlock_swarm(self, key):
+ """
+ Unlock a locked swarm.
+
+ Args:
+ key (string): The unlock key as provided by
+ :py:meth:`get_unlock_key`
+
+ Raises:
+ :py:class:`docker.errors.InvalidArgument`
+ If the key argument is in an incompatible format
+
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Returns:
+ `True` if the request was successful.
+
+ Example:
+
+ >>> key = client.api.get_unlock_key()
+ >>> client.unlock_swarm(key)
+
+ """
+ if isinstance(key, dict):
+ if 'UnlockKey' not in key:
+ raise errors.InvalidArgument('Invalid unlock key format')
+ else:
+ key = {'UnlockKey': key}
+
+ url = self._url('/swarm/unlock')
+ res = self._post_json(url, data=key)
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.24')
+ def update_node(self, node_id, version, node_spec=None):
+ """
+ Update the node's configuration
+
+ Args:
+
+ node_id (string): ID of the node to be updated.
+ version (int): The version number of the node object being
+ updated. This is required to avoid conflicting writes.
+ node_spec (dict): Configuration settings to update. Any values
+ not provided will be removed. Default: ``None``
+
+ Returns:
+ `True` if the request went through.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> node_spec = {'Availability': 'active',
+ 'Name': 'node-name',
+ 'Role': 'manager',
+ 'Labels': {'foo': 'bar'}
+ }
+ >>> client.api.update_node(node_id='24ifsmvkjbyhk', version=8,
+ node_spec=node_spec)
+
+ """
+ url = self._url('/nodes/{0}/update?version={1}', node_id, str(version))
+ res = self._post_json(url, data=node_spec)
+ self._raise_for_status(res)
+ return True
+
+ @utils.minimum_version('1.24')
+ def update_swarm(self, version, swarm_spec=None,
+ rotate_worker_token=False,
+ rotate_manager_token=False,
+ rotate_manager_unlock_key=False):
+ """
+ Update the Swarm's configuration
+
+ Args:
+ version (int): The version number of the swarm object being
+ updated. This is required to avoid conflicting writes.
+ swarm_spec (dict): Configuration settings to update. Use
+ :py:meth:`~docker.api.swarm.SwarmApiMixin.create_swarm_spec` to
+ generate a valid configuration. Default: ``None``.
+ rotate_worker_token (bool): Rotate the worker join token. Default:
+ ``False``.
+ rotate_manager_token (bool): Rotate the manager join token.
+ Default: ``False``.
+ rotate_manager_unlock_key (bool): Rotate the manager unlock key.
+ Default: ``False``.
+
+ Returns:
+ ``True`` if the request went through.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ url = self._url('/swarm/update')
+ params = {
+ 'rotateWorkerToken': rotate_worker_token,
+ 'rotateManagerToken': rotate_manager_token,
+ 'version': version
+ }
+ if rotate_manager_unlock_key:
+ if utils.version_lt(self._version, '1.25'):
+ raise errors.InvalidVersion(
+ 'Rotate manager unlock key '
+ 'is only available for API version >= 1.25'
+ )
+ params['rotateManagerUnlockKey'] = rotate_manager_unlock_key
+
+ response = self._post_json(url, data=swarm_spec, params=params)
+ self._raise_for_status(response)
+ return True
diff --git a/contrib/python/docker/docker/api/volume.py b/contrib/python/docker/docker/api/volume.py
new file mode 100644
index 00000000000..c6c036fad06
--- /dev/null
+++ b/contrib/python/docker/docker/api/volume.py
@@ -0,0 +1,163 @@
+from .. import errors, utils
+
+
+class VolumeApiMixin:
+ def volumes(self, filters=None):
+ """
+ List volumes currently registered by the docker daemon. Similar to the
+ ``docker volume ls`` command.
+
+ Args:
+ filters (dict): Server-side list filtering options.
+
+ Returns:
+ (dict): Dictionary with list of volume objects as value of the
+ ``Volumes`` key.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> client.api.volumes()
+ {u'Volumes': [{u'Driver': u'local',
+ u'Mountpoint': u'/var/lib/docker/volumes/foobar/_data',
+ u'Name': u'foobar'},
+ {u'Driver': u'local',
+ u'Mountpoint': u'/var/lib/docker/volumes/baz/_data',
+ u'Name': u'baz'}]}
+ """
+
+ params = {
+ 'filters': utils.convert_filters(filters) if filters else None
+ }
+ url = self._url('/volumes')
+ return self._result(self._get(url, params=params), True)
+
+ def create_volume(self, name=None, driver=None, driver_opts=None,
+ labels=None):
+ """
+ Create and register a named volume
+
+ Args:
+ name (str): Name of the volume
+ driver (str): Name of the driver used to create the volume
+ driver_opts (dict): Driver options as a key-value dictionary
+ labels (dict): Labels to set on the volume
+
+ Returns:
+ (dict): The created volume reference object
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> volume = client.api.create_volume(
+ ... name='foobar',
+ ... driver='local',
+ ... driver_opts={'foo': 'bar', 'baz': 'false'},
+ ... labels={"key": "value"},
+ ... )
+ ... print(volume)
+ {u'Driver': u'local',
+ u'Labels': {u'key': u'value'},
+ u'Mountpoint': u'/var/lib/docker/volumes/foobar/_data',
+ u'Name': u'foobar',
+ u'Scope': u'local'}
+
+ """
+ url = self._url('/volumes/create')
+ if driver_opts is not None and not isinstance(driver_opts, dict):
+ raise TypeError('driver_opts must be a dictionary')
+
+ data = {
+ 'Name': name,
+ 'Driver': driver,
+ 'DriverOpts': driver_opts,
+ }
+
+ if labels is not None:
+ if utils.compare_version('1.23', self._version) < 0:
+ raise errors.InvalidVersion(
+ 'volume labels were introduced in API 1.23'
+ )
+ if not isinstance(labels, dict):
+ raise TypeError('labels must be a dictionary')
+ data["Labels"] = labels
+
+ return self._result(self._post_json(url, data=data), True)
+
+ def inspect_volume(self, name):
+ """
+ Retrieve volume info by name.
+
+ Args:
+ name (str): volume name
+
+ Returns:
+ (dict): Volume information dictionary
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> client.api.inspect_volume('foobar')
+ {u'Driver': u'local',
+ u'Mountpoint': u'/var/lib/docker/volumes/foobar/_data',
+ u'Name': u'foobar'}
+
+ """
+ url = self._url('/volumes/{0}', name)
+ return self._result(self._get(url), True)
+
+ @utils.minimum_version('1.25')
+ def prune_volumes(self, filters=None):
+ """
+ Delete unused volumes
+
+ Args:
+ filters (dict): Filters to process on the prune list.
+
+ Returns:
+ (dict): A dict containing a list of deleted volume names and
+ the amount of disk space reclaimed in bytes.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ params = {}
+ if filters:
+ params['filters'] = utils.convert_filters(filters)
+ url = self._url('/volumes/prune')
+ return self._result(self._post(url, params=params), True)
+
+ def remove_volume(self, name, force=False):
+ """
+ Remove a volume. Similar to the ``docker volume rm`` command.
+
+ Args:
+ name (str): The volume's name
+ force (bool): Force removal of volumes that were already removed
+ out of band by the volume driver plugin.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If volume failed to remove.
+ """
+ params = {}
+ if force:
+ if utils.version_lt(self._version, '1.25'):
+ raise errors.InvalidVersion(
+ 'force removal was introduced in API 1.25'
+ )
+ params = {'force': force}
+
+ url = self._url('/volumes/{0}', name, params=params)
+ resp = self._delete(url)
+ self._raise_for_status(resp)
diff --git a/contrib/python/docker/docker/auth.py b/contrib/python/docker/docker/auth.py
new file mode 100644
index 00000000000..96a6e3a656e
--- /dev/null
+++ b/contrib/python/docker/docker/auth.py
@@ -0,0 +1,378 @@
+import base64
+import json
+import logging
+
+from . import credentials, errors
+from .utils import config
+
+INDEX_NAME = 'docker.io'
+INDEX_URL = f'https://index.{INDEX_NAME}/v1/'
+TOKEN_USERNAME = '<token>'
+
+log = logging.getLogger(__name__)
+
+
+def resolve_repository_name(repo_name):
+ if '://' in repo_name:
+ raise errors.InvalidRepository(
+ f'Repository name cannot contain a scheme ({repo_name})'
+ )
+
+ index_name, remote_name = split_repo_name(repo_name)
+ if index_name[0] == '-' or index_name[-1] == '-':
+ raise errors.InvalidRepository(
+ f'Invalid index name ({index_name}). '
+ 'Cannot begin or end with a hyphen.'
+ )
+ return resolve_index_name(index_name), remote_name
+
+
+def resolve_index_name(index_name):
+ index_name = convert_to_hostname(index_name)
+ if index_name == f"index.{INDEX_NAME}":
+ index_name = INDEX_NAME
+ return index_name
+
+
+def get_config_header(client, registry):
+ log.debug('Looking for auth config')
+ if not client._auth_configs or client._auth_configs.is_empty:
+ log.debug(
+ "No auth config in memory - loading from filesystem"
+ )
+ client._auth_configs = load_config(credstore_env=client.credstore_env)
+ authcfg = resolve_authconfig(
+ client._auth_configs, registry, credstore_env=client.credstore_env
+ )
+ # Do not fail here if no authentication exists for this
+ # specific registry as we can have a readonly pull. Just
+ # put the header if we can.
+ if authcfg:
+ log.debug('Found auth config')
+ # auth_config needs to be a dict in the format used by
+ # auth.py username , password, serveraddress, email
+ return encode_header(authcfg)
+ log.debug('No auth config found')
+ return None
+
+
+def split_repo_name(repo_name):
+ parts = repo_name.split('/', 1)
+ if len(parts) == 1 or (
+ '.' not in parts[0] and ':' not in parts[0] and parts[0] != 'localhost'
+ ):
+ # This is a docker index repo (ex: username/foobar or ubuntu)
+ return INDEX_NAME, repo_name
+ return tuple(parts)
+
+
+def get_credential_store(authconfig, registry):
+ if not isinstance(authconfig, AuthConfig):
+ authconfig = AuthConfig(authconfig)
+ return authconfig.get_credential_store(registry)
+
+
+class AuthConfig(dict):
+ def __init__(self, dct, credstore_env=None):
+ if 'auths' not in dct:
+ dct['auths'] = {}
+ self.update(dct)
+ self._credstore_env = credstore_env
+ self._stores = {}
+
+ @classmethod
+ def parse_auth(cls, entries, raise_on_error=False):
+ """
+ Parses authentication entries
+
+ Args:
+ entries: Dict of authentication entries.
+ raise_on_error: If set to true, an invalid format will raise
+ InvalidConfigFile
+
+ Returns:
+ Authentication registry.
+ """
+
+ conf = {}
+ for registry, entry in entries.items():
+ if not isinstance(entry, dict):
+ log.debug(
+ f'Config entry for key {registry} is not auth config'
+ )
+ # We sometimes fall back to parsing the whole config as if it
+ # was the auth config by itself, for legacy purposes. In that
+ # case, we fail silently and return an empty conf if any of the
+ # keys is not formatted properly.
+ if raise_on_error:
+ raise errors.InvalidConfigFile(
+ f'Invalid configuration for registry {registry}'
+ )
+ return {}
+ if 'identitytoken' in entry:
+ log.debug(f'Found an IdentityToken entry for registry {registry}')
+ conf[registry] = {
+ 'IdentityToken': entry['identitytoken']
+ }
+ continue # Other values are irrelevant if we have a token
+
+ if 'auth' not in entry:
+ # Starting with engine v1.11 (API 1.23), an empty dictionary is
+ # a valid value in the auths config.
+ # https://github.com/docker/compose/issues/3265
+ log.debug(
+ f'Auth data for {registry} is absent. '
+ f'Client might be using a credentials store instead.'
+ )
+ conf[registry] = {}
+ continue
+
+ username, password = decode_auth(entry['auth'])
+ log.debug(
+ f'Found entry (registry={registry!r}, username={username!r})'
+ )
+
+ conf[registry] = {
+ 'username': username,
+ 'password': password,
+ 'email': entry.get('email'),
+ 'serveraddress': registry,
+ }
+ return conf
+
+ @classmethod
+ def load_config(cls, config_path, config_dict, credstore_env=None):
+ """
+ Loads authentication data from a Docker configuration file in the given
+ root directory or if config_path is passed use given path.
+ Lookup priority:
+ explicit config_path parameter > DOCKER_CONFIG environment
+ variable > ~/.docker/config.json > ~/.dockercfg
+ """
+
+ if not config_dict:
+ config_file = config.find_config_file(config_path)
+
+ if not config_file:
+ return cls({}, credstore_env)
+ try:
+ with open(config_file) as f:
+ config_dict = json.load(f)
+ except (OSError, KeyError, ValueError) as e:
+ # Likely missing new Docker config file or it's in an
+ # unknown format, continue to attempt to read old location
+ # and format.
+ log.debug(e)
+ return cls(_load_legacy_config(config_file), credstore_env)
+
+ res = {}
+ if config_dict.get('auths'):
+ log.debug("Found 'auths' section")
+ res.update({
+ 'auths': cls.parse_auth(
+ config_dict.pop('auths'), raise_on_error=True
+ )
+ })
+ if config_dict.get('credsStore'):
+ log.debug("Found 'credsStore' section")
+ res.update({'credsStore': config_dict.pop('credsStore')})
+ if config_dict.get('credHelpers'):
+ log.debug("Found 'credHelpers' section")
+ res.update({'credHelpers': config_dict.pop('credHelpers')})
+ if res:
+ return cls(res, credstore_env)
+
+ log.debug(
+ "Couldn't find auth-related section ; attempting to interpret "
+ "as auth-only file"
+ )
+ return cls({'auths': cls.parse_auth(config_dict)}, credstore_env)
+
+ @property
+ def auths(self):
+ return self.get('auths', {})
+
+ @property
+ def creds_store(self):
+ return self.get('credsStore', None)
+
+ @property
+ def cred_helpers(self):
+ return self.get('credHelpers', {})
+
+ @property
+ def is_empty(self):
+ return (
+ not self.auths and not self.creds_store and not self.cred_helpers
+ )
+
+ def resolve_authconfig(self, registry=None):
+ """
+ Returns the authentication data from the given auth configuration for a
+ specific registry. As with the Docker client, legacy entries in the
+ config with full URLs are stripped down to hostnames before checking
+ for a match. Returns None if no match was found.
+ """
+
+ if self.creds_store or self.cred_helpers:
+ store_name = self.get_credential_store(registry)
+ if store_name is not None:
+ log.debug(
+ f'Using credentials store "{store_name}"'
+ )
+ cfg = self._resolve_authconfig_credstore(registry, store_name)
+ if cfg is not None:
+ return cfg
+ log.debug('No entry in credstore - fetching from auth dict')
+
+ # Default to the public index server
+ registry = resolve_index_name(registry) if registry else INDEX_NAME
+ log.debug(f"Looking for auth entry for {repr(registry)}")
+
+ if registry in self.auths:
+ log.debug(f"Found {repr(registry)}")
+ return self.auths[registry]
+
+ for key, conf in self.auths.items():
+ if resolve_index_name(key) == registry:
+ log.debug(f"Found {repr(key)}")
+ return conf
+
+ log.debug("No entry found")
+ return None
+
+ def _resolve_authconfig_credstore(self, registry, credstore_name):
+ if not registry or registry == INDEX_NAME:
+ # The ecosystem is a little schizophrenic with index.docker.io VS
+ # docker.io - in that case, it seems the full URL is necessary.
+ registry = INDEX_URL
+ log.debug(f"Looking for auth entry for {repr(registry)}")
+ store = self._get_store_instance(credstore_name)
+ try:
+ data = store.get(registry)
+ res = {
+ 'ServerAddress': registry,
+ }
+ if data['Username'] == TOKEN_USERNAME:
+ res['IdentityToken'] = data['Secret']
+ else:
+ res.update({
+ 'Username': data['Username'],
+ 'Password': data['Secret'],
+ })
+ return res
+ except credentials.CredentialsNotFound:
+ log.debug('No entry found')
+ return None
+ except credentials.StoreError as e:
+ raise errors.DockerException(
+ f'Credentials store error: {repr(e)}'
+ ) from e
+
+ def _get_store_instance(self, name):
+ if name not in self._stores:
+ self._stores[name] = credentials.Store(
+ name, environment=self._credstore_env
+ )
+ return self._stores[name]
+
+ def get_credential_store(self, registry):
+ if not registry or registry == INDEX_NAME:
+ registry = INDEX_URL
+
+ return self.cred_helpers.get(registry) or self.creds_store
+
+ def get_all_credentials(self):
+ auth_data = self.auths.copy()
+ if self.creds_store:
+ # Retrieve all credentials from the default store
+ store = self._get_store_instance(self.creds_store)
+ for k in store.list().keys():
+ auth_data[k] = self._resolve_authconfig_credstore(
+ k, self.creds_store
+ )
+ auth_data[convert_to_hostname(k)] = auth_data[k]
+
+ # credHelpers entries take priority over all others
+ for reg, store_name in self.cred_helpers.items():
+ auth_data[reg] = self._resolve_authconfig_credstore(
+ reg, store_name
+ )
+ auth_data[convert_to_hostname(reg)] = auth_data[reg]
+
+ return auth_data
+
+ def add_auth(self, reg, data):
+ self['auths'][reg] = data
+
+
+def resolve_authconfig(authconfig, registry=None, credstore_env=None):
+ if not isinstance(authconfig, AuthConfig):
+ authconfig = AuthConfig(authconfig, credstore_env)
+ return authconfig.resolve_authconfig(registry)
+
+
+def convert_to_hostname(url):
+ return url.replace('http://', '').replace('https://', '').split('/', 1)[0]
+
+
+def decode_auth(auth):
+ if isinstance(auth, str):
+ auth = auth.encode('ascii')
+ s = base64.b64decode(auth)
+ login, pwd = s.split(b':', 1)
+ return login.decode('utf8'), pwd.decode('utf8')
+
+
+def encode_header(auth):
+ auth_json = json.dumps(auth).encode('ascii')
+ return base64.urlsafe_b64encode(auth_json)
+
+
+def parse_auth(entries, raise_on_error=False):
+ """
+ Parses authentication entries
+
+ Args:
+ entries: Dict of authentication entries.
+ raise_on_error: If set to true, an invalid format will raise
+ InvalidConfigFile
+
+ Returns:
+ Authentication registry.
+ """
+
+ return AuthConfig.parse_auth(entries, raise_on_error)
+
+
+def load_config(config_path=None, config_dict=None, credstore_env=None):
+ return AuthConfig.load_config(config_path, config_dict, credstore_env)
+
+
+def _load_legacy_config(config_file):
+ log.debug("Attempting to parse legacy auth file format")
+ try:
+ data = []
+ with open(config_file) as f:
+ for line in f.readlines():
+ data.append(line.strip().split(' = ')[1])
+ if len(data) < 2:
+ # Not enough data
+ raise errors.InvalidConfigFile(
+ 'Invalid or empty configuration file!'
+ )
+
+ username, password = decode_auth(data[0])
+ return {'auths': {
+ INDEX_NAME: {
+ 'username': username,
+ 'password': password,
+ 'email': data[1],
+ 'serveraddress': INDEX_URL,
+ }
+ }}
+ except Exception as e:
+ log.debug(e)
+
+ log.debug("All parsing attempts failed - returning empty config")
+ return {}
diff --git a/contrib/python/docker/docker/client.py b/contrib/python/docker/docker/client.py
new file mode 100644
index 00000000000..9012d24c9c1
--- /dev/null
+++ b/contrib/python/docker/docker/client.py
@@ -0,0 +1,222 @@
+from .api.client import APIClient
+from .constants import DEFAULT_MAX_POOL_SIZE, DEFAULT_TIMEOUT_SECONDS
+from .models.configs import ConfigCollection
+from .models.containers import ContainerCollection
+from .models.images import ImageCollection
+from .models.networks import NetworkCollection
+from .models.nodes import NodeCollection
+from .models.plugins import PluginCollection
+from .models.secrets import SecretCollection
+from .models.services import ServiceCollection
+from .models.swarm import Swarm
+from .models.volumes import VolumeCollection
+from .utils import kwargs_from_env
+
+
+class DockerClient:
+ """
+ A client for communicating with a Docker server.
+
+ Example:
+
+ >>> import docker
+ >>> client = docker.DockerClient(base_url='unix://var/run/docker.sock')
+
+ Args:
+ base_url (str): URL to the Docker server. For example,
+ ``unix:///var/run/docker.sock`` or ``tcp://127.0.0.1:1234``.
+ version (str): The version of the API to use. Set to ``auto`` to
+ automatically detect the server's version. Default: ``1.35``
+ timeout (int): Default timeout for API calls, in seconds.
+ tls (bool or :py:class:`~docker.tls.TLSConfig`): Enable TLS. Pass
+ ``True`` to enable it with default options, or pass a
+ :py:class:`~docker.tls.TLSConfig` object to use custom
+ configuration.
+ user_agent (str): Set a custom user agent for requests to the server.
+ credstore_env (dict): Override environment variables when calling the
+ credential store process.
+ use_ssh_client (bool): If set to `True`, an ssh connection is made
+ via shelling out to the ssh client. Ensure the ssh client is
+ installed and configured on the host.
+ max_pool_size (int): The maximum number of connections
+ to save in the pool.
+ """
+ def __init__(self, *args, **kwargs):
+ self.api = APIClient(*args, **kwargs)
+
+ @classmethod
+ def from_env(cls, **kwargs):
+ """
+ Return a client configured from environment variables.
+
+ The environment variables used are the same as those used by the
+ Docker command-line client. They are:
+
+ .. envvar:: DOCKER_HOST
+
+ The URL to the Docker host.
+
+ .. envvar:: DOCKER_TLS_VERIFY
+
+ Verify the host against a CA certificate.
+
+ .. envvar:: DOCKER_CERT_PATH
+
+ A path to a directory containing TLS certificates to use when
+ connecting to the Docker host.
+
+ Args:
+ version (str): The version of the API to use. Set to ``auto`` to
+ automatically detect the server's version. Default: ``auto``
+ timeout (int): Default timeout for API calls, in seconds.
+ max_pool_size (int): The maximum number of connections
+ to save in the pool.
+ environment (dict): The environment to read environment variables
+ from. Default: the value of ``os.environ``
+ credstore_env (dict): Override environment variables when calling
+ the credential store process.
+ use_ssh_client (bool): If set to `True`, an ssh connection is
+ made via shelling out to the ssh client. Ensure the ssh
+ client is installed and configured on the host.
+
+ Example:
+
+ >>> import docker
+ >>> client = docker.from_env()
+
+ .. _`SSL version`:
+ https://docs.python.org/3.5/library/ssl.html#ssl.PROTOCOL_TLSv1
+ """
+ timeout = kwargs.pop('timeout', DEFAULT_TIMEOUT_SECONDS)
+ max_pool_size = kwargs.pop('max_pool_size', DEFAULT_MAX_POOL_SIZE)
+ version = kwargs.pop('version', None)
+ use_ssh_client = kwargs.pop('use_ssh_client', False)
+ return cls(
+ timeout=timeout,
+ max_pool_size=max_pool_size,
+ version=version,
+ use_ssh_client=use_ssh_client,
+ **kwargs_from_env(**kwargs)
+ )
+
+ # Resources
+ @property
+ def configs(self):
+ """
+ An object for managing configs on the server. See the
+ :doc:`configs documentation <configs>` for full details.
+ """
+ return ConfigCollection(client=self)
+
+ @property
+ def containers(self):
+ """
+ An object for managing containers on the server. See the
+ :doc:`containers documentation <containers>` for full details.
+ """
+ return ContainerCollection(client=self)
+
+ @property
+ def images(self):
+ """
+ An object for managing images on the server. See the
+ :doc:`images documentation <images>` for full details.
+ """
+ return ImageCollection(client=self)
+
+ @property
+ def networks(self):
+ """
+ An object for managing networks on the server. See the
+ :doc:`networks documentation <networks>` for full details.
+ """
+ return NetworkCollection(client=self)
+
+ @property
+ def nodes(self):
+ """
+ An object for managing nodes on the server. See the
+ :doc:`nodes documentation <nodes>` for full details.
+ """
+ return NodeCollection(client=self)
+
+ @property
+ def plugins(self):
+ """
+ An object for managing plugins on the server. See the
+ :doc:`plugins documentation <plugins>` for full details.
+ """
+ return PluginCollection(client=self)
+
+ @property
+ def secrets(self):
+ """
+ An object for managing secrets on the server. See the
+ :doc:`secrets documentation <secrets>` for full details.
+ """
+ return SecretCollection(client=self)
+
+ @property
+ def services(self):
+ """
+ An object for managing services on the server. See the
+ :doc:`services documentation <services>` for full details.
+ """
+ return ServiceCollection(client=self)
+
+ @property
+ def swarm(self):
+ """
+ An object for managing a swarm on the server. See the
+ :doc:`swarm documentation <swarm>` for full details.
+ """
+ return Swarm(client=self)
+
+ @property
+ def volumes(self):
+ """
+ An object for managing volumes on the server. See the
+ :doc:`volumes documentation <volumes>` for full details.
+ """
+ return VolumeCollection(client=self)
+
+ # Top-level methods
+ def events(self, *args, **kwargs):
+ return self.api.events(*args, **kwargs)
+ events.__doc__ = APIClient.events.__doc__
+
+ def df(self):
+ return self.api.df()
+ df.__doc__ = APIClient.df.__doc__
+
+ def info(self, *args, **kwargs):
+ return self.api.info(*args, **kwargs)
+ info.__doc__ = APIClient.info.__doc__
+
+ def login(self, *args, **kwargs):
+ return self.api.login(*args, **kwargs)
+ login.__doc__ = APIClient.login.__doc__
+
+ def ping(self, *args, **kwargs):
+ return self.api.ping(*args, **kwargs)
+ ping.__doc__ = APIClient.ping.__doc__
+
+ def version(self, *args, **kwargs):
+ return self.api.version(*args, **kwargs)
+ version.__doc__ = APIClient.version.__doc__
+
+ def close(self):
+ return self.api.close()
+ close.__doc__ = APIClient.close.__doc__
+
+ def __getattr__(self, name):
+ s = [f"'DockerClient' object has no attribute '{name}'"]
+ # If a user calls a method on APIClient, they
+ if hasattr(APIClient, name):
+ s.append("In Docker SDK for Python 2.0, this method is now on the "
+ "object APIClient. See the low-level API section of the "
+ "documentation for more details.")
+ raise AttributeError(' '.join(s))
+
+
+from_env = DockerClient.from_env
diff --git a/contrib/python/docker/docker/constants.py b/contrib/python/docker/docker/constants.py
new file mode 100644
index 00000000000..3c527b47e3a
--- /dev/null
+++ b/contrib/python/docker/docker/constants.py
@@ -0,0 +1,45 @@
+import sys
+
+from .version import __version__
+
+DEFAULT_DOCKER_API_VERSION = '1.44'
+MINIMUM_DOCKER_API_VERSION = '1.24'
+DEFAULT_TIMEOUT_SECONDS = 60
+STREAM_HEADER_SIZE_BYTES = 8
+CONTAINER_LIMITS_KEYS = [
+ 'memory', 'memswap', 'cpushares', 'cpusetcpus'
+]
+
+DEFAULT_HTTP_HOST = "127.0.0.1"
+DEFAULT_UNIX_SOCKET = "http+unix:///var/run/docker.sock"
+DEFAULT_NPIPE = 'npipe:////./pipe/docker_engine'
+
+BYTE_UNITS = {
+ 'b': 1,
+ 'k': 1024,
+ 'm': 1024 * 1024,
+ 'g': 1024 * 1024 * 1024
+}
+
+
+INSECURE_REGISTRY_DEPRECATION_WARNING = \
+ 'The `insecure_registry` argument to {} ' \
+ 'is deprecated and non-functional. Please remove it.'
+
+IS_WINDOWS_PLATFORM = (sys.platform == 'win32')
+WINDOWS_LONGPATH_PREFIX = '\\\\?\\'
+
+DEFAULT_USER_AGENT = f"docker-sdk-python/{__version__}"
+DEFAULT_NUM_POOLS = 25
+
+# The OpenSSH server default value for MaxSessions is 10 which means we can
+# use up to 9, leaving the final session for the underlying SSH connection.
+# For more details see: https://github.com/docker/docker-py/issues/2246
+DEFAULT_NUM_POOLS_SSH = 9
+
+DEFAULT_MAX_POOL_SIZE = 10
+
+DEFAULT_DATA_CHUNK_SIZE = 1024 * 2048
+
+DEFAULT_SWARM_ADDR_POOL = ['10.0.0.0/8']
+DEFAULT_SWARM_SUBNET_SIZE = 24
diff --git a/contrib/python/docker/docker/context/__init__.py b/contrib/python/docker/docker/context/__init__.py
new file mode 100644
index 00000000000..46d462b0cff
--- /dev/null
+++ b/contrib/python/docker/docker/context/__init__.py
@@ -0,0 +1,2 @@
+from .api import ContextAPI
+from .context import Context
diff --git a/contrib/python/docker/docker/context/api.py b/contrib/python/docker/docker/context/api.py
new file mode 100644
index 00000000000..9ac4ff470af
--- /dev/null
+++ b/contrib/python/docker/docker/context/api.py
@@ -0,0 +1,206 @@
+import json
+import os
+
+from docker import errors
+
+from .config import (
+ METAFILE,
+ get_current_context_name,
+ get_meta_dir,
+ write_context_name_to_docker_config,
+)
+from .context import Context
+
+
+class ContextAPI:
+ """Context API.
+ Contains methods for context management:
+ create, list, remove, get, inspect.
+ """
+ DEFAULT_CONTEXT = Context("default", "swarm")
+
+ @classmethod
+ def create_context(
+ cls, name, orchestrator=None, host=None, tls_cfg=None,
+ default_namespace=None, skip_tls_verify=False):
+ """Creates a new context.
+ Returns:
+ (Context): a Context object.
+ Raises:
+ :py:class:`docker.errors.MissingContextParameter`
+ If a context name is not provided.
+ :py:class:`docker.errors.ContextAlreadyExists`
+ If a context with the name already exists.
+ :py:class:`docker.errors.ContextException`
+ If name is default.
+
+ Example:
+
+ >>> from docker.context import ContextAPI
+ >>> ctx = ContextAPI.create_context(name='test')
+ >>> print(ctx.Metadata)
+ {
+ "Name": "test",
+ "Metadata": {},
+ "Endpoints": {
+ "docker": {
+ "Host": "unix:///var/run/docker.sock",
+ "SkipTLSVerify": false
+ }
+ }
+ }
+ """
+ if not name:
+ raise errors.MissingContextParameter("name")
+ if name == "default":
+ raise errors.ContextException(
+ '"default" is a reserved context name')
+ ctx = Context.load_context(name)
+ if ctx:
+ raise errors.ContextAlreadyExists(name)
+ endpoint = "docker"
+ if orchestrator and orchestrator != "swarm":
+ endpoint = orchestrator
+ ctx = Context(name, orchestrator)
+ ctx.set_endpoint(
+ endpoint, host, tls_cfg,
+ skip_tls_verify=skip_tls_verify,
+ def_namespace=default_namespace)
+ ctx.save()
+ return ctx
+
+ @classmethod
+ def get_context(cls, name=None):
+ """Retrieves a context object.
+ Args:
+ name (str): The name of the context
+
+ Example:
+
+ >>> from docker.context import ContextAPI
+ >>> ctx = ContextAPI.get_context(name='test')
+ >>> print(ctx.Metadata)
+ {
+ "Name": "test",
+ "Metadata": {},
+ "Endpoints": {
+ "docker": {
+ "Host": "unix:///var/run/docker.sock",
+ "SkipTLSVerify": false
+ }
+ }
+ }
+ """
+ if not name:
+ name = get_current_context_name()
+ if name == "default":
+ return cls.DEFAULT_CONTEXT
+ return Context.load_context(name)
+
+ @classmethod
+ def contexts(cls):
+ """Context list.
+ Returns:
+ (Context): List of context objects.
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ names = []
+ for dirname, dirnames, fnames in os.walk(get_meta_dir()):
+ for filename in fnames + dirnames:
+ if filename == METAFILE:
+ try:
+ data = json.load(
+ open(os.path.join(dirname, filename)))
+ names.append(data["Name"])
+ except Exception as e:
+ raise errors.ContextException(
+ f"Failed to load metafile {filename}: {e}",
+ ) from e
+
+ contexts = [cls.DEFAULT_CONTEXT]
+ for name in names:
+ contexts.append(Context.load_context(name))
+ return contexts
+
+ @classmethod
+ def get_current_context(cls):
+ """Get current context.
+ Returns:
+ (Context): current context object.
+ """
+ return cls.get_context()
+
+ @classmethod
+ def set_current_context(cls, name="default"):
+ ctx = cls.get_context(name)
+ if not ctx:
+ raise errors.ContextNotFound(name)
+
+ err = write_context_name_to_docker_config(name)
+ if err:
+ raise errors.ContextException(
+ f'Failed to set current context: {err}')
+
+ @classmethod
+ def remove_context(cls, name):
+ """Remove a context. Similar to the ``docker context rm`` command.
+
+ Args:
+ name (str): The name of the context
+
+ Raises:
+ :py:class:`docker.errors.MissingContextParameter`
+ If a context name is not provided.
+ :py:class:`docker.errors.ContextNotFound`
+ If a context with the name does not exist.
+ :py:class:`docker.errors.ContextException`
+ If name is default.
+
+ Example:
+
+ >>> from docker.context import ContextAPI
+ >>> ContextAPI.remove_context(name='test')
+ >>>
+ """
+ if not name:
+ raise errors.MissingContextParameter("name")
+ if name == "default":
+ raise errors.ContextException(
+ 'context "default" cannot be removed')
+ ctx = Context.load_context(name)
+ if not ctx:
+ raise errors.ContextNotFound(name)
+ if name == get_current_context_name():
+ write_context_name_to_docker_config(None)
+ ctx.remove()
+
+ @classmethod
+ def inspect_context(cls, name="default"):
+ """Remove a context. Similar to the ``docker context inspect`` command.
+
+ Args:
+ name (str): The name of the context
+
+ Raises:
+ :py:class:`docker.errors.MissingContextParameter`
+ If a context name is not provided.
+ :py:class:`docker.errors.ContextNotFound`
+ If a context with the name does not exist.
+
+ Example:
+
+ >>> from docker.context import ContextAPI
+ >>> ContextAPI.remove_context(name='test')
+ >>>
+ """
+ if not name:
+ raise errors.MissingContextParameter("name")
+ if name == "default":
+ return cls.DEFAULT_CONTEXT()
+ ctx = Context.load_context(name)
+ if not ctx:
+ raise errors.ContextNotFound(name)
+
+ return ctx()
diff --git a/contrib/python/docker/docker/context/config.py b/contrib/python/docker/docker/context/config.py
new file mode 100644
index 00000000000..5a6373aa4e2
--- /dev/null
+++ b/contrib/python/docker/docker/context/config.py
@@ -0,0 +1,81 @@
+import hashlib
+import json
+import os
+
+from docker import utils
+from docker.constants import DEFAULT_UNIX_SOCKET, IS_WINDOWS_PLATFORM
+from docker.utils.config import find_config_file
+
+METAFILE = "meta.json"
+
+
+def get_current_context_name():
+ name = "default"
+ docker_cfg_path = find_config_file()
+ if docker_cfg_path:
+ try:
+ with open(docker_cfg_path) as f:
+ name = json.load(f).get("currentContext", "default")
+ except Exception:
+ return "default"
+ return name
+
+
+def write_context_name_to_docker_config(name=None):
+ if name == 'default':
+ name = None
+ docker_cfg_path = find_config_file()
+ config = {}
+ if docker_cfg_path:
+ try:
+ with open(docker_cfg_path) as f:
+ config = json.load(f)
+ except Exception as e:
+ return e
+ current_context = config.get("currentContext", None)
+ if current_context and not name:
+ del config["currentContext"]
+ elif name:
+ config["currentContext"] = name
+ else:
+ return
+ try:
+ with open(docker_cfg_path, "w") as f:
+ json.dump(config, f, indent=4)
+ except Exception as e:
+ return e
+
+
+def get_context_id(name):
+ return hashlib.sha256(name.encode('utf-8')).hexdigest()
+
+
+def get_context_dir():
+ return os.path.join(os.path.dirname(find_config_file() or ""), "contexts")
+
+
+def get_meta_dir(name=None):
+ meta_dir = os.path.join(get_context_dir(), "meta")
+ if name:
+ return os.path.join(meta_dir, get_context_id(name))
+ return meta_dir
+
+
+def get_meta_file(name):
+ return os.path.join(get_meta_dir(name), METAFILE)
+
+
+def get_tls_dir(name=None, endpoint=""):
+ context_dir = get_context_dir()
+ if name:
+ return os.path.join(context_dir, "tls", get_context_id(name), endpoint)
+ return os.path.join(context_dir, "tls")
+
+
+def get_context_host(path=None, tls=False):
+ host = utils.parse_host(path, IS_WINDOWS_PLATFORM, tls)
+ if host == DEFAULT_UNIX_SOCKET:
+ # remove http+ from default docker socket url
+ if host.startswith("http+"):
+ host = host[5:]
+ return host
diff --git a/contrib/python/docker/docker/context/context.py b/contrib/python/docker/docker/context/context.py
new file mode 100644
index 00000000000..da17d94781d
--- /dev/null
+++ b/contrib/python/docker/docker/context/context.py
@@ -0,0 +1,249 @@
+import json
+import os
+from shutil import copyfile, rmtree
+
+from docker.errors import ContextException
+from docker.tls import TLSConfig
+
+from .config import (
+ get_context_host,
+ get_meta_dir,
+ get_meta_file,
+ get_tls_dir,
+)
+
+
+class Context:
+ """A context."""
+
+ def __init__(self, name, orchestrator=None, host=None, endpoints=None,
+ tls=False):
+ if not name:
+ raise Exception("Name not provided")
+ self.name = name
+ self.context_type = None
+ self.orchestrator = orchestrator
+ self.endpoints = {}
+ self.tls_cfg = {}
+ self.meta_path = "IN MEMORY"
+ self.tls_path = "IN MEMORY"
+
+ if not endpoints:
+ # set default docker endpoint if no endpoint is set
+ default_endpoint = "docker" if (
+ not orchestrator or orchestrator == "swarm"
+ ) else orchestrator
+
+ self.endpoints = {
+ default_endpoint: {
+ "Host": get_context_host(host, tls),
+ "SkipTLSVerify": not tls
+ }
+ }
+ return
+
+ # check docker endpoints
+ for k, v in endpoints.items():
+ if not isinstance(v, dict):
+ # unknown format
+ raise ContextException(
+ f"Unknown endpoint format for context {name}: {v}",
+ )
+
+ self.endpoints[k] = v
+ if k != "docker":
+ continue
+
+ self.endpoints[k]["Host"] = v.get("Host", get_context_host(
+ host, tls))
+ self.endpoints[k]["SkipTLSVerify"] = bool(v.get(
+ "SkipTLSVerify", not tls))
+
+ def set_endpoint(
+ self, name="docker", host=None, tls_cfg=None,
+ skip_tls_verify=False, def_namespace=None):
+ self.endpoints[name] = {
+ "Host": get_context_host(host, not skip_tls_verify),
+ "SkipTLSVerify": skip_tls_verify
+ }
+ if def_namespace:
+ self.endpoints[name]["DefaultNamespace"] = def_namespace
+
+ if tls_cfg:
+ self.tls_cfg[name] = tls_cfg
+
+ def inspect(self):
+ return self.__call__()
+
+ @classmethod
+ def load_context(cls, name):
+ meta = Context._load_meta(name)
+ if meta:
+ instance = cls(
+ meta["Name"],
+ orchestrator=meta["Metadata"].get("StackOrchestrator", None),
+ endpoints=meta.get("Endpoints", None))
+ instance.context_type = meta["Metadata"].get("Type", None)
+ instance._load_certs()
+ instance.meta_path = get_meta_dir(name)
+ return instance
+ return None
+
+ @classmethod
+ def _load_meta(cls, name):
+ meta_file = get_meta_file(name)
+ if not os.path.isfile(meta_file):
+ return None
+
+ metadata = {}
+ try:
+ with open(meta_file) as f:
+ metadata = json.load(f)
+ except (OSError, KeyError, ValueError) as e:
+ # unknown format
+ raise Exception(
+ f"Detected corrupted meta file for context {name} : {e}"
+ ) from e
+
+ # for docker endpoints, set defaults for
+ # Host and SkipTLSVerify fields
+ for k, v in metadata["Endpoints"].items():
+ if k != "docker":
+ continue
+ metadata["Endpoints"][k]["Host"] = v.get(
+ "Host", get_context_host(None, False))
+ metadata["Endpoints"][k]["SkipTLSVerify"] = bool(
+ v.get("SkipTLSVerify", True))
+
+ return metadata
+
+ def _load_certs(self):
+ certs = {}
+ tls_dir = get_tls_dir(self.name)
+ for endpoint in self.endpoints.keys():
+ if not os.path.isdir(os.path.join(tls_dir, endpoint)):
+ continue
+ ca_cert = None
+ cert = None
+ key = None
+ for filename in os.listdir(os.path.join(tls_dir, endpoint)):
+ if filename.startswith("ca"):
+ ca_cert = os.path.join(tls_dir, endpoint, filename)
+ elif filename.startswith("cert"):
+ cert = os.path.join(tls_dir, endpoint, filename)
+ elif filename.startswith("key"):
+ key = os.path.join(tls_dir, endpoint, filename)
+ if all([ca_cert, cert, key]):
+ verify = None
+ if endpoint == "docker" and not self.endpoints["docker"].get(
+ "SkipTLSVerify", False):
+ verify = True
+ certs[endpoint] = TLSConfig(
+ client_cert=(cert, key), ca_cert=ca_cert, verify=verify)
+ self.tls_cfg = certs
+ self.tls_path = tls_dir
+
+ def save(self):
+ meta_dir = get_meta_dir(self.name)
+ if not os.path.isdir(meta_dir):
+ os.makedirs(meta_dir)
+ with open(get_meta_file(self.name), "w") as f:
+ f.write(json.dumps(self.Metadata))
+
+ tls_dir = get_tls_dir(self.name)
+ for endpoint, tls in self.tls_cfg.items():
+ if not os.path.isdir(os.path.join(tls_dir, endpoint)):
+ os.makedirs(os.path.join(tls_dir, endpoint))
+
+ ca_file = tls.ca_cert
+ if ca_file:
+ copyfile(ca_file, os.path.join(
+ tls_dir, endpoint, os.path.basename(ca_file)))
+
+ if tls.cert:
+ cert_file, key_file = tls.cert
+ copyfile(cert_file, os.path.join(
+ tls_dir, endpoint, os.path.basename(cert_file)))
+ copyfile(key_file, os.path.join(
+ tls_dir, endpoint, os.path.basename(key_file)))
+
+ self.meta_path = get_meta_dir(self.name)
+ self.tls_path = get_tls_dir(self.name)
+
+ def remove(self):
+ if os.path.isdir(self.meta_path):
+ rmtree(self.meta_path)
+ if os.path.isdir(self.tls_path):
+ rmtree(self.tls_path)
+
+ def __repr__(self):
+ return f"<{self.__class__.__name__}: '{self.name}'>"
+
+ def __str__(self):
+ return json.dumps(self.__call__(), indent=2)
+
+ def __call__(self):
+ result = self.Metadata
+ result.update(self.TLSMaterial)
+ result.update(self.Storage)
+ return result
+
+ def is_docker_host(self):
+ return self.context_type is None
+
+ @property
+ def Name(self):
+ return self.name
+
+ @property
+ def Host(self):
+ if not self.orchestrator or self.orchestrator == "swarm":
+ endpoint = self.endpoints.get("docker", None)
+ if endpoint:
+ return endpoint.get("Host", None)
+ return None
+
+ return self.endpoints[self.orchestrator].get("Host", None)
+
+ @property
+ def Orchestrator(self):
+ return self.orchestrator
+
+ @property
+ def Metadata(self):
+ meta = {}
+ if self.orchestrator:
+ meta = {"StackOrchestrator": self.orchestrator}
+ return {
+ "Name": self.name,
+ "Metadata": meta,
+ "Endpoints": self.endpoints
+ }
+
+ @property
+ def TLSConfig(self):
+ key = self.orchestrator
+ if not key or key == "swarm":
+ key = "docker"
+ if key in self.tls_cfg.keys():
+ return self.tls_cfg[key]
+ return None
+
+ @property
+ def TLSMaterial(self):
+ certs = {}
+ for endpoint, tls in self.tls_cfg.items():
+ cert, key = tls.cert
+ certs[endpoint] = list(
+ map(os.path.basename, [tls.ca_cert, cert, key]))
+ return {
+ "TLSMaterial": certs
+ }
+
+ @property
+ def Storage(self):
+ return {
+ "Storage": {
+ "MetadataPath": self.meta_path,
+ "TLSPath": self.tls_path
+ }}
diff --git a/contrib/python/docker/docker/credentials/__init__.py b/contrib/python/docker/docker/credentials/__init__.py
new file mode 100644
index 00000000000..80d19e79869
--- /dev/null
+++ b/contrib/python/docker/docker/credentials/__init__.py
@@ -0,0 +1,8 @@
+from .constants import (
+ DEFAULT_LINUX_STORE,
+ DEFAULT_OSX_STORE,
+ DEFAULT_WIN32_STORE,
+ PROGRAM_PREFIX,
+)
+from .errors import CredentialsNotFound, StoreError
+from .store import Store
diff --git a/contrib/python/docker/docker/credentials/constants.py b/contrib/python/docker/docker/credentials/constants.py
new file mode 100644
index 00000000000..6a82d8da423
--- /dev/null
+++ b/contrib/python/docker/docker/credentials/constants.py
@@ -0,0 +1,4 @@
+PROGRAM_PREFIX = 'docker-credential-'
+DEFAULT_LINUX_STORE = 'secretservice'
+DEFAULT_OSX_STORE = 'osxkeychain'
+DEFAULT_WIN32_STORE = 'wincred'
diff --git a/contrib/python/docker/docker/credentials/errors.py b/contrib/python/docker/docker/credentials/errors.py
new file mode 100644
index 00000000000..d059fd9fbb0
--- /dev/null
+++ b/contrib/python/docker/docker/credentials/errors.py
@@ -0,0 +1,17 @@
+class StoreError(RuntimeError):
+ pass
+
+
+class CredentialsNotFound(StoreError):
+ pass
+
+
+class InitializationError(StoreError):
+ pass
+
+
+def process_store_error(cpe, program):
+ message = cpe.output.decode('utf-8')
+ if 'credentials not found in native keychain' in message:
+ return CredentialsNotFound(f'No matching credentials in {program}')
+ return StoreError(f'Credentials store {program} exited with "{message}".')
diff --git a/contrib/python/docker/docker/credentials/store.py b/contrib/python/docker/docker/credentials/store.py
new file mode 100644
index 00000000000..00d693a4bec
--- /dev/null
+++ b/contrib/python/docker/docker/credentials/store.py
@@ -0,0 +1,93 @@
+import errno
+import json
+import shutil
+import subprocess
+import warnings
+
+from . import constants, errors
+from .utils import create_environment_dict
+
+
+class Store:
+ def __init__(self, program, environment=None):
+ """ Create a store object that acts as an interface to
+ perform the basic operations for storing, retrieving
+ and erasing credentials using `program`.
+ """
+ self.program = constants.PROGRAM_PREFIX + program
+ self.exe = shutil.which(self.program)
+ self.environment = environment
+ if self.exe is None:
+ warnings.warn(
+ f'{self.program} not installed or not available in PATH',
+ stacklevel=1,
+ )
+
+ def get(self, server):
+ """ Retrieve credentials for `server`. If no credentials are found,
+ a `StoreError` will be raised.
+ """
+ if not isinstance(server, bytes):
+ server = server.encode('utf-8')
+ data = self._execute('get', server)
+ result = json.loads(data.decode('utf-8'))
+
+ # docker-credential-pass will return an object for inexistent servers
+ # whereas other helpers will exit with returncode != 0. For
+ # consistency, if no significant data is returned,
+ # raise CredentialsNotFound
+ if result['Username'] == '' and result['Secret'] == '':
+ raise errors.CredentialsNotFound(
+ f'No matching credentials in {self.program}'
+ )
+
+ return result
+
+ def store(self, server, username, secret):
+ """ Store credentials for `server`. Raises a `StoreError` if an error
+ occurs.
+ """
+ data_input = json.dumps({
+ 'ServerURL': server,
+ 'Username': username,
+ 'Secret': secret
+ }).encode('utf-8')
+ return self._execute('store', data_input)
+
+ def erase(self, server):
+ """ Erase credentials for `server`. Raises a `StoreError` if an error
+ occurs.
+ """
+ if not isinstance(server, bytes):
+ server = server.encode('utf-8')
+ self._execute('erase', server)
+
+ def list(self):
+ """ List stored credentials. Requires v0.4.0+ of the helper.
+ """
+ data = self._execute('list', None)
+ return json.loads(data.decode('utf-8'))
+
+ def _execute(self, subcmd, data_input):
+ if self.exe is None:
+ raise errors.StoreError(
+ f'{self.program} not installed or not available in PATH'
+ )
+ output = None
+ env = create_environment_dict(self.environment)
+ try:
+ output = subprocess.check_output(
+ [self.exe, subcmd], input=data_input, env=env,
+ )
+ except subprocess.CalledProcessError as e:
+ raise errors.process_store_error(e, self.program) from e
+ except OSError as e:
+ if e.errno == errno.ENOENT:
+ raise errors.StoreError(
+ f'{self.program} not installed or not available in PATH'
+ ) from e
+ else:
+ raise errors.StoreError(
+ f'Unexpected OS error "{e.strerror}", errno={e.errno}'
+ ) from e
+ return output
diff --git a/contrib/python/docker/docker/credentials/utils.py b/contrib/python/docker/docker/credentials/utils.py
new file mode 100644
index 00000000000..5c83d05cfbb
--- /dev/null
+++ b/contrib/python/docker/docker/credentials/utils.py
@@ -0,0 +1,10 @@
+import os
+
+
+def create_environment_dict(overrides):
+ """
+ Create and return a copy of os.environ with the specified overrides
+ """
+ result = os.environ.copy()
+ result.update(overrides or {})
+ return result
diff --git a/contrib/python/docker/docker/errors.py b/contrib/python/docker/docker/errors.py
new file mode 100644
index 00000000000..d03e10f6930
--- /dev/null
+++ b/contrib/python/docker/docker/errors.py
@@ -0,0 +1,209 @@
+import requests
+
+_image_not_found_explanation_fragments = frozenset(
+ fragment.lower() for fragment in [
+ 'no such image',
+ 'not found: does not exist or no pull access',
+ 'repository does not exist',
+ 'was found but does not match the specified platform',
+ ]
+)
+
+
+class DockerException(Exception):
+ """
+ A base class from which all other exceptions inherit.
+
+ If you want to catch all errors that the Docker SDK might raise,
+ catch this base exception.
+ """
+
+
+def create_api_error_from_http_exception(e):
+ """
+ Create a suitable APIError from requests.exceptions.HTTPError.
+ """
+ response = e.response
+ try:
+ explanation = response.json()['message']
+ except ValueError:
+ explanation = (response.text or '').strip()
+ cls = APIError
+ if response.status_code == 404:
+ explanation_msg = (explanation or '').lower()
+ if any(fragment in explanation_msg
+ for fragment in _image_not_found_explanation_fragments):
+ cls = ImageNotFound
+ else:
+ cls = NotFound
+ raise cls(e, response=response, explanation=explanation) from e
+
+
+class APIError(requests.exceptions.HTTPError, DockerException):
+ """
+ An HTTP error from the API.
+ """
+ def __init__(self, message, response=None, explanation=None):
+ # requests 1.2 supports response as a keyword argument, but
+ # requests 1.1 doesn't
+ super().__init__(message)
+ self.response = response
+ self.explanation = explanation
+
+ def __str__(self):
+ message = super().__str__()
+
+ if self.is_client_error():
+ message = (
+ f'{self.response.status_code} Client Error for '
+ f'{self.response.url}: {self.response.reason}'
+ )
+
+ elif self.is_server_error():
+ message = (
+ f'{self.response.status_code} Server Error for '
+ f'{self.response.url}: {self.response.reason}'
+ )
+
+ if self.explanation:
+ message = f'{message} ("{self.explanation}")'
+
+ return message
+
+ @property
+ def status_code(self):
+ if self.response is not None:
+ return self.response.status_code
+
+ def is_error(self):
+ return self.is_client_error() or self.is_server_error()
+
+ def is_client_error(self):
+ if self.status_code is None:
+ return False
+ return 400 <= self.status_code < 500
+
+ def is_server_error(self):
+ if self.status_code is None:
+ return False
+ return 500 <= self.status_code < 600
+
+
+class NotFound(APIError):
+ pass
+
+
+class ImageNotFound(NotFound):
+ pass
+
+
+class InvalidVersion(DockerException):
+ pass
+
+
+class InvalidRepository(DockerException):
+ pass
+
+
+class InvalidConfigFile(DockerException):
+ pass
+
+
+class InvalidArgument(DockerException):
+ pass
+
+
+class DeprecatedMethod(DockerException):
+ pass
+
+
+class TLSParameterError(DockerException):
+ def __init__(self, msg):
+ self.msg = msg
+
+ def __str__(self):
+ return self.msg + (". TLS configurations should map the Docker CLI "
+ "client configurations. See "
+ "https://docs.docker.com/engine/articles/https/ "
+ "for API details.")
+
+
+class NullResource(DockerException, ValueError):
+ pass
+
+
+class ContainerError(DockerException):
+ """
+ Represents a container that has exited with a non-zero exit code.
+ """
+ def __init__(self, container, exit_status, command, image, stderr):
+ self.container = container
+ self.exit_status = exit_status
+ self.command = command
+ self.image = image
+ self.stderr = stderr
+
+ err = f": {stderr}" if stderr is not None else ""
+ super().__init__(
+ f"Command '{command}' in image '{image}' "
+ f"returned non-zero exit status {exit_status}{err}"
+ )
+
+
+class StreamParseError(RuntimeError):
+ def __init__(self, reason):
+ self.msg = reason
+
+
+class BuildError(DockerException):
+ def __init__(self, reason, build_log):
+ super().__init__(reason)
+ self.msg = reason
+ self.build_log = build_log
+
+
+class ImageLoadError(DockerException):
+ pass
+
+
+def create_unexpected_kwargs_error(name, kwargs):
+ quoted_kwargs = [f"'{k}'" for k in sorted(kwargs)]
+ text = [f"{name}() "]
+ if len(quoted_kwargs) == 1:
+ text.append("got an unexpected keyword argument ")
+ else:
+ text.append("got unexpected keyword arguments ")
+ text.append(', '.join(quoted_kwargs))
+ return TypeError(''.join(text))
+
+
+class MissingContextParameter(DockerException):
+ def __init__(self, param):
+ self.param = param
+
+ def __str__(self):
+ return (f"missing parameter: {self.param}")
+
+
+class ContextAlreadyExists(DockerException):
+ def __init__(self, name):
+ self.name = name
+
+ def __str__(self):
+ return (f"context {self.name} already exists")
+
+
+class ContextException(DockerException):
+ def __init__(self, msg):
+ self.msg = msg
+
+ def __str__(self):
+ return (self.msg)
+
+
+class ContextNotFound(DockerException):
+ def __init__(self, name):
+ self.name = name
+
+ def __str__(self):
+ return (f"context '{self.name}' not found")
diff --git a/contrib/python/docker/docker/models/__init__.py b/contrib/python/docker/docker/models/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/contrib/python/docker/docker/models/__init__.py
diff --git a/contrib/python/docker/docker/models/configs.py b/contrib/python/docker/docker/models/configs.py
new file mode 100644
index 00000000000..4eba87f4e35
--- /dev/null
+++ b/contrib/python/docker/docker/models/configs.py
@@ -0,0 +1,70 @@
+from ..api import APIClient
+from .resource import Collection, Model
+
+
+class Config(Model):
+ """A config."""
+ id_attribute = 'ID'
+
+ def __repr__(self):
+ return f"<{self.__class__.__name__}: '{self.name}'>"
+
+ @property
+ def name(self):
+ return self.attrs['Spec']['Name']
+
+ def remove(self):
+ """
+ Remove this config.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If config failed to remove.
+ """
+ return self.client.api.remove_config(self.id)
+
+
+class ConfigCollection(Collection):
+ """Configs on the Docker server."""
+ model = Config
+
+ def create(self, **kwargs):
+ obj = self.client.api.create_config(**kwargs)
+ obj.setdefault("Spec", {})["Name"] = kwargs.get("name")
+ return self.prepare_model(obj)
+ create.__doc__ = APIClient.create_config.__doc__
+
+ def get(self, config_id):
+ """
+ Get a config.
+
+ Args:
+ config_id (str): Config ID.
+
+ Returns:
+ (:py:class:`Config`): The config.
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ If the config does not exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.prepare_model(self.client.api.inspect_config(config_id))
+
+ def list(self, **kwargs):
+ """
+ List configs. Similar to the ``docker config ls`` command.
+
+ Args:
+ filters (dict): Server-side list filtering options.
+
+ Returns:
+ (list of :py:class:`Config`): The configs.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ resp = self.client.api.configs(**kwargs)
+ return [self.prepare_model(obj) for obj in resp]
diff --git a/contrib/python/docker/docker/models/containers.py b/contrib/python/docker/docker/models/containers.py
new file mode 100644
index 00000000000..4795523a158
--- /dev/null
+++ b/contrib/python/docker/docker/models/containers.py
@@ -0,0 +1,1197 @@
+import copy
+import ntpath
+from collections import namedtuple
+
+from ..api import APIClient
+from ..constants import DEFAULT_DATA_CHUNK_SIZE
+from ..errors import (
+ ContainerError,
+ DockerException,
+ ImageNotFound,
+ NotFound,
+ create_unexpected_kwargs_error,
+)
+from ..types import HostConfig, NetworkingConfig
+from ..utils import version_gte
+from .images import Image
+from .resource import Collection, Model
+
+
+class Container(Model):
+ """ Local representation of a container object. Detailed configuration may
+ be accessed through the :py:attr:`attrs` attribute. Note that local
+ attributes are cached; users may call :py:meth:`reload` to
+ query the Docker daemon for the current properties, causing
+ :py:attr:`attrs` to be refreshed.
+ """
+
+ @property
+ def name(self):
+ """
+ The name of the container.
+ """
+ if self.attrs.get('Name') is not None:
+ return self.attrs['Name'].lstrip('/')
+
+ @property
+ def image(self):
+ """
+ The image of the container.
+ """
+ image_id = self.attrs.get('ImageID', self.attrs['Image'])
+ if image_id is None:
+ return None
+ return self.client.images.get(image_id.split(':')[1])
+
+ @property
+ def labels(self):
+ """
+ The labels of a container as dictionary.
+ """
+ try:
+ result = self.attrs['Config'].get('Labels')
+ return result or {}
+ except KeyError as ke:
+ raise DockerException(
+ 'Label data is not available for sparse objects. Call reload()'
+ ' to retrieve all information'
+ ) from ke
+
+ @property
+ def status(self):
+ """
+ The status of the container. For example, ``running``, or ``exited``.
+ """
+ if isinstance(self.attrs['State'], dict):
+ return self.attrs['State']['Status']
+ return self.attrs['State']
+
+ @property
+ def health(self):
+ """
+ The healthcheck status of the container.
+
+ For example, ``healthy`, or ``unhealthy`.
+ """
+ return self.attrs.get('State', {}).get('Health', {}).get('Status', 'unknown')
+
+ @property
+ def ports(self):
+ """
+ The ports that the container exposes as a dictionary.
+ """
+ return self.attrs.get('NetworkSettings', {}).get('Ports', {})
+
+ def attach(self, **kwargs):
+ """
+ Attach to this container.
+
+ :py:meth:`logs` is a wrapper around this method, which you can
+ use instead if you want to fetch/stream container output without first
+ retrieving the entire backlog.
+
+ Args:
+ stdout (bool): Include stdout.
+ stderr (bool): Include stderr.
+ stream (bool): Return container output progressively as an iterator
+ of strings, rather than a single string.
+ logs (bool): Include the container's previous output.
+
+ Returns:
+ By default, the container's output as a single string.
+
+ If ``stream=True``, an iterator of output strings.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.attach(self.id, **kwargs)
+
+ def attach_socket(self, **kwargs):
+ """
+ Like :py:meth:`attach`, but returns the underlying socket-like object
+ for the HTTP request.
+
+ Args:
+ params (dict): Dictionary of request parameters (e.g. ``stdout``,
+ ``stderr``, ``stream``).
+ ws (bool): Use websockets instead of raw HTTP.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.attach_socket(self.id, **kwargs)
+
+ def commit(self, repository=None, tag=None, **kwargs):
+ """
+ Commit a container to an image. Similar to the ``docker commit``
+ command.
+
+ Args:
+ repository (str): The repository to push the image to
+ tag (str): The tag to push
+ message (str): A commit message
+ author (str): The name of the author
+ pause (bool): Whether to pause the container before committing
+ changes (str): Dockerfile instructions to apply while committing
+ conf (dict): The configuration for the container. See the
+ `Engine API documentation
+ <https://docs.docker.com/reference/api/docker_remote_api/>`_
+ for full details.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ resp = self.client.api.commit(self.id, repository=repository, tag=tag,
+ **kwargs)
+ return self.client.images.get(resp['Id'])
+
+ def diff(self):
+ """
+ Inspect changes on a container's filesystem.
+
+ Returns:
+ (list) A list of dictionaries containing the attributes `Path`
+ and `Kind`.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.diff(self.id)
+
+ def exec_run(self, cmd, stdout=True, stderr=True, stdin=False, tty=False,
+ privileged=False, user='', detach=False, stream=False,
+ socket=False, environment=None, workdir=None, demux=False):
+ """
+ Run a command inside this container. Similar to
+ ``docker exec``.
+
+ Args:
+ cmd (str or list): Command to be executed
+ stdout (bool): Attach to stdout. Default: ``True``
+ stderr (bool): Attach to stderr. Default: ``True``
+ stdin (bool): Attach to stdin. Default: ``False``
+ tty (bool): Allocate a pseudo-TTY. Default: False
+ privileged (bool): Run as privileged.
+ user (str): User to execute command as. Default: root
+ detach (bool): If true, detach from the exec command.
+ Default: False
+ stream (bool): Stream response data. Default: False
+ socket (bool): Return the connection socket to allow custom
+ read/write operations. Default: False
+ environment (dict or list): A dictionary or a list of strings in
+ the following format ``["PASSWORD=xxx"]`` or
+ ``{"PASSWORD": "xxx"}``.
+ workdir (str): Path to working directory for this exec session
+ demux (bool): Return stdout and stderr separately
+
+ Returns:
+ (ExecResult): A tuple of (exit_code, output)
+ exit_code: (int):
+ Exit code for the executed command or ``None`` if
+ either ``stream`` or ``socket`` is ``True``.
+ output: (generator, bytes, or tuple):
+ If ``stream=True``, a generator yielding response chunks.
+ If ``socket=True``, a socket object for the connection.
+ If ``demux=True``, a tuple of two bytes: stdout and stderr.
+ A bytestring containing response data otherwise.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ resp = self.client.api.exec_create(
+ self.id, cmd, stdout=stdout, stderr=stderr, stdin=stdin, tty=tty,
+ privileged=privileged, user=user, environment=environment,
+ workdir=workdir,
+ )
+ exec_output = self.client.api.exec_start(
+ resp['Id'], detach=detach, tty=tty, stream=stream, socket=socket,
+ demux=demux
+ )
+ if socket or stream:
+ return ExecResult(None, exec_output)
+
+ return ExecResult(
+ self.client.api.exec_inspect(resp['Id'])['ExitCode'],
+ exec_output
+ )
+
+ def export(self, chunk_size=DEFAULT_DATA_CHUNK_SIZE):
+ """
+ Export the contents of the container's filesystem as a tar archive.
+
+ Args:
+ chunk_size (int): The number of bytes returned by each iteration
+ of the generator. If ``None``, data will be streamed as it is
+ received. Default: 2 MB
+
+ Returns:
+ (str): The filesystem tar archive
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.export(self.id, chunk_size)
+
+ def get_archive(self, path, chunk_size=DEFAULT_DATA_CHUNK_SIZE,
+ encode_stream=False):
+ """
+ Retrieve a file or folder from the container in the form of a tar
+ archive.
+
+ Args:
+ path (str): Path to the file or folder to retrieve
+ chunk_size (int): The number of bytes returned by each iteration
+ of the generator. If ``None``, data will be streamed as it is
+ received. Default: 2 MB
+ encode_stream (bool): Determines if data should be encoded
+ (gzip-compressed) during transmission. Default: False
+
+ Returns:
+ (tuple): First element is a raw tar data stream. Second element is
+ a dict containing ``stat`` information on the specified ``path``.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> f = open('./sh_bin.tar', 'wb')
+ >>> bits, stat = container.get_archive('/bin/sh')
+ >>> print(stat)
+ {'name': 'sh', 'size': 1075464, 'mode': 493,
+ 'mtime': '2018-10-01T15:37:48-07:00', 'linkTarget': ''}
+ >>> for chunk in bits:
+ ... f.write(chunk)
+ >>> f.close()
+ """
+ return self.client.api.get_archive(self.id, path,
+ chunk_size, encode_stream)
+
+ def kill(self, signal=None):
+ """
+ Kill or send a signal to the container.
+
+ Args:
+ signal (str or int): The signal to send. Defaults to ``SIGKILL``
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ return self.client.api.kill(self.id, signal=signal)
+
+ def logs(self, **kwargs):
+ """
+ Get logs from this container. Similar to the ``docker logs`` command.
+
+ The ``stream`` parameter makes the ``logs`` function return a blocking
+ generator you can iterate over to retrieve log output as it happens.
+
+ Args:
+ stdout (bool): Get ``STDOUT``. Default ``True``
+ stderr (bool): Get ``STDERR``. Default ``True``
+ stream (bool): Stream the response. Default ``False``
+ timestamps (bool): Show timestamps. Default ``False``
+ tail (str or int): Output specified number of lines at the end of
+ logs. Either an integer of number of lines or the string
+ ``all``. Default ``all``
+ since (datetime, int, or float): Show logs since a given datetime,
+ integer epoch (in seconds) or float (in nanoseconds)
+ follow (bool): Follow log output. Default ``False``
+ until (datetime, int, or float): Show logs that occurred before
+ the given datetime, integer epoch (in seconds), or
+ float (in nanoseconds)
+
+ Returns:
+ (generator of bytes or bytes): Logs from the container.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.logs(self.id, **kwargs)
+
+ def pause(self):
+ """
+ Pauses all processes within this container.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.pause(self.id)
+
+ def put_archive(self, path, data):
+ """
+ Insert a file or folder in this container using a tar archive as
+ source.
+
+ Args:
+ path (str): Path inside the container where the file(s) will be
+ extracted. Must exist.
+ data (bytes or stream): tar data to be extracted
+
+ Returns:
+ (bool): True if the call succeeds.
+
+ Raises:
+ :py:class:`~docker.errors.APIError` If an error occurs.
+ """
+ return self.client.api.put_archive(self.id, path, data)
+
+ def remove(self, **kwargs):
+ """
+ Remove this container. Similar to the ``docker rm`` command.
+
+ Args:
+ v (bool): Remove the volumes associated with the container
+ link (bool): Remove the specified link and not the underlying
+ container
+ force (bool): Force the removal of a running container (uses
+ ``SIGKILL``)
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.remove_container(self.id, **kwargs)
+
+ def rename(self, name):
+ """
+ Rename this container. Similar to the ``docker rename`` command.
+
+ Args:
+ name (str): New name for the container
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.rename(self.id, name)
+
+ def resize(self, height, width):
+ """
+ Resize the tty session.
+
+ Args:
+ height (int): Height of tty session
+ width (int): Width of tty session
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.resize(self.id, height, width)
+
+ def restart(self, **kwargs):
+ """
+ Restart this container. Similar to the ``docker restart`` command.
+
+ Args:
+ timeout (int): Number of seconds to try to stop for before killing
+ the container. Once killed it will then be restarted. Default
+ is 10 seconds.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.restart(self.id, **kwargs)
+
+ def start(self, **kwargs):
+ """
+ Start this container. Similar to the ``docker start`` command, but
+ doesn't support attach options.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.start(self.id, **kwargs)
+
+ def stats(self, **kwargs):
+ """
+ Stream statistics for this container. Similar to the
+ ``docker stats`` command.
+
+ Args:
+ decode (bool): If set to true, stream will be decoded into dicts
+ on the fly. Only applicable if ``stream`` is True.
+ False by default.
+ stream (bool): If set to false, only the current stats will be
+ returned instead of a stream. True by default.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.stats(self.id, **kwargs)
+
+ def stop(self, **kwargs):
+ """
+ Stops a container. Similar to the ``docker stop`` command.
+
+ Args:
+ timeout (int): Timeout in seconds to wait for the container to
+ stop before sending a ``SIGKILL``. Default: 10
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.stop(self.id, **kwargs)
+
+ def top(self, **kwargs):
+ """
+ Display the running processes of the container.
+
+ Args:
+ ps_args (str): An optional arguments passed to ps (e.g. ``aux``)
+
+ Returns:
+ (str): The output of the top
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.top(self.id, **kwargs)
+
+ def unpause(self):
+ """
+ Unpause all processes within the container.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.unpause(self.id)
+
+ def update(self, **kwargs):
+ """
+ Update resource configuration of the containers.
+
+ Args:
+ blkio_weight (int): Block IO (relative weight), between 10 and 1000
+ cpu_period (int): Limit CPU CFS (Completely Fair Scheduler) period
+ cpu_quota (int): Limit CPU CFS (Completely Fair Scheduler) quota
+ cpu_shares (int): CPU shares (relative weight)
+ cpuset_cpus (str): CPUs in which to allow execution
+ cpuset_mems (str): MEMs in which to allow execution
+ mem_limit (int or str): Memory limit
+ mem_reservation (int or str): Memory soft limit
+ memswap_limit (int or str): Total memory (memory + swap), -1 to
+ disable swap
+ kernel_memory (int or str): Kernel memory limit
+ restart_policy (dict): Restart policy dictionary
+
+ Returns:
+ (dict): Dictionary containing a ``Warnings`` key.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.update_container(self.id, **kwargs)
+
+ def wait(self, **kwargs):
+ """
+ Block until the container stops, then return its exit code. Similar to
+ the ``docker wait`` command.
+
+ Args:
+ timeout (int): Request timeout
+ condition (str): Wait until a container state reaches the given
+ condition, either ``not-running`` (default), ``next-exit``,
+ or ``removed``
+
+ Returns:
+ (dict): The API's response as a Python dictionary, including
+ the container's exit code under the ``StatusCode`` attribute.
+
+ Raises:
+ :py:class:`requests.exceptions.ReadTimeout`
+ If the timeout is exceeded.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.wait(self.id, **kwargs)
+
+
+class ContainerCollection(Collection):
+ model = Container
+
+ def run(self, image, command=None, stdout=True, stderr=False,
+ remove=False, **kwargs):
+ """
+ Run a container. By default, it will wait for the container to finish
+ and return its logs, similar to ``docker run``.
+
+ If the ``detach`` argument is ``True``, it will start the container
+ and immediately return a :py:class:`Container` object, similar to
+ ``docker run -d``.
+
+ Example:
+ Run a container and get its output:
+
+ >>> import docker
+ >>> client = docker.from_env()
+ >>> client.containers.run('alpine', 'echo hello world')
+ b'hello world\\n'
+
+ Run a container and detach:
+
+ >>> container = client.containers.run('bfirsh/reticulate-splines',
+ detach=True)
+ >>> container.logs()
+ 'Reticulating spline 1...\\nReticulating spline 2...\\n'
+
+ Args:
+ image (str): The image to run.
+ command (str or list): The command to run in the container.
+ auto_remove (bool): enable auto-removal of the container on daemon
+ side when the container's process exits.
+ blkio_weight_device: Block IO weight (relative device weight) in
+ the form of: ``[{"Path": "device_path", "Weight": weight}]``.
+ blkio_weight: Block IO weight (relative weight), accepts a weight
+ value between 10 and 1000.
+ cap_add (list of str): Add kernel capabilities. For example,
+ ``["SYS_ADMIN", "MKNOD"]``.
+ cap_drop (list of str): Drop kernel capabilities.
+ cgroup_parent (str): Override the default parent cgroup.
+ cgroupns (str): Override the default cgroup namespace mode for the
+ container. One of:
+ - ``private`` the container runs in its own private cgroup
+ namespace.
+ - ``host`` use the host system's cgroup namespace.
+ cpu_count (int): Number of usable CPUs (Windows only).
+ cpu_percent (int): Usable percentage of the available CPUs
+ (Windows only).
+ cpu_period (int): The length of a CPU period in microseconds.
+ cpu_quota (int): Microseconds of CPU time that the container can
+ get in a CPU period.
+ cpu_rt_period (int): Limit CPU real-time period in microseconds.
+ cpu_rt_runtime (int): Limit CPU real-time runtime in microseconds.
+ cpu_shares (int): CPU shares (relative weight).
+ cpuset_cpus (str): CPUs in which to allow execution (``0-3``,
+ ``0,1``).
+ cpuset_mems (str): Memory nodes (MEMs) in which to allow execution
+ (``0-3``, ``0,1``). Only effective on NUMA systems.
+ detach (bool): Run container in the background and return a
+ :py:class:`Container` object.
+ device_cgroup_rules (:py:class:`list`): A list of cgroup rules to
+ apply to the container.
+ device_read_bps: Limit read rate (bytes per second) from a device
+ in the form of: `[{"Path": "device_path", "Rate": rate}]`
+ device_read_iops: Limit read rate (IO per second) from a device.
+ device_write_bps: Limit write rate (bytes per second) from a
+ device.
+ device_write_iops: Limit write rate (IO per second) from a device.
+ devices (:py:class:`list`): Expose host devices to the container,
+ as a list of strings in the form
+ ``<path_on_host>:<path_in_container>:<cgroup_permissions>``.
+
+ For example, ``/dev/sda:/dev/xvda:rwm`` allows the container
+ to have read-write access to the host's ``/dev/sda`` via a
+ node named ``/dev/xvda`` inside the container.
+ device_requests (:py:class:`list`): Expose host resources such as
+ GPUs to the container, as a list of
+ :py:class:`docker.types.DeviceRequest` instances.
+ dns (:py:class:`list`): Set custom DNS servers.
+ dns_opt (:py:class:`list`): Additional options to be added to the
+ container's ``resolv.conf`` file.
+ dns_search (:py:class:`list`): DNS search domains.
+ domainname (str or list): Set custom DNS search domains.
+ entrypoint (str or list): The entrypoint for the container.
+ environment (dict or list): Environment variables to set inside
+ the container, as a dictionary or a list of strings in the
+ format ``["SOMEVARIABLE=xxx"]``.
+ extra_hosts (dict): Additional hostnames to resolve inside the
+ container, as a mapping of hostname to IP address.
+ group_add (:py:class:`list`): List of additional group names and/or
+ IDs that the container process will run as.
+ healthcheck (dict): Specify a test to perform to check that the
+ container is healthy. The dict takes the following keys:
+
+ - test (:py:class:`list` or str): Test to perform to determine
+ container health. Possible values:
+
+ - Empty list: Inherit healthcheck from parent image
+ - ``["NONE"]``: Disable healthcheck
+ - ``["CMD", args...]``: exec arguments directly.
+ - ``["CMD-SHELL", command]``: Run command in the system's
+ default shell.
+
+ If a string is provided, it will be used as a ``CMD-SHELL``
+ command.
+ - interval (int): The time to wait between checks in
+ nanoseconds. It should be 0 or at least 1000000 (1 ms).
+ - timeout (int): The time to wait before considering the check
+ to have hung. It should be 0 or at least 1000000 (1 ms).
+ - retries (int): The number of consecutive failures needed to
+ consider a container as unhealthy.
+ - start_period (int): Start period for the container to
+ initialize before starting health-retries countdown in
+ nanoseconds. It should be 0 or at least 1000000 (1 ms).
+ hostname (str): Optional hostname for the container.
+ init (bool): Run an init inside the container that forwards
+ signals and reaps processes
+ init_path (str): Path to the docker-init binary
+ ipc_mode (str): Set the IPC mode for the container.
+ isolation (str): Isolation technology to use. Default: `None`.
+ kernel_memory (int or str): Kernel memory limit
+ labels (dict or list): A dictionary of name-value labels (e.g.
+ ``{"label1": "value1", "label2": "value2"}``) or a list of
+ names of labels to set with empty values (e.g.
+ ``["label1", "label2"]``)
+ links (dict): Mapping of links using the
+ ``{'container': 'alias'}`` format. The alias is optional.
+ Containers declared in this dict will be linked to the new
+ container using the provided alias. Default: ``None``.
+ log_config (LogConfig): Logging configuration.
+ lxc_conf (dict): LXC config.
+ mac_address (str): MAC address to assign to the container.
+ mem_limit (int or str): Memory limit. Accepts float values
+ (which represent the memory limit of the created container in
+ bytes) or a string with a units identification char
+ (``100000b``, ``1000k``, ``128m``, ``1g``). If a string is
+ specified without a units character, bytes are assumed as an
+ intended unit.
+ mem_reservation (int or str): Memory soft limit.
+ mem_swappiness (int): Tune a container's memory swappiness
+ behavior. Accepts number between 0 and 100.
+ memswap_limit (str or int): Maximum amount of memory + swap a
+ container is allowed to consume.
+ mounts (:py:class:`list`): Specification for mounts to be added to
+ the container. More powerful alternative to ``volumes``. Each
+ item in the list is expected to be a
+ :py:class:`docker.types.Mount` object.
+ name (str): The name for this container.
+ nano_cpus (int): CPU quota in units of 1e-9 CPUs.
+ network (str): Name of the network this container will be connected
+ to at creation time. You can connect to additional networks
+ using :py:meth:`Network.connect`. Incompatible with
+ ``network_mode``.
+ network_disabled (bool): Disable networking.
+ network_mode (str): One of:
+
+ - ``bridge`` Create a new network stack for the container on
+ the bridge network.
+ - ``none`` No networking for this container.
+ - ``container:<name|id>`` Reuse another container's network
+ stack.
+ - ``host`` Use the host network stack.
+ This mode is incompatible with ``ports``.
+
+ Incompatible with ``network``.
+ networking_config (Dict[str, EndpointConfig]):
+ Dictionary of EndpointConfig objects for each container network.
+ The key is the name of the network.
+ Defaults to ``None``.
+
+ Used in conjuction with ``network``.
+
+ Incompatible with ``network_mode``.
+ oom_kill_disable (bool): Whether to disable OOM killer.
+ oom_score_adj (int): An integer value containing the score given
+ to the container in order to tune OOM killer preferences.
+ pid_mode (str): If set to ``host``, use the host PID namespace
+ inside the container.
+ pids_limit (int): Tune a container's pids limit. Set ``-1`` for
+ unlimited.
+ platform (str): Platform in the format ``os[/arch[/variant]]``.
+ Only used if the method needs to pull the requested image.
+ ports (dict): Ports to bind inside the container.
+
+ The keys of the dictionary are the ports to bind inside the
+ container, either as an integer or a string in the form
+ ``port/protocol``, where the protocol is either ``tcp``,
+ ``udp``, or ``sctp``.
+
+ The values of the dictionary are the corresponding ports to
+ open on the host, which can be either:
+
+ - The port number, as an integer. For example,
+ ``{'2222/tcp': 3333}`` will expose port 2222 inside the
+ container as port 3333 on the host.
+ - ``None``, to assign a random host port. For example,
+ ``{'2222/tcp': None}``.
+ - A tuple of ``(address, port)`` if you want to specify the
+ host interface. For example,
+ ``{'1111/tcp': ('127.0.0.1', 1111)}``.
+ - A list of integers, if you want to bind multiple host ports
+ to a single container port. For example,
+ ``{'1111/tcp': [1234, 4567]}``.
+
+ Incompatible with ``host`` network mode.
+ privileged (bool): Give extended privileges to this container.
+ publish_all_ports (bool): Publish all ports to the host.
+ read_only (bool): Mount the container's root filesystem as read
+ only.
+ remove (bool): Remove the container when it has finished running.
+ Default: ``False``.
+ restart_policy (dict): Restart the container when it exits.
+ Configured as a dictionary with keys:
+
+ - ``Name`` One of ``on-failure``, or ``always``.
+ - ``MaximumRetryCount`` Number of times to restart the
+ container on failure.
+
+ For example:
+ ``{"Name": "on-failure", "MaximumRetryCount": 5}``
+
+ runtime (str): Runtime to use with this container.
+ security_opt (:py:class:`list`): A list of string values to
+ customize labels for MLS systems, such as SELinux.
+ shm_size (str or int): Size of /dev/shm (e.g. ``1G``).
+ stdin_open (bool): Keep ``STDIN`` open even if not attached.
+ stdout (bool): Return logs from ``STDOUT`` when ``detach=False``.
+ Default: ``True``.
+ stderr (bool): Return logs from ``STDERR`` when ``detach=False``.
+ Default: ``False``.
+ stop_signal (str): The stop signal to use to stop the container
+ (e.g. ``SIGINT``).
+ storage_opt (dict): Storage driver options per container as a
+ key-value mapping.
+ stream (bool): If true and ``detach`` is false, return a log
+ generator instead of a string. Ignored if ``detach`` is true.
+ Default: ``False``.
+ sysctls (dict): Kernel parameters to set in the container.
+ tmpfs (dict): Temporary filesystems to mount, as a dictionary
+ mapping a path inside the container to options for that path.
+
+ For example:
+
+ .. code-block:: python
+
+ {
+ '/mnt/vol2': '',
+ '/mnt/vol1': 'size=3G,uid=1000'
+ }
+
+ tty (bool): Allocate a pseudo-TTY.
+ ulimits (:py:class:`list`): Ulimits to set inside the container,
+ as a list of :py:class:`docker.types.Ulimit` instances.
+ use_config_proxy (bool): If ``True``, and if the docker client
+ configuration file (``~/.docker/config.json`` by default)
+ contains a proxy configuration, the corresponding environment
+ variables will be set in the container being built.
+ user (str or int): Username or UID to run commands as inside the
+ container.
+ userns_mode (str): Sets the user namespace mode for the container
+ when user namespace remapping option is enabled. Supported
+ values are: ``host``
+ uts_mode (str): Sets the UTS namespace mode for the container.
+ Supported values are: ``host``
+ version (str): The version of the API to use. Set to ``auto`` to
+ automatically detect the server's version. Default: ``1.35``
+ volume_driver (str): The name of a volume driver/plugin.
+ volumes (dict or list): A dictionary to configure volumes mounted
+ inside the container. The key is either the host path or a
+ volume name, and the value is a dictionary with the keys:
+
+ - ``bind`` The path to mount the volume inside the container
+ - ``mode`` Either ``rw`` to mount the volume read/write, or
+ ``ro`` to mount it read-only.
+
+ For example:
+
+ .. code-block:: python
+
+ {'/home/user1/': {'bind': '/mnt/vol2', 'mode': 'rw'},
+ '/var/www': {'bind': '/mnt/vol1', 'mode': 'ro'}}
+
+ Or a list of strings which each one of its elements specifies a
+ mount volume.
+
+ For example:
+
+ .. code-block:: python
+
+ ['/home/user1/:/mnt/vol2','/var/www:/mnt/vol1']
+
+ volumes_from (:py:class:`list`): List of container names or IDs to
+ get volumes from.
+ working_dir (str): Path to the working directory.
+
+ Returns:
+ The container logs, either ``STDOUT``, ``STDERR``, or both,
+ depending on the value of the ``stdout`` and ``stderr`` arguments.
+
+ ``STDOUT`` and ``STDERR`` may be read only if either ``json-file``
+ or ``journald`` logging driver used. Thus, if you are using none of
+ these drivers, a ``None`` object is returned instead. See the
+ `Engine API documentation
+ <https://docs.docker.com/engine/api/v1.30/#operation/ContainerLogs/>`_
+ for full details.
+
+ If ``detach`` is ``True``, a :py:class:`Container` object is
+ returned instead.
+
+ Raises:
+ :py:class:`docker.errors.ContainerError`
+ If the container exits with a non-zero exit code and
+ ``detach`` is ``False``.
+ :py:class:`docker.errors.ImageNotFound`
+ If the specified image does not exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if isinstance(image, Image):
+ image = image.id
+ stream = kwargs.pop('stream', False)
+ detach = kwargs.pop('detach', False)
+ platform = kwargs.get('platform', None)
+
+ if detach and remove:
+ if version_gte(self.client.api._version, '1.25'):
+ kwargs["auto_remove"] = True
+ else:
+ raise RuntimeError("The options 'detach' and 'remove' cannot "
+ "be used together in api versions < 1.25.")
+
+ if kwargs.get('network') and kwargs.get('network_mode'):
+ raise RuntimeError(
+ 'The options "network" and "network_mode" can not be used '
+ 'together.'
+ )
+
+ if kwargs.get('networking_config') and not kwargs.get('network'):
+ raise RuntimeError(
+ 'The option "networking_config" can not be used '
+ 'without "network".'
+ )
+
+ try:
+ container = self.create(image=image, command=command,
+ detach=detach, **kwargs)
+ except ImageNotFound:
+ self.client.images.pull(image, platform=platform)
+ container = self.create(image=image, command=command,
+ detach=detach, **kwargs)
+
+ container.start()
+
+ if detach:
+ return container
+
+ logging_driver = container.attrs['HostConfig']['LogConfig']['Type']
+
+ out = None
+ if logging_driver == 'json-file' or logging_driver == 'journald':
+ out = container.logs(
+ stdout=stdout, stderr=stderr, stream=True, follow=True
+ )
+
+ exit_status = container.wait()['StatusCode']
+ if exit_status != 0:
+ out = None
+ if not kwargs.get('auto_remove'):
+ out = container.logs(stdout=False, stderr=True)
+
+ if remove:
+ container.remove()
+ if exit_status != 0:
+ raise ContainerError(
+ container, exit_status, command, image, out
+ )
+
+ if stream or out is None:
+ return out
+ return b''.join(out)
+
+ def create(self, image, command=None, **kwargs):
+ """
+ Create a container without starting it. Similar to ``docker create``.
+
+ Takes the same arguments as :py:meth:`run`, except for ``stdout``,
+ ``stderr``, and ``remove``.
+
+ Returns:
+ A :py:class:`Container` object.
+
+ Raises:
+ :py:class:`docker.errors.ImageNotFound`
+ If the specified image does not exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if isinstance(image, Image):
+ image = image.id
+ kwargs['image'] = image
+ kwargs['command'] = command
+ kwargs['version'] = self.client.api._version
+ create_kwargs = _create_container_args(kwargs)
+ resp = self.client.api.create_container(**create_kwargs)
+ return self.get(resp['Id'])
+
+ def get(self, container_id):
+ """
+ Get a container by name or ID.
+
+ Args:
+ container_id (str): Container name or ID.
+
+ Returns:
+ A :py:class:`Container` object.
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ If the container does not exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ resp = self.client.api.inspect_container(container_id)
+ return self.prepare_model(resp)
+
+ def list(self, all=False, before=None, filters=None, limit=-1, since=None,
+ sparse=False, ignore_removed=False):
+ """
+ List containers. Similar to the ``docker ps`` command.
+
+ Args:
+ all (bool): Show all containers. Only running containers are shown
+ by default
+ since (str): Show only containers created since Id or Name, include
+ non-running ones
+ before (str): Show only container created before Id or Name,
+ include non-running ones
+ limit (int): Show `limit` last created containers, include
+ non-running ones
+ filters (dict): Filters to be processed on the image list.
+ Available filters:
+
+ - `exited` (int): Only containers with specified exit code
+ - `status` (str): One of ``restarting``, ``running``,
+ ``paused``, ``exited``
+ - `label` (str|list): format either ``"key"``, ``"key=value"``
+ or a list of such.
+ - `id` (str): The id of the container.
+ - `name` (str): The name of the container.
+ - `ancestor` (str): Filter by container ancestor. Format of
+ ``<image-name>[:tag]``, ``<image-id>``, or
+ ``<image@digest>``.
+ - `before` (str): Only containers created before a particular
+ container. Give the container name or id.
+ - `since` (str): Only containers created after a particular
+ container. Give container name or id.
+
+ A comprehensive list can be found in the documentation for
+ `docker ps
+ <https://docs.docker.com/engine/reference/commandline/ps>`_.
+
+ sparse (bool): Do not inspect containers. Returns partial
+ information, but guaranteed not to block. Use
+ :py:meth:`Container.reload` on resulting objects to retrieve
+ all attributes. Default: ``False``
+ ignore_removed (bool): Ignore failures due to missing containers
+ when attempting to inspect containers from the original list.
+ Set to ``True`` if race conditions are likely. Has no effect
+ if ``sparse=True``. Default: ``False``
+
+ Returns:
+ (list of :py:class:`Container`)
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ resp = self.client.api.containers(all=all, before=before,
+ filters=filters, limit=limit,
+ since=since)
+ if sparse:
+ return [self.prepare_model(r) for r in resp]
+ else:
+ containers = []
+ for r in resp:
+ try:
+ containers.append(self.get(r['Id']))
+ # a container may have been removed while iterating
+ except NotFound:
+ if not ignore_removed:
+ raise
+ return containers
+
+ def prune(self, filters=None):
+ return self.client.api.prune_containers(filters=filters)
+
+ prune.__doc__ = APIClient.prune_containers.__doc__
+
+
+# kwargs to copy straight from run to create
+RUN_CREATE_KWARGS = [
+ 'command',
+ 'detach',
+ 'domainname',
+ 'entrypoint',
+ 'environment',
+ 'healthcheck',
+ 'hostname',
+ 'image',
+ 'labels',
+ 'mac_address',
+ 'name',
+ 'network_disabled',
+ 'platform',
+ 'stdin_open',
+ 'stop_signal',
+ 'tty',
+ 'use_config_proxy',
+ 'user',
+ 'working_dir',
+]
+
+# kwargs to copy straight from run to host_config
+RUN_HOST_CONFIG_KWARGS = [
+ 'auto_remove',
+ 'blkio_weight_device',
+ 'blkio_weight',
+ 'cap_add',
+ 'cap_drop',
+ 'cgroup_parent',
+ 'cgroupns',
+ 'cpu_count',
+ 'cpu_percent',
+ 'cpu_period',
+ 'cpu_quota',
+ 'cpu_shares',
+ 'cpuset_cpus',
+ 'cpuset_mems',
+ 'cpu_rt_period',
+ 'cpu_rt_runtime',
+ 'device_cgroup_rules',
+ 'device_read_bps',
+ 'device_read_iops',
+ 'device_write_bps',
+ 'device_write_iops',
+ 'devices',
+ 'device_requests',
+ 'dns_opt',
+ 'dns_search',
+ 'dns',
+ 'extra_hosts',
+ 'group_add',
+ 'init',
+ 'init_path',
+ 'ipc_mode',
+ 'isolation',
+ 'kernel_memory',
+ 'links',
+ 'log_config',
+ 'lxc_conf',
+ 'mem_limit',
+ 'mem_reservation',
+ 'mem_swappiness',
+ 'memswap_limit',
+ 'mounts',
+ 'nano_cpus',
+ 'network_mode',
+ 'oom_kill_disable',
+ 'oom_score_adj',
+ 'pid_mode',
+ 'pids_limit',
+ 'privileged',
+ 'publish_all_ports',
+ 'read_only',
+ 'restart_policy',
+ 'security_opt',
+ 'shm_size',
+ 'storage_opt',
+ 'sysctls',
+ 'tmpfs',
+ 'ulimits',
+ 'userns_mode',
+ 'uts_mode',
+ 'version',
+ 'volume_driver',
+ 'volumes_from',
+ 'runtime'
+]
+
+
+def _create_container_args(kwargs):
+ """
+ Convert arguments to create() to arguments to create_container().
+ """
+ # Copy over kwargs which can be copied directly
+ create_kwargs = {}
+ for key in copy.copy(kwargs):
+ if key in RUN_CREATE_KWARGS:
+ create_kwargs[key] = kwargs.pop(key)
+ host_config_kwargs = {}
+ for key in copy.copy(kwargs):
+ if key in RUN_HOST_CONFIG_KWARGS:
+ host_config_kwargs[key] = kwargs.pop(key)
+
+ # Process kwargs which are split over both create and host_config
+ ports = kwargs.pop('ports', {})
+ if ports:
+ host_config_kwargs['port_bindings'] = ports
+
+ volumes = kwargs.pop('volumes', {})
+ if volumes:
+ host_config_kwargs['binds'] = volumes
+
+ network = kwargs.pop('network', None)
+ networking_config = kwargs.pop('networking_config', None)
+ if network:
+ if networking_config:
+ # Sanity check: check if the network is defined in the
+ # networking config dict, otherwise switch to None
+ if network not in networking_config:
+ networking_config = None
+
+ create_kwargs['networking_config'] = NetworkingConfig(
+ networking_config
+ ) if networking_config else {network: None}
+ host_config_kwargs['network_mode'] = network
+
+ # All kwargs should have been consumed by this point, so raise
+ # error if any are left
+ if kwargs:
+ raise create_unexpected_kwargs_error('run', kwargs)
+
+ create_kwargs['host_config'] = HostConfig(**host_config_kwargs)
+
+ # Fill in any kwargs which need processing by create_host_config first
+ port_bindings = create_kwargs['host_config'].get('PortBindings')
+ if port_bindings:
+ # sort to make consistent for tests
+ create_kwargs['ports'] = [tuple(p.split('/', 1))
+ for p in sorted(port_bindings.keys())]
+ if volumes:
+ if isinstance(volumes, dict):
+ create_kwargs['volumes'] = [
+ v.get('bind') for v in volumes.values()
+ ]
+ else:
+ create_kwargs['volumes'] = [
+ _host_volume_from_bind(v) for v in volumes
+ ]
+ return create_kwargs
+
+
+def _host_volume_from_bind(bind):
+ drive, rest = ntpath.splitdrive(bind)
+ bits = rest.split(':', 1)
+ if len(bits) == 1 or bits[1] in ('ro', 'rw'):
+ return drive + bits[0]
+ elif bits[1].endswith(':ro') or bits[1].endswith(':rw'):
+ return bits[1][:-3]
+ else:
+ return bits[1]
+
+
+ExecResult = namedtuple('ExecResult', 'exit_code,output')
+""" A result of Container.exec_run with the properties ``exit_code`` and
+ ``output``. """
diff --git a/contrib/python/docker/docker/models/images.py b/contrib/python/docker/docker/models/images.py
new file mode 100644
index 00000000000..4f058d24d93
--- /dev/null
+++ b/contrib/python/docker/docker/models/images.py
@@ -0,0 +1,505 @@
+import itertools
+import re
+import warnings
+
+from ..api import APIClient
+from ..constants import DEFAULT_DATA_CHUNK_SIZE
+from ..errors import BuildError, ImageLoadError, InvalidArgument
+from ..utils import parse_repository_tag
+from ..utils.json_stream import json_stream
+from .resource import Collection, Model
+
+
+class Image(Model):
+ """
+ An image on the server.
+ """
+ def __repr__(self):
+ tag_str = "', '".join(self.tags)
+ return f"<{self.__class__.__name__}: '{tag_str}'>"
+
+ @property
+ def labels(self):
+ """
+ The labels of an image as dictionary.
+ """
+ result = self.attrs['Config'].get('Labels')
+ return result or {}
+
+ @property
+ def short_id(self):
+ """
+ The ID of the image truncated to 12 characters, plus the ``sha256:``
+ prefix.
+ """
+ if self.id.startswith('sha256:'):
+ return self.id[:19]
+ return self.id[:12]
+
+ @property
+ def tags(self):
+ """
+ The image's tags.
+ """
+ tags = self.attrs.get('RepoTags')
+ if tags is None:
+ tags = []
+ return [tag for tag in tags if tag != '<none>:<none>']
+
+ def history(self):
+ """
+ Show the history of an image.
+
+ Returns:
+ (list): The history of the image.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.history(self.id)
+
+ def remove(self, force=False, noprune=False):
+ """
+ Remove this image.
+
+ Args:
+ force (bool): Force removal of the image
+ noprune (bool): Do not delete untagged parents
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.remove_image(
+ self.id,
+ force=force,
+ noprune=noprune,
+ )
+
+ def save(self, chunk_size=DEFAULT_DATA_CHUNK_SIZE, named=False):
+ """
+ Get a tarball of an image. Similar to the ``docker save`` command.
+
+ Args:
+ chunk_size (int): The generator will return up to that much data
+ per iteration, but may return less. If ``None``, data will be
+ streamed as it is received. Default: 2 MB
+ named (str or bool): If ``False`` (default), the tarball will not
+ retain repository and tag information for this image. If set
+ to ``True``, the first tag in the :py:attr:`~tags` list will
+ be used to identify the image. Alternatively, any element of
+ the :py:attr:`~tags` list can be used as an argument to use
+ that specific tag as the saved identifier.
+
+ Returns:
+ (generator): A stream of raw archive data.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> image = cli.images.get("busybox:latest")
+ >>> f = open('/tmp/busybox-latest.tar', 'wb')
+ >>> for chunk in image.save():
+ >>> f.write(chunk)
+ >>> f.close()
+ """
+ img = self.id
+ if named:
+ img = self.tags[0] if self.tags else img
+ if isinstance(named, str):
+ if named not in self.tags:
+ raise InvalidArgument(
+ f"{named} is not a valid tag for this image"
+ )
+ img = named
+
+ return self.client.api.get_image(img, chunk_size)
+
+ def tag(self, repository, tag=None, **kwargs):
+ """
+ Tag this image into a repository. Similar to the ``docker tag``
+ command.
+
+ Args:
+ repository (str): The repository to set for the tag
+ tag (str): The tag name
+ force (bool): Force
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Returns:
+ (bool): ``True`` if successful
+ """
+ return self.client.api.tag(self.id, repository, tag=tag, **kwargs)
+
+
+class RegistryData(Model):
+ """
+ Image metadata stored on the registry, including available platforms.
+ """
+ def __init__(self, image_name, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+ self.image_name = image_name
+
+ @property
+ def id(self):
+ """
+ The ID of the object.
+ """
+ return self.attrs['Descriptor']['digest']
+
+ @property
+ def short_id(self):
+ """
+ The ID of the image truncated to 12 characters, plus the ``sha256:``
+ prefix.
+ """
+ return self.id[:19]
+
+ def pull(self, platform=None):
+ """
+ Pull the image digest.
+
+ Args:
+ platform (str): The platform to pull the image for.
+ Default: ``None``
+
+ Returns:
+ (:py:class:`Image`): A reference to the pulled image.
+ """
+ repository, _ = parse_repository_tag(self.image_name)
+ return self.collection.pull(repository, tag=self.id, platform=platform)
+
+ def has_platform(self, platform):
+ """
+ Check whether the given platform identifier is available for this
+ digest.
+
+ Args:
+ platform (str or dict): A string using the ``os[/arch[/variant]]``
+ format, or a platform dictionary.
+
+ Returns:
+ (bool): ``True`` if the platform is recognized as available,
+ ``False`` otherwise.
+
+ Raises:
+ :py:class:`docker.errors.InvalidArgument`
+ If the platform argument is not a valid descriptor.
+ """
+ if platform and not isinstance(platform, dict):
+ parts = platform.split('/')
+ if len(parts) > 3 or len(parts) < 1:
+ raise InvalidArgument(
+ f'"{platform}" is not a valid platform descriptor'
+ )
+ platform = {'os': parts[0]}
+ if len(parts) > 2:
+ platform['variant'] = parts[2]
+ if len(parts) > 1:
+ platform['architecture'] = parts[1]
+ return normalize_platform(
+ platform, self.client.version()
+ ) in self.attrs['Platforms']
+
+ def reload(self):
+ self.attrs = self.client.api.inspect_distribution(self.image_name)
+
+ reload.__doc__ = Model.reload.__doc__
+
+
+class ImageCollection(Collection):
+ model = Image
+
+ def build(self, **kwargs):
+ """
+ Build an image and return it. Similar to the ``docker build``
+ command. Either ``path`` or ``fileobj`` must be set.
+
+ If you already have a tar file for the Docker build context (including
+ a Dockerfile), pass a readable file-like object to ``fileobj``
+ and also pass ``custom_context=True``. If the stream is also
+ compressed, set ``encoding`` to the correct value (e.g ``gzip``).
+
+ If you want to get the raw output of the build, use the
+ :py:meth:`~docker.api.build.BuildApiMixin.build` method in the
+ low-level API.
+
+ Args:
+ path (str): Path to the directory containing the Dockerfile
+ fileobj: A file object to use as the Dockerfile. (Or a file-like
+ object)
+ tag (str): A tag to add to the final image
+ quiet (bool): Whether to return the status
+ nocache (bool): Don't use the cache when set to ``True``
+ rm (bool): Remove intermediate containers. The ``docker build``
+ command now defaults to ``--rm=true``, but we have kept the old
+ default of `False` to preserve backward compatibility
+ timeout (int): HTTP timeout
+ custom_context (bool): Optional if using ``fileobj``
+ encoding (str): The encoding for a stream. Set to ``gzip`` for
+ compressing
+ pull (bool): Downloads any updates to the FROM image in Dockerfiles
+ forcerm (bool): Always remove intermediate containers, even after
+ unsuccessful builds
+ dockerfile (str): path within the build context to the Dockerfile
+ buildargs (dict): A dictionary of build arguments
+ container_limits (dict): A dictionary of limits applied to each
+ container created by the build process. Valid keys:
+
+ - memory (int): set memory limit for build
+ - memswap (int): Total memory (memory + swap), -1 to disable
+ swap
+ - cpushares (int): CPU shares (relative weight)
+ - cpusetcpus (str): CPUs in which to allow execution, e.g.,
+ ``"0-3"``, ``"0,1"``
+ shmsize (int): Size of `/dev/shm` in bytes. The size must be
+ greater than 0. If omitted the system uses 64MB
+ labels (dict): A dictionary of labels to set on the image
+ cache_from (list): A list of images used for build cache
+ resolution
+ target (str): Name of the build-stage to build in a multi-stage
+ Dockerfile
+ network_mode (str): networking mode for the run commands during
+ build
+ squash (bool): Squash the resulting images layers into a
+ single layer.
+ extra_hosts (dict): Extra hosts to add to /etc/hosts in building
+ containers, as a mapping of hostname to IP address.
+ platform (str): Platform in the format ``os[/arch[/variant]]``.
+ isolation (str): Isolation technology used during build.
+ Default: `None`.
+ use_config_proxy (bool): If ``True``, and if the docker client
+ configuration file (``~/.docker/config.json`` by default)
+ contains a proxy configuration, the corresponding environment
+ variables will be set in the container being built.
+
+ Returns:
+ (tuple): The first item is the :py:class:`Image` object for the
+ image that was built. The second item is a generator of the
+ build logs as JSON-decoded objects.
+
+ Raises:
+ :py:class:`docker.errors.BuildError`
+ If there is an error during the build.
+ :py:class:`docker.errors.APIError`
+ If the server returns any other error.
+ ``TypeError``
+ If neither ``path`` nor ``fileobj`` is specified.
+ """
+ resp = self.client.api.build(**kwargs)
+ if isinstance(resp, str):
+ return self.get(resp)
+ last_event = None
+ image_id = None
+ result_stream, internal_stream = itertools.tee(json_stream(resp))
+ for chunk in internal_stream:
+ if 'error' in chunk:
+ raise BuildError(chunk['error'], result_stream)
+ if 'stream' in chunk:
+ match = re.search(
+ r'(^Successfully built |sha256:)([0-9a-f]+)$',
+ chunk['stream']
+ )
+ if match:
+ image_id = match.group(2)
+ last_event = chunk
+ if image_id:
+ return (self.get(image_id), result_stream)
+ raise BuildError(last_event or 'Unknown', result_stream)
+
+ def get(self, name):
+ """
+ Gets an image.
+
+ Args:
+ name (str): The name of the image.
+
+ Returns:
+ (:py:class:`Image`): The image.
+
+ Raises:
+ :py:class:`docker.errors.ImageNotFound`
+ If the image does not exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.prepare_model(self.client.api.inspect_image(name))
+
+ def get_registry_data(self, name, auth_config=None):
+ """
+ Gets the registry data for an image.
+
+ Args:
+ name (str): The name of the image.
+ auth_config (dict): Override the credentials that are found in the
+ config for this request. ``auth_config`` should contain the
+ ``username`` and ``password`` keys to be valid.
+
+ Returns:
+ (:py:class:`RegistryData`): The data object.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return RegistryData(
+ image_name=name,
+ attrs=self.client.api.inspect_distribution(name, auth_config),
+ client=self.client,
+ collection=self,
+ )
+
+ def list(self, name=None, all=False, filters=None):
+ """
+ List images on the server.
+
+ Args:
+ name (str): Only show images belonging to the repository ``name``
+ all (bool): Show intermediate image layers. By default, these are
+ filtered out.
+ filters (dict): Filters to be processed on the image list.
+ Available filters:
+ - ``dangling`` (bool)
+ - `label` (str|list): format either ``"key"``, ``"key=value"``
+ or a list of such.
+
+ Returns:
+ (list of :py:class:`Image`): The images.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ resp = self.client.api.images(name=name, all=all, filters=filters)
+ return [self.get(r["Id"]) for r in resp]
+
+ def load(self, data):
+ """
+ Load an image that was previously saved using
+ :py:meth:`~docker.models.images.Image.save` (or ``docker save``).
+ Similar to ``docker load``.
+
+ Args:
+ data (binary): Image data to be loaded.
+
+ Returns:
+ (list of :py:class:`Image`): The images.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ resp = self.client.api.load_image(data)
+ images = []
+ for chunk in resp:
+ if 'stream' in chunk:
+ match = re.search(
+ r'(^Loaded image ID: |^Loaded image: )(.+)$',
+ chunk['stream']
+ )
+ if match:
+ image_id = match.group(2)
+ images.append(image_id)
+ if 'error' in chunk:
+ raise ImageLoadError(chunk['error'])
+
+ return [self.get(i) for i in images]
+
+ def pull(self, repository, tag=None, all_tags=False, **kwargs):
+ """
+ Pull an image of the given name and return it. Similar to the
+ ``docker pull`` command.
+ If ``tag`` is ``None`` or empty, it is set to ``latest``.
+ If ``all_tags`` is set, the ``tag`` parameter is ignored and all image
+ tags will be pulled.
+
+ If you want to get the raw pull output, use the
+ :py:meth:`~docker.api.image.ImageApiMixin.pull` method in the
+ low-level API.
+
+ Args:
+ repository (str): The repository to pull
+ tag (str): The tag to pull
+ auth_config (dict): Override the credentials that are found in the
+ config for this request. ``auth_config`` should contain the
+ ``username`` and ``password`` keys to be valid.
+ platform (str): Platform in the format ``os[/arch[/variant]]``
+ all_tags (bool): Pull all image tags
+
+ Returns:
+ (:py:class:`Image` or list): The image that has been pulled.
+ If ``all_tags`` is True, the method will return a list
+ of :py:class:`Image` objects belonging to this repository.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> # Pull the image tagged `latest` in the busybox repo
+ >>> image = client.images.pull('busybox')
+
+ >>> # Pull all tags in the busybox repo
+ >>> images = client.images.pull('busybox', all_tags=True)
+ """
+ repository, image_tag = parse_repository_tag(repository)
+ tag = tag or image_tag or 'latest'
+
+ if 'stream' in kwargs:
+ warnings.warn(
+ '`stream` is not a valid parameter for this method'
+ ' and will be overridden',
+ stacklevel=1,
+ )
+ del kwargs['stream']
+
+ pull_log = self.client.api.pull(
+ repository, tag=tag, stream=True, all_tags=all_tags, **kwargs
+ )
+ for _ in pull_log:
+ # We don't do anything with the logs, but we need
+ # to keep the connection alive and wait for the image
+ # to be pulled.
+ pass
+ if not all_tags:
+ sep = '@' if tag.startswith('sha256:') else ':'
+ return self.get(f'{repository}{sep}{tag}')
+ return self.list(repository)
+
+ def push(self, repository, tag=None, **kwargs):
+ return self.client.api.push(repository, tag=tag, **kwargs)
+ push.__doc__ = APIClient.push.__doc__
+
+ def remove(self, *args, **kwargs):
+ self.client.api.remove_image(*args, **kwargs)
+ remove.__doc__ = APIClient.remove_image.__doc__
+
+ def search(self, *args, **kwargs):
+ return self.client.api.search(*args, **kwargs)
+ search.__doc__ = APIClient.search.__doc__
+
+ def prune(self, filters=None):
+ return self.client.api.prune_images(filters=filters)
+ prune.__doc__ = APIClient.prune_images.__doc__
+
+ def prune_builds(self, *args, **kwargs):
+ return self.client.api.prune_builds(*args, **kwargs)
+ prune_builds.__doc__ = APIClient.prune_builds.__doc__
+
+
+def normalize_platform(platform, engine_info):
+ if platform is None:
+ platform = {}
+ if 'os' not in platform:
+ platform['os'] = engine_info['Os']
+ if 'architecture' not in platform:
+ platform['architecture'] = engine_info['Arch']
+ return platform
diff --git a/contrib/python/docker/docker/models/networks.py b/contrib/python/docker/docker/models/networks.py
new file mode 100644
index 00000000000..9b3ed7829c8
--- /dev/null
+++ b/contrib/python/docker/docker/models/networks.py
@@ -0,0 +1,218 @@
+from ..api import APIClient
+from ..utils import version_gte
+from .containers import Container
+from .resource import Collection, Model
+
+
+class Network(Model):
+ """
+ A Docker network.
+ """
+ @property
+ def name(self):
+ """
+ The name of the network.
+ """
+ return self.attrs.get('Name')
+
+ @property
+ def containers(self):
+ """
+ The containers that are connected to the network, as a list of
+ :py:class:`~docker.models.containers.Container` objects.
+ """
+ return [
+ self.client.containers.get(cid) for cid in
+ (self.attrs.get('Containers') or {}).keys()
+ ]
+
+ def connect(self, container, *args, **kwargs):
+ """
+ Connect a container to this network.
+
+ Args:
+ container (str): Container to connect to this network, as either
+ an ID, name, or :py:class:`~docker.models.containers.Container`
+ object.
+ aliases (:py:class:`list`): A list of aliases for this endpoint.
+ Names in that list can be used within the network to reach the
+ container. Defaults to ``None``.
+ links (:py:class:`list`): A list of links for this endpoint.
+ Containers declared in this list will be linkedto this
+ container. Defaults to ``None``.
+ ipv4_address (str): The IP address of this container on the
+ network, using the IPv4 protocol. Defaults to ``None``.
+ ipv6_address (str): The IP address of this container on the
+ network, using the IPv6 protocol. Defaults to ``None``.
+ link_local_ips (:py:class:`list`): A list of link-local (IPv4/IPv6)
+ addresses.
+ driver_opt (dict): A dictionary of options to provide to the
+ network driver. Defaults to ``None``.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if isinstance(container, Container):
+ container = container.id
+ return self.client.api.connect_container_to_network(
+ container, self.id, *args, **kwargs
+ )
+
+ def disconnect(self, container, *args, **kwargs):
+ """
+ Disconnect a container from this network.
+
+ Args:
+ container (str): Container to disconnect from this network, as
+ either an ID, name, or
+ :py:class:`~docker.models.containers.Container` object.
+ force (bool): Force the container to disconnect from a network.
+ Default: ``False``
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if isinstance(container, Container):
+ container = container.id
+ return self.client.api.disconnect_container_from_network(
+ container, self.id, *args, **kwargs
+ )
+
+ def remove(self):
+ """
+ Remove this network.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.remove_network(self.id)
+
+
+class NetworkCollection(Collection):
+ """
+ Networks on the Docker server.
+ """
+ model = Network
+
+ def create(self, name, *args, **kwargs):
+ """
+ Create a network. Similar to the ``docker network create``.
+
+ Args:
+ name (str): Name of the network
+ driver (str): Name of the driver used to create the network
+ options (dict): Driver options as a key-value dictionary
+ ipam (IPAMConfig): Optional custom IP scheme for the network.
+ check_duplicate (bool): Request daemon to check for networks with
+ same name. Default: ``None``.
+ internal (bool): Restrict external access to the network. Default
+ ``False``.
+ labels (dict): Map of labels to set on the network. Default
+ ``None``.
+ enable_ipv6 (bool): Enable IPv6 on the network. Default ``False``.
+ attachable (bool): If enabled, and the network is in the global
+ scope, non-service containers on worker nodes will be able to
+ connect to the network.
+ scope (str): Specify the network's scope (``local``, ``global`` or
+ ``swarm``)
+ ingress (bool): If set, create an ingress network which provides
+ the routing-mesh in swarm mode.
+
+ Returns:
+ (:py:class:`Network`): The network that was created.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+ A network using the bridge driver:
+
+ >>> client.networks.create("network1", driver="bridge")
+
+ You can also create more advanced networks with custom IPAM
+ configurations. For example, setting the subnet to
+ ``192.168.52.0/24`` and gateway address to ``192.168.52.254``.
+
+ .. code-block:: python
+
+ >>> ipam_pool = docker.types.IPAMPool(
+ subnet='192.168.52.0/24',
+ gateway='192.168.52.254'
+ )
+ >>> ipam_config = docker.types.IPAMConfig(
+ pool_configs=[ipam_pool]
+ )
+ >>> client.networks.create(
+ "network1",
+ driver="bridge",
+ ipam=ipam_config
+ )
+
+ """
+ resp = self.client.api.create_network(name, *args, **kwargs)
+ return self.get(resp['Id'])
+
+ def get(self, network_id, *args, **kwargs):
+ """
+ Get a network by its ID.
+
+ Args:
+ network_id (str): The ID of the network.
+ verbose (bool): Retrieve the service details across the cluster in
+ swarm mode.
+ scope (str): Filter the network by scope (``swarm``, ``global``
+ or ``local``).
+
+ Returns:
+ (:py:class:`Network`) The network.
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ If the network does not exist.
+
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ """
+ return self.prepare_model(
+ self.client.api.inspect_network(network_id, *args, **kwargs)
+ )
+
+ def list(self, *args, **kwargs):
+ """
+ List networks. Similar to the ``docker network ls`` command.
+
+ Args:
+ names (:py:class:`list`): List of names to filter by.
+ ids (:py:class:`list`): List of ids to filter by.
+ filters (dict): Filters to be processed on the network list.
+ Available filters:
+ - ``driver=[<driver-name>]`` Matches a network's driver.
+ - `label` (str|list): format either ``"key"``, ``"key=value"``
+ or a list of such.
+ - ``type=["custom"|"builtin"]`` Filters networks by type.
+ greedy (bool): Fetch more details for each network individually.
+ You might want this to get the containers attached to them.
+
+ Returns:
+ (list of :py:class:`Network`) The networks on the server.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ greedy = kwargs.pop('greedy', False)
+ resp = self.client.api.networks(*args, **kwargs)
+ networks = [self.prepare_model(item) for item in resp]
+ if greedy and version_gte(self.client.api._version, '1.28'):
+ for net in networks:
+ net.reload()
+ return networks
+
+ def prune(self, filters=None):
+ return self.client.api.prune_networks(filters=filters)
+ prune.__doc__ = APIClient.prune_networks.__doc__
diff --git a/contrib/python/docker/docker/models/nodes.py b/contrib/python/docker/docker/models/nodes.py
new file mode 100644
index 00000000000..2fa480c544a
--- /dev/null
+++ b/contrib/python/docker/docker/models/nodes.py
@@ -0,0 +1,107 @@
+from .resource import Collection, Model
+
+
+class Node(Model):
+ """A node in a swarm."""
+ id_attribute = 'ID'
+
+ @property
+ def version(self):
+ """
+ The version number of the service. If this is not the same as the
+ server, the :py:meth:`update` function will not work and you will
+ need to call :py:meth:`reload` before calling it again.
+ """
+ return self.attrs.get('Version').get('Index')
+
+ def update(self, node_spec):
+ """
+ Update the node's configuration.
+
+ Args:
+ node_spec (dict): Configuration settings to update. Any values
+ not provided will be removed. Default: ``None``
+
+ Returns:
+ `True` if the request went through.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> node_spec = {'Availability': 'active',
+ 'Name': 'node-name',
+ 'Role': 'manager',
+ 'Labels': {'foo': 'bar'}
+ }
+ >>> node.update(node_spec)
+
+ """
+ return self.client.api.update_node(self.id, self.version, node_spec)
+
+ def remove(self, force=False):
+ """
+ Remove this node from the swarm.
+
+ Args:
+ force (bool): Force remove an active node. Default: `False`
+
+ Returns:
+ `True` if the request was successful.
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ If the node doesn't exist in the swarm.
+
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.remove_node(self.id, force=force)
+
+
+class NodeCollection(Collection):
+ """Nodes on the Docker server."""
+ model = Node
+
+ def get(self, node_id):
+ """
+ Get a node.
+
+ Args:
+ node_id (string): ID of the node to be inspected.
+
+ Returns:
+ A :py:class:`Node` object.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.prepare_model(self.client.api.inspect_node(node_id))
+
+ def list(self, *args, **kwargs):
+ """
+ List swarm nodes.
+
+ Args:
+ filters (dict): Filters to process on the nodes list. Valid
+ filters: ``id``, ``name``, ``membership`` and ``role``.
+ Default: ``None``
+
+ Returns:
+ A list of :py:class:`Node` objects.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> client.nodes.list(filters={'role': 'manager'})
+ """
+ return [
+ self.prepare_model(n)
+ for n in self.client.api.nodes(*args, **kwargs)
+ ]
diff --git a/contrib/python/docker/docker/models/plugins.py b/contrib/python/docker/docker/models/plugins.py
new file mode 100644
index 00000000000..85d768c9354
--- /dev/null
+++ b/contrib/python/docker/docker/models/plugins.py
@@ -0,0 +1,206 @@
+from .. import errors
+from .resource import Collection, Model
+
+
+class Plugin(Model):
+ """
+ A plugin on the server.
+ """
+ def __repr__(self):
+ return f"<{self.__class__.__name__}: '{self.name}'>"
+
+ @property
+ def name(self):
+ """
+ The plugin's name.
+ """
+ return self.attrs.get('Name')
+
+ @property
+ def enabled(self):
+ """
+ Whether the plugin is enabled.
+ """
+ return self.attrs.get('Enabled')
+
+ @property
+ def settings(self):
+ """
+ A dictionary representing the plugin's configuration.
+ """
+ return self.attrs.get('Settings')
+
+ def configure(self, options):
+ """
+ Update the plugin's settings.
+
+ Args:
+ options (dict): A key-value mapping of options.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ self.client.api.configure_plugin(self.name, options)
+ self.reload()
+
+ def disable(self, force=False):
+ """
+ Disable the plugin.
+
+ Args:
+ force (bool): Force disable. Default: False
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+
+ self.client.api.disable_plugin(self.name, force)
+ self.reload()
+
+ def enable(self, timeout=0):
+ """
+ Enable the plugin.
+
+ Args:
+ timeout (int): Timeout in seconds. Default: 0
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ self.client.api.enable_plugin(self.name, timeout)
+ self.reload()
+
+ def push(self):
+ """
+ Push the plugin to a remote registry.
+
+ Returns:
+ A dict iterator streaming the status of the upload.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.push_plugin(self.name)
+
+ def remove(self, force=False):
+ """
+ Remove the plugin from the server.
+
+ Args:
+ force (bool): Remove even if the plugin is enabled.
+ Default: False
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.remove_plugin(self.name, force=force)
+
+ def upgrade(self, remote=None):
+ """
+ Upgrade the plugin.
+
+ Args:
+ remote (string): Remote reference to upgrade to. The
+ ``:latest`` tag is optional and is the default if omitted.
+ Default: this plugin's name.
+
+ Returns:
+ A generator streaming the decoded API logs
+ """
+ if self.enabled:
+ raise errors.DockerError(
+ 'Plugin must be disabled before upgrading.'
+ )
+
+ if remote is None:
+ remote = self.name
+ privileges = self.client.api.plugin_privileges(remote)
+ yield from self.client.api.upgrade_plugin(
+ self.name,
+ remote,
+ privileges,
+ )
+ self.reload()
+
+
+class PluginCollection(Collection):
+ model = Plugin
+
+ def create(self, name, plugin_data_dir, gzip=False):
+ """
+ Create a new plugin.
+
+ Args:
+ name (string): The name of the plugin. The ``:latest`` tag is
+ optional, and is the default if omitted.
+ plugin_data_dir (string): Path to the plugin data directory.
+ Plugin data directory must contain the ``config.json``
+ manifest file and the ``rootfs`` directory.
+ gzip (bool): Compress the context using gzip. Default: False
+
+ Returns:
+ (:py:class:`Plugin`): The newly created plugin.
+ """
+ self.client.api.create_plugin(name, plugin_data_dir, gzip)
+ return self.get(name)
+
+ def get(self, name):
+ """
+ Gets a plugin.
+
+ Args:
+ name (str): The name of the plugin.
+
+ Returns:
+ (:py:class:`Plugin`): The plugin.
+
+ Raises:
+ :py:class:`docker.errors.NotFound` If the plugin does not
+ exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.prepare_model(self.client.api.inspect_plugin(name))
+
+ def install(self, remote_name, local_name=None):
+ """
+ Pull and install a plugin.
+
+ Args:
+ remote_name (string): Remote reference for the plugin to
+ install. The ``:latest`` tag is optional, and is the
+ default if omitted.
+ local_name (string): Local name for the pulled plugin.
+ The ``:latest`` tag is optional, and is the default if
+ omitted. Optional.
+
+ Returns:
+ (:py:class:`Plugin`): The installed plugin
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ privileges = self.client.api.plugin_privileges(remote_name)
+ it = self.client.api.pull_plugin(remote_name, privileges, local_name)
+ for _data in it:
+ pass
+ return self.get(local_name or remote_name)
+
+ def list(self):
+ """
+ List plugins installed on the server.
+
+ Returns:
+ (list of :py:class:`Plugin`): The plugins.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ resp = self.client.api.plugins()
+ return [self.prepare_model(r) for r in resp]
diff --git a/contrib/python/docker/docker/models/resource.py b/contrib/python/docker/docker/models/resource.py
new file mode 100644
index 00000000000..d3a35e84be9
--- /dev/null
+++ b/contrib/python/docker/docker/models/resource.py
@@ -0,0 +1,92 @@
+class Model:
+ """
+ A base class for representing a single object on the server.
+ """
+ id_attribute = 'Id'
+
+ def __init__(self, attrs=None, client=None, collection=None):
+ #: A client pointing at the server that this object is on.
+ self.client = client
+
+ #: The collection that this model is part of.
+ self.collection = collection
+
+ #: The raw representation of this object from the API
+ self.attrs = attrs
+ if self.attrs is None:
+ self.attrs = {}
+
+ def __repr__(self):
+ return f"<{self.__class__.__name__}: {self.short_id}>"
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.id == other.id
+
+ def __hash__(self):
+ return hash(f"{self.__class__.__name__}:{self.id}")
+
+ @property
+ def id(self):
+ """
+ The ID of the object.
+ """
+ return self.attrs.get(self.id_attribute)
+
+ @property
+ def short_id(self):
+ """
+ The ID of the object, truncated to 12 characters.
+ """
+ return self.id[:12]
+
+ def reload(self):
+ """
+ Load this object from the server again and update ``attrs`` with the
+ new data.
+ """
+ new_model = self.collection.get(self.id)
+ self.attrs = new_model.attrs
+
+
+class Collection:
+ """
+ A base class for representing all objects of a particular type on the
+ server.
+ """
+
+ #: The type of object this collection represents, set by subclasses
+ model = None
+
+ def __init__(self, client=None):
+ #: The client pointing at the server that this collection of objects
+ #: is on.
+ self.client = client
+
+ def __call__(self, *args, **kwargs):
+ raise TypeError(
+ f"'{self.__class__.__name__}' object is not callable. "
+ "You might be trying to use the old (pre-2.0) API - "
+ "use docker.APIClient if so."
+ )
+
+ def list(self):
+ raise NotImplementedError
+
+ def get(self, key):
+ raise NotImplementedError
+
+ def create(self, attrs=None):
+ raise NotImplementedError
+
+ def prepare_model(self, attrs):
+ """
+ Create a model from a set of attributes.
+ """
+ if isinstance(attrs, Model):
+ attrs.client = self.client
+ attrs.collection = self
+ return attrs
+ elif isinstance(attrs, dict):
+ return self.model(attrs=attrs, client=self.client, collection=self)
+ else:
+ raise Exception(f"Can't create {self.model.__name__} from {attrs}")
diff --git a/contrib/python/docker/docker/models/secrets.py b/contrib/python/docker/docker/models/secrets.py
new file mode 100644
index 00000000000..38c48dc7ebe
--- /dev/null
+++ b/contrib/python/docker/docker/models/secrets.py
@@ -0,0 +1,70 @@
+from ..api import APIClient
+from .resource import Collection, Model
+
+
+class Secret(Model):
+ """A secret."""
+ id_attribute = 'ID'
+
+ def __repr__(self):
+ return f"<{self.__class__.__name__}: '{self.name}'>"
+
+ @property
+ def name(self):
+ return self.attrs['Spec']['Name']
+
+ def remove(self):
+ """
+ Remove this secret.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If secret failed to remove.
+ """
+ return self.client.api.remove_secret(self.id)
+
+
+class SecretCollection(Collection):
+ """Secrets on the Docker server."""
+ model = Secret
+
+ def create(self, **kwargs):
+ obj = self.client.api.create_secret(**kwargs)
+ obj.setdefault("Spec", {})["Name"] = kwargs.get("name")
+ return self.prepare_model(obj)
+ create.__doc__ = APIClient.create_secret.__doc__
+
+ def get(self, secret_id):
+ """
+ Get a secret.
+
+ Args:
+ secret_id (str): Secret ID.
+
+ Returns:
+ (:py:class:`Secret`): The secret.
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ If the secret does not exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.prepare_model(self.client.api.inspect_secret(secret_id))
+
+ def list(self, **kwargs):
+ """
+ List secrets. Similar to the ``docker secret ls`` command.
+
+ Args:
+ filters (dict): Server-side list filtering options.
+
+ Returns:
+ (list of :py:class:`Secret`): The secrets.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ resp = self.client.api.secrets(**kwargs)
+ return [self.prepare_model(obj) for obj in resp]
diff --git a/contrib/python/docker/docker/models/services.py b/contrib/python/docker/docker/models/services.py
new file mode 100644
index 00000000000..09502633e59
--- /dev/null
+++ b/contrib/python/docker/docker/models/services.py
@@ -0,0 +1,390 @@
+import copy
+
+from docker.errors import InvalidArgument, create_unexpected_kwargs_error
+from docker.types import ContainerSpec, Placement, ServiceMode, TaskTemplate
+
+from .resource import Collection, Model
+
+
+class Service(Model):
+ """A service."""
+ id_attribute = 'ID'
+
+ @property
+ def name(self):
+ """The service's name."""
+ return self.attrs['Spec']['Name']
+
+ @property
+ def version(self):
+ """
+ The version number of the service. If this is not the same as the
+ server, the :py:meth:`update` function will not work and you will
+ need to call :py:meth:`reload` before calling it again.
+ """
+ return self.attrs.get('Version').get('Index')
+
+ def remove(self):
+ """
+ Stop and remove the service.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.client.api.remove_service(self.id)
+
+ def tasks(self, filters=None):
+ """
+ List the tasks in this service.
+
+ Args:
+ filters (dict): A map of filters to process on the tasks list.
+ Valid filters: ``id``, ``name``, ``node``,
+ ``label``, and ``desired-state``.
+
+ Returns:
+ :py:class:`list`: List of task dictionaries.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ if filters is None:
+ filters = {}
+ filters['service'] = self.id
+ return self.client.api.tasks(filters=filters)
+
+ def update(self, **kwargs):
+ """
+ Update a service's configuration. Similar to the ``docker service
+ update`` command.
+
+ Takes the same parameters as :py:meth:`~ServiceCollection.create`.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ # Image is required, so if it hasn't been set, use current image
+ if 'image' not in kwargs:
+ spec = self.attrs['Spec']['TaskTemplate']['ContainerSpec']
+ kwargs['image'] = spec['Image']
+
+ if kwargs.get('force_update') is True:
+ task_template = self.attrs['Spec']['TaskTemplate']
+ current_value = int(task_template.get('ForceUpdate', 0))
+ kwargs['force_update'] = current_value + 1
+
+ create_kwargs = _get_create_service_kwargs('update', kwargs)
+
+ return self.client.api.update_service(
+ self.id,
+ self.version,
+ **create_kwargs
+ )
+
+ def logs(self, **kwargs):
+ """
+ Get log stream for the service.
+ Note: This method works only for services with the ``json-file``
+ or ``journald`` logging drivers.
+
+ Args:
+ details (bool): Show extra details provided to logs.
+ Default: ``False``
+ follow (bool): Keep connection open to read logs as they are
+ sent by the Engine. Default: ``False``
+ stdout (bool): Return logs from ``stdout``. Default: ``False``
+ stderr (bool): Return logs from ``stderr``. Default: ``False``
+ since (int): UNIX timestamp for the logs staring point.
+ Default: 0
+ timestamps (bool): Add timestamps to every log line.
+ tail (string or int): Number of log lines to be returned,
+ counting from the current end of the logs. Specify an
+ integer or ``'all'`` to output all log lines.
+ Default: ``all``
+
+ Returns:
+ generator: Logs for the service.
+ """
+ is_tty = self.attrs['Spec']['TaskTemplate']['ContainerSpec'].get(
+ 'TTY', False
+ )
+ return self.client.api.service_logs(self.id, is_tty=is_tty, **kwargs)
+
+ def scale(self, replicas):
+ """
+ Scale service container.
+
+ Args:
+ replicas (int): The number of containers that should be running.
+
+ Returns:
+ bool: ``True`` if successful.
+ """
+
+ if 'Global' in self.attrs['Spec']['Mode'].keys():
+ raise InvalidArgument('Cannot scale a global container')
+
+ service_mode = ServiceMode('replicated', replicas)
+ return self.client.api.update_service(self.id, self.version,
+ mode=service_mode,
+ fetch_current_spec=True)
+
+ def force_update(self):
+ """
+ Force update the service even if no changes require it.
+
+ Returns:
+ bool: ``True`` if successful.
+ """
+
+ return self.update(force_update=True, fetch_current_spec=True)
+
+
+class ServiceCollection(Collection):
+ """Services on the Docker server."""
+ model = Service
+
+ def create(self, image, command=None, **kwargs):
+ """
+ Create a service. Similar to the ``docker service create`` command.
+
+ Args:
+ image (str): The image name to use for the containers.
+ command (list of str or str): Command to run.
+ args (list of str): Arguments to the command.
+ constraints (list of str): :py:class:`~docker.types.Placement`
+ constraints.
+ preferences (list of tuple): :py:class:`~docker.types.Placement`
+ preferences.
+ maxreplicas (int): :py:class:`~docker.types.Placement` maxreplicas
+ or (int) representing maximum number of replicas per node.
+ platforms (list of tuple): A list of platform constraints
+ expressed as ``(arch, os)`` tuples.
+ container_labels (dict): Labels to apply to the container.
+ endpoint_spec (EndpointSpec): Properties that can be configured to
+ access and load balance a service. Default: ``None``.
+ env (list of str): Environment variables, in the form
+ ``KEY=val``.
+ hostname (string): Hostname to set on the container.
+ init (boolean): Run an init inside the container that forwards
+ signals and reaps processes
+ isolation (string): Isolation technology used by the service's
+ containers. Only used for Windows containers.
+ labels (dict): Labels to apply to the service.
+ log_driver (str): Log driver to use for containers.
+ log_driver_options (dict): Log driver options.
+ mode (ServiceMode): Scheduling mode for the service.
+ Default:``None``
+ mounts (list of str): Mounts for the containers, in the form
+ ``source:target:options``, where options is either
+ ``ro`` or ``rw``.
+ name (str): Name to give to the service.
+ networks (:py:class:`list`): List of network names or IDs or
+ :py:class:`~docker.types.NetworkAttachmentConfig` to attach the
+ service to. Default: ``None``.
+ resources (Resources): Resource limits and reservations.
+ restart_policy (RestartPolicy): Restart policy for containers.
+ secrets (list of :py:class:`~docker.types.SecretReference`): List
+ of secrets accessible to containers for this service.
+ stop_grace_period (int): Amount of time to wait for
+ containers to terminate before forcefully killing them.
+ update_config (UpdateConfig): Specification for the update strategy
+ of the service. Default: ``None``
+ rollback_config (RollbackConfig): Specification for the rollback
+ strategy of the service. Default: ``None``
+ user (str): User to run commands as.
+ workdir (str): Working directory for commands to run.
+ tty (boolean): Whether a pseudo-TTY should be allocated.
+ groups (:py:class:`list`): A list of additional groups that the
+ container process will run as.
+ open_stdin (boolean): Open ``stdin``
+ read_only (boolean): Mount the container's root filesystem as read
+ only.
+ stop_signal (string): Set signal to stop the service's containers
+ healthcheck (Healthcheck): Healthcheck
+ configuration for this service.
+ hosts (:py:class:`dict`): A set of host to IP mappings to add to
+ the container's `hosts` file.
+ dns_config (DNSConfig): Specification for DNS
+ related configurations in resolver configuration file.
+ configs (:py:class:`list`): List of
+ :py:class:`~docker.types.ConfigReference` that will be exposed
+ to the service.
+ privileges (Privileges): Security options for the service's
+ containers.
+ cap_add (:py:class:`list`): A list of kernel capabilities to add to
+ the default set for the container.
+ cap_drop (:py:class:`list`): A list of kernel capabilities to drop
+ from the default set for the container.
+ sysctls (:py:class:`dict`): A dict of sysctl values to add to the
+ container
+
+ Returns:
+ :py:class:`Service`: The created service.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ kwargs['image'] = image
+ kwargs['command'] = command
+ create_kwargs = _get_create_service_kwargs('create', kwargs)
+ service_id = self.client.api.create_service(**create_kwargs)
+ return self.get(service_id)
+
+ def get(self, service_id, insert_defaults=None):
+ """
+ Get a service.
+
+ Args:
+ service_id (str): The ID of the service.
+ insert_defaults (boolean): If true, default values will be merged
+ into the output.
+
+ Returns:
+ :py:class:`Service`: The service.
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ If the service does not exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ :py:class:`docker.errors.InvalidVersion`
+ If one of the arguments is not supported with the current
+ API version.
+ """
+ return self.prepare_model(
+ self.client.api.inspect_service(service_id, insert_defaults)
+ )
+
+ def list(self, **kwargs):
+ """
+ List services.
+
+ Args:
+ filters (dict): Filters to process on the nodes list. Valid
+ filters: ``id``, ``name`` , ``label`` and ``mode``.
+ Default: ``None``.
+ status (bool): Include the service task count of running and
+ desired tasks. Default: ``None``.
+
+ Returns:
+ list of :py:class:`Service`: The services.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return [
+ self.prepare_model(s)
+ for s in self.client.api.services(**kwargs)
+ ]
+
+
+# kwargs to copy straight over to ContainerSpec
+CONTAINER_SPEC_KWARGS = [
+ 'args',
+ 'cap_add',
+ 'cap_drop',
+ 'command',
+ 'configs',
+ 'dns_config',
+ 'env',
+ 'groups',
+ 'healthcheck',
+ 'hostname',
+ 'hosts',
+ 'image',
+ 'init',
+ 'isolation',
+ 'labels',
+ 'mounts',
+ 'open_stdin',
+ 'privileges',
+ 'read_only',
+ 'secrets',
+ 'stop_grace_period',
+ 'stop_signal',
+ 'tty',
+ 'user',
+ 'workdir',
+ 'sysctls',
+]
+
+# kwargs to copy straight over to TaskTemplate
+TASK_TEMPLATE_KWARGS = [
+ 'networks',
+ 'resources',
+ 'restart_policy',
+]
+
+# kwargs to copy straight over to create_service
+CREATE_SERVICE_KWARGS = [
+ 'name',
+ 'labels',
+ 'mode',
+ 'update_config',
+ 'rollback_config',
+ 'endpoint_spec',
+]
+
+PLACEMENT_KWARGS = [
+ 'constraints',
+ 'preferences',
+ 'platforms',
+ 'maxreplicas',
+]
+
+
+def _get_create_service_kwargs(func_name, kwargs):
+ # Copy over things which can be copied directly
+ create_kwargs = {}
+ for key in copy.copy(kwargs):
+ if key in CREATE_SERVICE_KWARGS:
+ create_kwargs[key] = kwargs.pop(key)
+ container_spec_kwargs = {}
+ for key in copy.copy(kwargs):
+ if key in CONTAINER_SPEC_KWARGS:
+ container_spec_kwargs[key] = kwargs.pop(key)
+ task_template_kwargs = {}
+ for key in copy.copy(kwargs):
+ if key in TASK_TEMPLATE_KWARGS:
+ task_template_kwargs[key] = kwargs.pop(key)
+
+ if 'container_labels' in kwargs:
+ container_spec_kwargs['labels'] = kwargs.pop('container_labels')
+
+ placement = {}
+ for key in copy.copy(kwargs):
+ if key in PLACEMENT_KWARGS:
+ placement[key] = kwargs.pop(key)
+ placement = Placement(**placement)
+ task_template_kwargs['placement'] = placement
+
+ if 'log_driver' in kwargs:
+ task_template_kwargs['log_driver'] = {
+ 'Name': kwargs.pop('log_driver'),
+ 'Options': kwargs.pop('log_driver_options', {})
+ }
+
+ if func_name == 'update':
+ if 'force_update' in kwargs:
+ task_template_kwargs['force_update'] = kwargs.pop('force_update')
+
+ # fetch the current spec by default if updating the service
+ # through the model
+ fetch_current_spec = kwargs.pop('fetch_current_spec', True)
+ create_kwargs['fetch_current_spec'] = fetch_current_spec
+
+ # All kwargs should have been consumed by this point, so raise
+ # error if any are left
+ if kwargs:
+ raise create_unexpected_kwargs_error(func_name, kwargs)
+
+ container_spec = ContainerSpec(**container_spec_kwargs)
+ task_template_kwargs['container_spec'] = container_spec
+ create_kwargs['task_template'] = TaskTemplate(**task_template_kwargs)
+ return create_kwargs
diff --git a/contrib/python/docker/docker/models/swarm.py b/contrib/python/docker/docker/models/swarm.py
new file mode 100644
index 00000000000..271cc5dcb1e
--- /dev/null
+++ b/contrib/python/docker/docker/models/swarm.py
@@ -0,0 +1,190 @@
+from docker.api import APIClient
+from docker.errors import APIError
+
+from .resource import Model
+
+
+class Swarm(Model):
+ """
+ The server's Swarm state. This a singleton that must be reloaded to get
+ the current state of the Swarm.
+ """
+ id_attribute = 'ID'
+
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+ if self.client:
+ try:
+ self.reload()
+ except APIError as e:
+ # FIXME: https://github.com/docker/docker/issues/29192
+ if e.response.status_code not in (406, 503):
+ raise
+
+ @property
+ def version(self):
+ """
+ The version number of the swarm. If this is not the same as the
+ server, the :py:meth:`update` function will not work and you will
+ need to call :py:meth:`reload` before calling it again.
+ """
+ return self.attrs.get('Version').get('Index')
+
+ def get_unlock_key(self):
+ return self.client.api.get_unlock_key()
+ get_unlock_key.__doc__ = APIClient.get_unlock_key.__doc__
+
+ def init(self, advertise_addr=None, listen_addr='0.0.0.0:2377',
+ force_new_cluster=False, default_addr_pool=None,
+ subnet_size=None, data_path_addr=None, data_path_port=None,
+ **kwargs):
+ """
+ Initialize a new swarm on this Engine.
+
+ Args:
+ advertise_addr (str): Externally reachable address advertised to
+ other nodes. This can either be an address/port combination in
+ the form ``192.168.1.1:4567``, or an interface followed by a
+ port number, like ``eth0:4567``. If the port number is omitted,
+ the port number from the listen address is used.
+
+ If not specified, it will be automatically detected when
+ possible.
+ listen_addr (str): Listen address used for inter-manager
+ communication, as well as determining the networking interface
+ used for the VXLAN Tunnel Endpoint (VTEP). This can either be
+ an address/port combination in the form ``192.168.1.1:4567``,
+ or an interface followed by a port number, like ``eth0:4567``.
+ If the port number is omitted, the default swarm listening port
+ is used. Default: ``0.0.0.0:2377``
+ force_new_cluster (bool): Force creating a new Swarm, even if
+ already part of one. Default: False
+ default_addr_pool (list of str): Default Address Pool specifies
+ default subnet pools for global scope networks. Each pool
+ should be specified as a CIDR block, like '10.0.0.0/8'.
+ Default: None
+ subnet_size (int): SubnetSize specifies the subnet size of the
+ networks created from the default subnet pool. Default: None
+ data_path_addr (string): Address or interface to use for data path
+ traffic. For example, 192.168.1.1, or an interface, like eth0.
+ data_path_port (int): Port number to use for data path traffic.
+ Acceptable port range is 1024 to 49151. If set to ``None`` or
+ 0, the default port 4789 will be used. Default: None
+ task_history_retention_limit (int): Maximum number of tasks
+ history stored.
+ snapshot_interval (int): Number of logs entries between snapshot.
+ keep_old_snapshots (int): Number of snapshots to keep beyond the
+ current snapshot.
+ log_entries_for_slow_followers (int): Number of log entries to
+ keep around to sync up slow followers after a snapshot is
+ created.
+ heartbeat_tick (int): Amount of ticks (in seconds) between each
+ heartbeat.
+ election_tick (int): Amount of ticks (in seconds) needed without a
+ leader to trigger a new election.
+ dispatcher_heartbeat_period (int): The delay for an agent to send
+ a heartbeat to the dispatcher.
+ node_cert_expiry (int): Automatic expiry for nodes certificates.
+ external_ca (dict): Configuration for forwarding signing requests
+ to an external certificate authority. Use
+ ``docker.types.SwarmExternalCA``.
+ name (string): Swarm's name
+ labels (dict): User-defined key/value metadata.
+ signing_ca_cert (str): The desired signing CA certificate for all
+ swarm node TLS leaf certificates, in PEM format.
+ signing_ca_key (str): The desired signing CA key for all swarm
+ node TLS leaf certificates, in PEM format.
+ ca_force_rotate (int): An integer whose purpose is to force swarm
+ to generate a new signing CA certificate and key, if none have
+ been specified.
+ autolock_managers (boolean): If set, generate a key and use it to
+ lock data stored on the managers.
+ log_driver (DriverConfig): The default log driver to use for tasks
+ created in the orchestrator.
+
+ Returns:
+ (str): The ID of the created node.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> client.swarm.init(
+ advertise_addr='eth0', listen_addr='0.0.0.0:5000',
+ force_new_cluster=False, default_addr_pool=['10.20.0.0/16],
+ subnet_size=24, snapshot_interval=5000,
+ log_entries_for_slow_followers=1200
+ )
+
+ """
+ init_kwargs = {
+ 'advertise_addr': advertise_addr,
+ 'listen_addr': listen_addr,
+ 'force_new_cluster': force_new_cluster,
+ 'default_addr_pool': default_addr_pool,
+ 'subnet_size': subnet_size,
+ 'data_path_addr': data_path_addr,
+ 'data_path_port': data_path_port,
+ }
+ init_kwargs['swarm_spec'] = self.client.api.create_swarm_spec(**kwargs)
+ node_id = self.client.api.init_swarm(**init_kwargs)
+ self.reload()
+ return node_id
+
+ def join(self, *args, **kwargs):
+ return self.client.api.join_swarm(*args, **kwargs)
+ join.__doc__ = APIClient.join_swarm.__doc__
+
+ def leave(self, *args, **kwargs):
+ return self.client.api.leave_swarm(*args, **kwargs)
+ leave.__doc__ = APIClient.leave_swarm.__doc__
+
+ def reload(self):
+ """
+ Inspect the swarm on the server and store the response in
+ :py:attr:`attrs`.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ self.attrs = self.client.api.inspect_swarm()
+
+ def unlock(self, key):
+ return self.client.api.unlock_swarm(key)
+ unlock.__doc__ = APIClient.unlock_swarm.__doc__
+
+ def update(self, rotate_worker_token=False, rotate_manager_token=False,
+ rotate_manager_unlock_key=False, **kwargs):
+ """
+ Update the swarm's configuration.
+
+ It takes the same arguments as :py:meth:`init`, except
+ ``advertise_addr``, ``listen_addr``, and ``force_new_cluster``. In
+ addition, it takes these arguments:
+
+ Args:
+ rotate_worker_token (bool): Rotate the worker join token. Default:
+ ``False``.
+ rotate_manager_token (bool): Rotate the manager join token.
+ Default: ``False``.
+ rotate_manager_unlock_key (bool): Rotate the manager unlock key.
+ Default: ``False``.
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ """
+ # this seems to have to be set
+ if kwargs.get('node_cert_expiry') is None:
+ kwargs['node_cert_expiry'] = 7776000000000000
+
+ return self.client.api.update_swarm(
+ version=self.version,
+ swarm_spec=self.client.api.create_swarm_spec(**kwargs),
+ rotate_worker_token=rotate_worker_token,
+ rotate_manager_token=rotate_manager_token,
+ rotate_manager_unlock_key=rotate_manager_unlock_key
+ )
diff --git a/contrib/python/docker/docker/models/volumes.py b/contrib/python/docker/docker/models/volumes.py
new file mode 100644
index 00000000000..12c9f14b276
--- /dev/null
+++ b/contrib/python/docker/docker/models/volumes.py
@@ -0,0 +1,99 @@
+from ..api import APIClient
+from .resource import Collection, Model
+
+
+class Volume(Model):
+ """A volume."""
+ id_attribute = 'Name'
+
+ @property
+ def name(self):
+ """The name of the volume."""
+ return self.attrs['Name']
+
+ def remove(self, force=False):
+ """
+ Remove this volume.
+
+ Args:
+ force (bool): Force removal of volumes that were already removed
+ out of band by the volume driver plugin.
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If volume failed to remove.
+ """
+ return self.client.api.remove_volume(self.id, force=force)
+
+
+class VolumeCollection(Collection):
+ """Volumes on the Docker server."""
+ model = Volume
+
+ def create(self, name=None, **kwargs):
+ """
+ Create a volume.
+
+ Args:
+ name (str): Name of the volume. If not specified, the engine
+ generates a name.
+ driver (str): Name of the driver used to create the volume
+ driver_opts (dict): Driver options as a key-value dictionary
+ labels (dict): Labels to set on the volume
+
+ Returns:
+ (:py:class:`Volume`): The volume created.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+
+ Example:
+
+ >>> volume = client.volumes.create(name='foobar', driver='local',
+ driver_opts={'foo': 'bar', 'baz': 'false'},
+ labels={"key": "value"})
+
+ """
+ obj = self.client.api.create_volume(name, **kwargs)
+ return self.prepare_model(obj)
+
+ def get(self, volume_id):
+ """
+ Get a volume.
+
+ Args:
+ volume_id (str): Volume name.
+
+ Returns:
+ (:py:class:`Volume`): The volume.
+
+ Raises:
+ :py:class:`docker.errors.NotFound`
+ If the volume does not exist.
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ return self.prepare_model(self.client.api.inspect_volume(volume_id))
+
+ def list(self, **kwargs):
+ """
+ List volumes. Similar to the ``docker volume ls`` command.
+
+ Args:
+ filters (dict): Server-side list filtering options.
+
+ Returns:
+ (list of :py:class:`Volume`): The volumes.
+
+ Raises:
+ :py:class:`docker.errors.APIError`
+ If the server returns an error.
+ """
+ resp = self.client.api.volumes(**kwargs)
+ if not resp.get('Volumes'):
+ return []
+ return [self.prepare_model(obj) for obj in resp['Volumes']]
+
+ def prune(self, filters=None):
+ return self.client.api.prune_volumes(filters=filters)
+ prune.__doc__ = APIClient.prune_volumes.__doc__
diff --git a/contrib/python/docker/docker/tls.py b/contrib/python/docker/docker/tls.py
new file mode 100644
index 00000000000..ad4966c903e
--- /dev/null
+++ b/contrib/python/docker/docker/tls.py
@@ -0,0 +1,67 @@
+import os
+
+from . import errors
+
+
+class TLSConfig:
+ """
+ TLS configuration.
+
+ Args:
+ client_cert (tuple of str): Path to client cert, path to client key.
+ ca_cert (str): Path to CA cert file.
+ verify (bool or str): This can be a bool or a path to a CA cert
+ file to verify against. If ``True``, verify using ca_cert;
+ if ``False`` or not specified, do not verify.
+ """
+ cert = None
+ ca_cert = None
+ verify = None
+
+ def __init__(self, client_cert=None, ca_cert=None, verify=None):
+ # Argument compatibility/mapping with
+ # https://docs.docker.com/engine/articles/https/
+ # This diverges from the Docker CLI in that users can specify 'tls'
+ # here, but also disable any public/default CA pool verification by
+ # leaving verify=False
+
+ # "client_cert" must have both or neither cert/key files. In
+ # either case, Alert the user when both are expected, but any are
+ # missing.
+
+ if client_cert:
+ try:
+ tls_cert, tls_key = client_cert
+ except ValueError:
+ raise errors.TLSParameterError(
+ 'client_cert must be a tuple of'
+ ' (client certificate, key file)'
+ ) from None
+
+ if not (tls_cert and tls_key) or (not os.path.isfile(tls_cert) or
+ not os.path.isfile(tls_key)):
+ raise errors.TLSParameterError(
+ 'Path to a certificate and key files must be provided'
+ ' through the client_cert param'
+ )
+ self.cert = (tls_cert, tls_key)
+
+ # If verify is set, make sure the cert exists
+ self.verify = verify
+ self.ca_cert = ca_cert
+ if self.verify and self.ca_cert and not os.path.isfile(self.ca_cert):
+ raise errors.TLSParameterError(
+ 'Invalid CA certificate provided for `ca_cert`.'
+ )
+
+ def configure_client(self, client):
+ """
+ Configure a client with these TLS options.
+ """
+ if self.verify and self.ca_cert:
+ client.verify = self.ca_cert
+ else:
+ client.verify = self.verify
+
+ if self.cert:
+ client.cert = self.cert
diff --git a/contrib/python/docker/docker/transport/__init__.py b/contrib/python/docker/docker/transport/__init__.py
new file mode 100644
index 00000000000..8c68b1f6e2f
--- /dev/null
+++ b/contrib/python/docker/docker/transport/__init__.py
@@ -0,0 +1,12 @@
+from .unixconn import UnixHTTPAdapter
+
+try:
+ from .npipeconn import NpipeHTTPAdapter
+ from .npipesocket import NpipeSocket
+except ImportError:
+ pass
+
+try:
+ from .sshconn import SSHHTTPAdapter
+except ImportError:
+ pass
diff --git a/contrib/python/docker/docker/transport/basehttpadapter.py b/contrib/python/docker/docker/transport/basehttpadapter.py
new file mode 100644
index 00000000000..2301b6b07a6
--- /dev/null
+++ b/contrib/python/docker/docker/transport/basehttpadapter.py
@@ -0,0 +1,13 @@
+import requests.adapters
+
+
+class BaseHTTPAdapter(requests.adapters.HTTPAdapter):
+ def close(self):
+ super().close()
+ if hasattr(self, 'pools'):
+ self.pools.clear()
+
+ # Fix for requests 2.32.2+:
+ # https://github.com/psf/requests/commit/c98e4d133ef29c46a9b68cd783087218a8075e05
+ def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
+ return self.get_connection(request.url, proxies)
diff --git a/contrib/python/docker/docker/transport/npipeconn.py b/contrib/python/docker/docker/transport/npipeconn.py
new file mode 100644
index 00000000000..44d6921c2cd
--- /dev/null
+++ b/contrib/python/docker/docker/transport/npipeconn.py
@@ -0,0 +1,102 @@
+import queue
+
+import requests.adapters
+import urllib3
+import urllib3.connection
+
+from .. import constants
+from .basehttpadapter import BaseHTTPAdapter
+from .npipesocket import NpipeSocket
+
+RecentlyUsedContainer = urllib3._collections.RecentlyUsedContainer
+
+
+class NpipeHTTPConnection(urllib3.connection.HTTPConnection):
+ def __init__(self, npipe_path, timeout=60):
+ super().__init__(
+ 'localhost', timeout=timeout
+ )
+ self.npipe_path = npipe_path
+ self.timeout = timeout
+
+ def connect(self):
+ sock = NpipeSocket()
+ sock.settimeout(self.timeout)
+ sock.connect(self.npipe_path)
+ self.sock = sock
+
+
+class NpipeHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
+ def __init__(self, npipe_path, timeout=60, maxsize=10):
+ super().__init__(
+ 'localhost', timeout=timeout, maxsize=maxsize
+ )
+ self.npipe_path = npipe_path
+ self.timeout = timeout
+
+ def _new_conn(self):
+ return NpipeHTTPConnection(
+ self.npipe_path, self.timeout
+ )
+
+ # When re-using connections, urllib3 tries to call select() on our
+ # NpipeSocket instance, causing a crash. To circumvent this, we override
+ # _get_conn, where that check happens.
+ def _get_conn(self, timeout):
+ conn = None
+ try:
+ conn = self.pool.get(block=self.block, timeout=timeout)
+ except AttributeError as ae: # self.pool is None
+ raise urllib3.exceptions.ClosedPoolError(self, "Pool is closed.") from ae
+
+ except queue.Empty:
+ if self.block:
+ raise urllib3.exceptions.EmptyPoolError(
+ self,
+ "Pool reached maximum size and no more "
+ "connections are allowed."
+ ) from None
+ # Oh well, we'll create a new connection then
+
+ return conn or self._new_conn()
+
+
+class NpipeHTTPAdapter(BaseHTTPAdapter):
+
+ __attrs__ = requests.adapters.HTTPAdapter.__attrs__ + ['npipe_path',
+ 'pools',
+ 'timeout',
+ 'max_pool_size']
+
+ def __init__(self, base_url, timeout=60,
+ pool_connections=constants.DEFAULT_NUM_POOLS,
+ max_pool_size=constants.DEFAULT_MAX_POOL_SIZE):
+ self.npipe_path = base_url.replace('npipe://', '')
+ self.timeout = timeout
+ self.max_pool_size = max_pool_size
+ self.pools = RecentlyUsedContainer(
+ pool_connections, dispose_func=lambda p: p.close()
+ )
+ super().__init__()
+
+ def get_connection(self, url, proxies=None):
+ with self.pools.lock:
+ pool = self.pools.get(url)
+ if pool:
+ return pool
+
+ pool = NpipeHTTPConnectionPool(
+ self.npipe_path, self.timeout,
+ maxsize=self.max_pool_size
+ )
+ self.pools[url] = pool
+
+ return pool
+
+ def request_url(self, request, proxies):
+ # The select_proxy utility in requests errors out when the provided URL
+ # doesn't have a hostname, like is the case when using a UNIX socket.
+ # Since proxies are an irrelevant notion in the case of UNIX sockets
+ # anyway, we simply return the path URL directly.
+ # See also: https://github.com/docker/docker-sdk-python/issues/811
+ return request.path_url
diff --git a/contrib/python/docker/docker/transport/npipesocket.py b/contrib/python/docker/docker/transport/npipesocket.py
new file mode 100644
index 00000000000..d91938e7667
--- /dev/null
+++ b/contrib/python/docker/docker/transport/npipesocket.py
@@ -0,0 +1,230 @@
+import functools
+import io
+import time
+
+import pywintypes
+import win32api
+import win32event
+import win32file
+import win32pipe
+
+cERROR_PIPE_BUSY = 0xe7
+cSECURITY_SQOS_PRESENT = 0x100000
+cSECURITY_ANONYMOUS = 0
+
+MAXIMUM_RETRY_COUNT = 10
+
+
+def check_closed(f):
+ @functools.wraps(f)
+ def wrapped(self, *args, **kwargs):
+ if self._closed:
+ raise RuntimeError(
+ 'Can not reuse socket after connection was closed.'
+ )
+ return f(self, *args, **kwargs)
+ return wrapped
+
+
+class NpipeSocket:
+ """ Partial implementation of the socket API over windows named pipes.
+ This implementation is only designed to be used as a client socket,
+ and server-specific methods (bind, listen, accept...) are not
+ implemented.
+ """
+
+ def __init__(self, handle=None):
+ self._timeout = win32pipe.NMPWAIT_USE_DEFAULT_WAIT
+ self._handle = handle
+ self._closed = False
+
+ def accept(self):
+ raise NotImplementedError()
+
+ def bind(self, address):
+ raise NotImplementedError()
+
+ def close(self):
+ self._handle.Close()
+ self._closed = True
+
+ @check_closed
+ def connect(self, address, retry_count=0):
+ try:
+ handle = win32file.CreateFile(
+ address,
+ win32file.GENERIC_READ | win32file.GENERIC_WRITE,
+ 0,
+ None,
+ win32file.OPEN_EXISTING,
+ (cSECURITY_ANONYMOUS
+ | cSECURITY_SQOS_PRESENT
+ | win32file.FILE_FLAG_OVERLAPPED),
+ 0
+ )
+ except win32pipe.error as e:
+ # See Remarks:
+ # https://msdn.microsoft.com/en-us/library/aa365800.aspx
+ if e.winerror == cERROR_PIPE_BUSY:
+ # Another program or thread has grabbed our pipe instance
+ # before we got to it. Wait for availability and attempt to
+ # connect again.
+ retry_count = retry_count + 1
+ if (retry_count < MAXIMUM_RETRY_COUNT):
+ time.sleep(1)
+ return self.connect(address, retry_count)
+ raise e
+
+ self.flags = win32pipe.GetNamedPipeInfo(handle)[0]
+
+ self._handle = handle
+ self._address = address
+
+ @check_closed
+ def connect_ex(self, address):
+ return self.connect(address)
+
+ @check_closed
+ def detach(self):
+ self._closed = True
+ return self._handle
+
+ @check_closed
+ def dup(self):
+ return NpipeSocket(self._handle)
+
+ def getpeername(self):
+ return self._address
+
+ def getsockname(self):
+ return self._address
+
+ def getsockopt(self, level, optname, buflen=None):
+ raise NotImplementedError()
+
+ def ioctl(self, control, option):
+ raise NotImplementedError()
+
+ def listen(self, backlog):
+ raise NotImplementedError()
+
+ def makefile(self, mode=None, bufsize=None):
+ if mode.strip('b') != 'r':
+ raise NotImplementedError()
+ rawio = NpipeFileIOBase(self)
+ if bufsize is None or bufsize <= 0:
+ bufsize = io.DEFAULT_BUFFER_SIZE
+ return io.BufferedReader(rawio, buffer_size=bufsize)
+
+ @check_closed
+ def recv(self, bufsize, flags=0):
+ err, data = win32file.ReadFile(self._handle, bufsize)
+ return data
+
+ @check_closed
+ def recvfrom(self, bufsize, flags=0):
+ data = self.recv(bufsize, flags)
+ return (data, self._address)
+
+ @check_closed
+ def recvfrom_into(self, buf, nbytes=0, flags=0):
+ return self.recv_into(buf, nbytes, flags), self._address
+
+ @check_closed
+ def recv_into(self, buf, nbytes=0):
+ readbuf = buf
+ if not isinstance(buf, memoryview):
+ readbuf = memoryview(buf)
+
+ event = win32event.CreateEvent(None, True, True, None)
+ try:
+ overlapped = pywintypes.OVERLAPPED()
+ overlapped.hEvent = event
+ err, data = win32file.ReadFile(
+ self._handle,
+ readbuf[:nbytes] if nbytes else readbuf,
+ overlapped
+ )
+ wait_result = win32event.WaitForSingleObject(event, self._timeout)
+ if wait_result == win32event.WAIT_TIMEOUT:
+ win32file.CancelIo(self._handle)
+ raise TimeoutError
+ return win32file.GetOverlappedResult(self._handle, overlapped, 0)
+ finally:
+ win32api.CloseHandle(event)
+
+ @check_closed
+ def send(self, string, flags=0):
+ event = win32event.CreateEvent(None, True, True, None)
+ try:
+ overlapped = pywintypes.OVERLAPPED()
+ overlapped.hEvent = event
+ win32file.WriteFile(self._handle, string, overlapped)
+ wait_result = win32event.WaitForSingleObject(event, self._timeout)
+ if wait_result == win32event.WAIT_TIMEOUT:
+ win32file.CancelIo(self._handle)
+ raise TimeoutError
+ return win32file.GetOverlappedResult(self._handle, overlapped, 0)
+ finally:
+ win32api.CloseHandle(event)
+
+ @check_closed
+ def sendall(self, string, flags=0):
+ return self.send(string, flags)
+
+ @check_closed
+ def sendto(self, string, address):
+ self.connect(address)
+ return self.send(string)
+
+ def setblocking(self, flag):
+ if flag:
+ return self.settimeout(None)
+ return self.settimeout(0)
+
+ def settimeout(self, value):
+ if value is None:
+ # Blocking mode
+ self._timeout = win32event.INFINITE
+ elif not isinstance(value, (float, int)) or value < 0:
+ raise ValueError('Timeout value out of range')
+ else:
+ # Timeout mode - Value converted to milliseconds
+ self._timeout = int(value * 1000)
+
+ def gettimeout(self):
+ return self._timeout
+
+ def setsockopt(self, level, optname, value):
+ raise NotImplementedError()
+
+ @check_closed
+ def shutdown(self, how):
+ return self.close()
+
+
+class NpipeFileIOBase(io.RawIOBase):
+ def __init__(self, npipe_socket):
+ self.sock = npipe_socket
+
+ def close(self):
+ super().close()
+ self.sock = None
+
+ def fileno(self):
+ return self.sock.fileno()
+
+ def isatty(self):
+ return False
+
+ def readable(self):
+ return True
+
+ def readinto(self, buf):
+ return self.sock.recv_into(buf)
+
+ def seekable(self):
+ return False
+
+ def writable(self):
+ return False
diff --git a/contrib/python/docker/docker/transport/sshconn.py b/contrib/python/docker/docker/transport/sshconn.py
new file mode 100644
index 00000000000..18706680101
--- /dev/null
+++ b/contrib/python/docker/docker/transport/sshconn.py
@@ -0,0 +1,250 @@
+import logging
+import os
+import queue
+import signal
+import socket
+import subprocess
+import urllib.parse
+
+import paramiko
+import requests.adapters
+import urllib3
+import urllib3.connection
+
+from .. import constants
+from .basehttpadapter import BaseHTTPAdapter
+
+RecentlyUsedContainer = urllib3._collections.RecentlyUsedContainer
+
+
+class SSHSocket(socket.socket):
+ def __init__(self, host):
+ super().__init__(
+ socket.AF_INET, socket.SOCK_STREAM)
+ self.host = host
+ self.port = None
+ self.user = None
+ if ':' in self.host:
+ self.host, self.port = self.host.split(':')
+ if '@' in self.host:
+ self.user, self.host = self.host.split('@')
+
+ self.proc = None
+
+ def connect(self, **kwargs):
+ args = ['ssh']
+ if self.user:
+ args = args + ['-l', self.user]
+
+ if self.port:
+ args = args + ['-p', self.port]
+
+ args = args + ['--', self.host, 'docker system dial-stdio']
+
+ preexec_func = None
+ if not constants.IS_WINDOWS_PLATFORM:
+ def f():
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
+ preexec_func = f
+
+ env = dict(os.environ)
+
+ # drop LD_LIBRARY_PATH and SSL_CERT_FILE
+ env.pop('LD_LIBRARY_PATH', None)
+ env.pop('SSL_CERT_FILE', None)
+
+ self.proc = subprocess.Popen(
+ args,
+ env=env,
+ stdout=subprocess.PIPE,
+ stdin=subprocess.PIPE,
+ preexec_fn=preexec_func)
+
+ def _write(self, data):
+ if not self.proc or self.proc.stdin.closed:
+ raise Exception('SSH subprocess not initiated.'
+ 'connect() must be called first.')
+ written = self.proc.stdin.write(data)
+ self.proc.stdin.flush()
+ return written
+
+ def sendall(self, data):
+ self._write(data)
+
+ def send(self, data):
+ return self._write(data)
+
+ def recv(self, n):
+ if not self.proc:
+ raise Exception('SSH subprocess not initiated.'
+ 'connect() must be called first.')
+ return self.proc.stdout.read(n)
+
+ def makefile(self, mode):
+ if not self.proc:
+ self.connect()
+ self.proc.stdout.channel = self
+
+ return self.proc.stdout
+
+ def close(self):
+ if not self.proc or self.proc.stdin.closed:
+ return
+ self.proc.stdin.write(b'\n\n')
+ self.proc.stdin.flush()
+ self.proc.terminate()
+
+
+class SSHConnection(urllib3.connection.HTTPConnection):
+ def __init__(self, ssh_transport=None, timeout=60, host=None):
+ super().__init__(
+ 'localhost', timeout=timeout
+ )
+ self.ssh_transport = ssh_transport
+ self.timeout = timeout
+ self.ssh_host = host
+
+ def connect(self):
+ if self.ssh_transport:
+ sock = self.ssh_transport.open_session()
+ sock.settimeout(self.timeout)
+ sock.exec_command('docker system dial-stdio')
+ else:
+ sock = SSHSocket(self.ssh_host)
+ sock.settimeout(self.timeout)
+ sock.connect()
+
+ self.sock = sock
+
+
+class SSHConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
+ scheme = 'ssh'
+
+ def __init__(self, ssh_client=None, timeout=60, maxsize=10, host=None):
+ super().__init__(
+ 'localhost', timeout=timeout, maxsize=maxsize
+ )
+ self.ssh_transport = None
+ self.timeout = timeout
+ if ssh_client:
+ self.ssh_transport = ssh_client.get_transport()
+ self.ssh_host = host
+
+ def _new_conn(self):
+ return SSHConnection(self.ssh_transport, self.timeout, self.ssh_host)
+
+ # When re-using connections, urllib3 calls fileno() on our
+ # SSH channel instance, quickly overloading our fd limit. To avoid this,
+ # we override _get_conn
+ def _get_conn(self, timeout):
+ conn = None
+ try:
+ conn = self.pool.get(block=self.block, timeout=timeout)
+
+ except AttributeError as ae: # self.pool is None
+ raise urllib3.exceptions.ClosedPoolError(self, "Pool is closed.") from ae
+
+ except queue.Empty:
+ if self.block:
+ raise urllib3.exceptions.EmptyPoolError(
+ self,
+ "Pool reached maximum size and no more "
+ "connections are allowed."
+ ) from None
+ # Oh well, we'll create a new connection then
+
+ return conn or self._new_conn()
+
+
+class SSHHTTPAdapter(BaseHTTPAdapter):
+
+ __attrs__ = requests.adapters.HTTPAdapter.__attrs__ + [
+ 'pools', 'timeout', 'ssh_client', 'ssh_params', 'max_pool_size'
+ ]
+
+ def __init__(self, base_url, timeout=60,
+ pool_connections=constants.DEFAULT_NUM_POOLS,
+ max_pool_size=constants.DEFAULT_MAX_POOL_SIZE,
+ shell_out=False):
+ self.ssh_client = None
+ if not shell_out:
+ self._create_paramiko_client(base_url)
+ self._connect()
+
+ self.ssh_host = base_url
+ if base_url.startswith('ssh://'):
+ self.ssh_host = base_url[len('ssh://'):]
+
+ self.timeout = timeout
+ self.max_pool_size = max_pool_size
+ self.pools = RecentlyUsedContainer(
+ pool_connections, dispose_func=lambda p: p.close()
+ )
+ super().__init__()
+
+ def _create_paramiko_client(self, base_url):
+ logging.getLogger("paramiko").setLevel(logging.WARNING)
+ self.ssh_client = paramiko.SSHClient()
+ base_url = urllib.parse.urlparse(base_url)
+ self.ssh_params = {
+ "hostname": base_url.hostname,
+ "port": base_url.port,
+ "username": base_url.username
+ }
+ ssh_config_file = os.path.expanduser("~/.ssh/config")
+ if os.path.exists(ssh_config_file):
+ conf = paramiko.SSHConfig()
+ with open(ssh_config_file) as f:
+ conf.parse(f)
+ host_config = conf.lookup(base_url.hostname)
+ if 'proxycommand' in host_config:
+ self.ssh_params["sock"] = paramiko.ProxyCommand(
+ host_config['proxycommand']
+ )
+ if 'hostname' in host_config:
+ self.ssh_params['hostname'] = host_config['hostname']
+ if base_url.port is None and 'port' in host_config:
+ self.ssh_params['port'] = host_config['port']
+ if base_url.username is None and 'user' in host_config:
+ self.ssh_params['username'] = host_config['user']
+ if 'identityfile' in host_config:
+ self.ssh_params['key_filename'] = host_config['identityfile']
+
+ self.ssh_client.load_system_host_keys()
+ self.ssh_client.set_missing_host_key_policy(paramiko.RejectPolicy())
+
+ def _connect(self):
+ if self.ssh_client:
+ self.ssh_client.connect(**self.ssh_params)
+
+ def get_connection(self, url, proxies=None):
+ if not self.ssh_client:
+ return SSHConnectionPool(
+ ssh_client=self.ssh_client,
+ timeout=self.timeout,
+ maxsize=self.max_pool_size,
+ host=self.ssh_host
+ )
+ with self.pools.lock:
+ pool = self.pools.get(url)
+ if pool:
+ return pool
+
+ # Connection is closed try a reconnect
+ if self.ssh_client and not self.ssh_client.get_transport():
+ self._connect()
+
+ pool = SSHConnectionPool(
+ ssh_client=self.ssh_client,
+ timeout=self.timeout,
+ maxsize=self.max_pool_size,
+ host=self.ssh_host
+ )
+ self.pools[url] = pool
+
+ return pool
+
+ def close(self):
+ super().close()
+ if self.ssh_client:
+ self.ssh_client.close()
diff --git a/contrib/python/docker/docker/transport/unixconn.py b/contrib/python/docker/docker/transport/unixconn.py
new file mode 100644
index 00000000000..d571833f044
--- /dev/null
+++ b/contrib/python/docker/docker/transport/unixconn.py
@@ -0,0 +1,86 @@
+import socket
+
+import requests.adapters
+import urllib3
+import urllib3.connection
+
+from .. import constants
+from .basehttpadapter import BaseHTTPAdapter
+
+RecentlyUsedContainer = urllib3._collections.RecentlyUsedContainer
+
+
+class UnixHTTPConnection(urllib3.connection.HTTPConnection):
+
+ def __init__(self, base_url, unix_socket, timeout=60):
+ super().__init__(
+ 'localhost', timeout=timeout
+ )
+ self.base_url = base_url
+ self.unix_socket = unix_socket
+ self.timeout = timeout
+
+ def connect(self):
+ sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ sock.settimeout(self.timeout)
+ sock.connect(self.unix_socket)
+ self.sock = sock
+
+
+class UnixHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool):
+ def __init__(self, base_url, socket_path, timeout=60, maxsize=10):
+ super().__init__(
+ 'localhost', timeout=timeout, maxsize=maxsize
+ )
+ self.base_url = base_url
+ self.socket_path = socket_path
+ self.timeout = timeout
+
+ def _new_conn(self):
+ return UnixHTTPConnection(
+ self.base_url, self.socket_path, self.timeout
+ )
+
+
+class UnixHTTPAdapter(BaseHTTPAdapter):
+
+ __attrs__ = requests.adapters.HTTPAdapter.__attrs__ + ['pools',
+ 'socket_path',
+ 'timeout',
+ 'max_pool_size']
+
+ def __init__(self, socket_url, timeout=60,
+ pool_connections=constants.DEFAULT_NUM_POOLS,
+ max_pool_size=constants.DEFAULT_MAX_POOL_SIZE):
+ socket_path = socket_url.replace('http+unix://', '')
+ if not socket_path.startswith('/'):
+ socket_path = f"/{socket_path}"
+ self.socket_path = socket_path
+ self.timeout = timeout
+ self.max_pool_size = max_pool_size
+ self.pools = RecentlyUsedContainer(
+ pool_connections, dispose_func=lambda p: p.close()
+ )
+ super().__init__()
+
+ def get_connection(self, url, proxies=None):
+ with self.pools.lock:
+ pool = self.pools.get(url)
+ if pool:
+ return pool
+
+ pool = UnixHTTPConnectionPool(
+ url, self.socket_path, self.timeout,
+ maxsize=self.max_pool_size
+ )
+ self.pools[url] = pool
+
+ return pool
+
+ def request_url(self, request, proxies):
+ # The select_proxy utility in requests errors out when the provided URL
+ # doesn't have a hostname, like is the case when using a UNIX socket.
+ # Since proxies are an irrelevant notion in the case of UNIX sockets
+ # anyway, we simply return the path URL directly.
+ # See also: https://github.com/docker/docker-py/issues/811
+ return request.path_url
diff --git a/contrib/python/docker/docker/types/__init__.py b/contrib/python/docker/docker/types/__init__.py
new file mode 100644
index 00000000000..fbe247210b5
--- /dev/null
+++ b/contrib/python/docker/docker/types/__init__.py
@@ -0,0 +1,24 @@
+from .containers import ContainerConfig, DeviceRequest, HostConfig, LogConfig, Ulimit
+from .daemon import CancellableStream
+from .healthcheck import Healthcheck
+from .networks import EndpointConfig, IPAMConfig, IPAMPool, NetworkingConfig
+from .services import (
+ ConfigReference,
+ ContainerSpec,
+ DNSConfig,
+ DriverConfig,
+ EndpointSpec,
+ Mount,
+ NetworkAttachmentConfig,
+ Placement,
+ PlacementPreference,
+ Privileges,
+ Resources,
+ RestartPolicy,
+ RollbackConfig,
+ SecretReference,
+ ServiceMode,
+ TaskTemplate,
+ UpdateConfig,
+)
+from .swarm import SwarmExternalCA, SwarmSpec
diff --git a/contrib/python/docker/docker/types/base.py b/contrib/python/docker/docker/types/base.py
new file mode 100644
index 00000000000..8851f1e2cb5
--- /dev/null
+++ b/contrib/python/docker/docker/types/base.py
@@ -0,0 +1,4 @@
+class DictType(dict):
+ def __init__(self, init):
+ for k, v in init.items():
+ self[k] = v
diff --git a/contrib/python/docker/docker/types/containers.py b/contrib/python/docker/docker/types/containers.py
new file mode 100644
index 00000000000..598188a25ef
--- /dev/null
+++ b/contrib/python/docker/docker/types/containers.py
@@ -0,0 +1,790 @@
+from .. import errors
+from ..utils.utils import (
+ convert_port_bindings,
+ convert_tmpfs_mounts,
+ convert_volume_binds,
+ format_environment,
+ format_extra_hosts,
+ normalize_links,
+ parse_bytes,
+ parse_devices,
+ split_command,
+ version_gte,
+ version_lt,
+)
+from .base import DictType
+from .healthcheck import Healthcheck
+
+
+class LogConfigTypesEnum:
+ _values = (
+ 'json-file',
+ 'syslog',
+ 'journald',
+ 'gelf',
+ 'fluentd',
+ 'none'
+ )
+ JSON, SYSLOG, JOURNALD, GELF, FLUENTD, NONE = _values
+
+
+class LogConfig(DictType):
+ """
+ Configure logging for a container, when provided as an argument to
+ :py:meth:`~docker.api.container.ContainerApiMixin.create_host_config`.
+ You may refer to the
+ `official logging driver documentation <https://docs.docker.com/config/containers/logging/configure/>`_
+ for more information.
+
+ Args:
+ type (str): Indicate which log driver to use. A set of valid drivers
+ is provided as part of the :py:attr:`LogConfig.types`
+ enum. Other values may be accepted depending on the engine version
+ and available logging plugins.
+ config (dict): A driver-dependent configuration dictionary. Please
+ refer to the driver's documentation for a list of valid config
+ keys.
+
+ Example:
+
+ >>> from docker.types import LogConfig
+ >>> lc = LogConfig(type=LogConfig.types.JSON, config={
+ ... 'max-size': '1g',
+ ... 'labels': 'production_status,geo'
+ ... })
+ >>> hc = client.create_host_config(log_config=lc)
+ >>> container = client.create_container('busybox', 'true',
+ ... host_config=hc)
+ >>> client.inspect_container(container)['HostConfig']['LogConfig']
+ {
+ 'Type': 'json-file',
+ 'Config': {'labels': 'production_status,geo', 'max-size': '1g'}
+ }
+ """
+ types = LogConfigTypesEnum
+
+ def __init__(self, **kwargs):
+ log_driver_type = kwargs.get('type', kwargs.get('Type'))
+ config = kwargs.get('config', kwargs.get('Config')) or {}
+
+ if config and not isinstance(config, dict):
+ raise ValueError("LogConfig.config must be a dictionary")
+
+ super().__init__({
+ 'Type': log_driver_type,
+ 'Config': config
+ })
+
+ @property
+ def type(self):
+ return self['Type']
+
+ @type.setter
+ def type(self, value):
+ self['Type'] = value
+
+ @property
+ def config(self):
+ return self['Config']
+
+ def set_config_value(self, key, value):
+ """ Set a the value for ``key`` to ``value`` inside the ``config``
+ dict.
+ """
+ self.config[key] = value
+
+ def unset_config(self, key):
+ """ Remove the ``key`` property from the ``config`` dict. """
+ if key in self.config:
+ del self.config[key]
+
+
+class Ulimit(DictType):
+ """
+ Create a ulimit declaration to be used with
+ :py:meth:`~docker.api.container.ContainerApiMixin.create_host_config`.
+
+ Args:
+
+ name (str): Which ulimit will this apply to. The valid names can be
+ found in '/etc/security/limits.conf' on a gnu/linux system.
+ soft (int): The soft limit for this ulimit. Optional.
+ hard (int): The hard limit for this ulimit. Optional.
+
+ Example:
+
+ >>> nproc_limit = docker.types.Ulimit(name='nproc', soft=1024)
+ >>> hc = client.create_host_config(ulimits=[nproc_limit])
+ >>> container = client.create_container(
+ 'busybox', 'true', host_config=hc
+ )
+ >>> client.inspect_container(container)['HostConfig']['Ulimits']
+ [{'Name': 'nproc', 'Hard': 0, 'Soft': 1024}]
+
+ """
+ def __init__(self, **kwargs):
+ name = kwargs.get('name', kwargs.get('Name'))
+ soft = kwargs.get('soft', kwargs.get('Soft'))
+ hard = kwargs.get('hard', kwargs.get('Hard'))
+ if not isinstance(name, str):
+ raise ValueError("Ulimit.name must be a string")
+ if soft and not isinstance(soft, int):
+ raise ValueError("Ulimit.soft must be an integer")
+ if hard and not isinstance(hard, int):
+ raise ValueError("Ulimit.hard must be an integer")
+ super().__init__({
+ 'Name': name,
+ 'Soft': soft,
+ 'Hard': hard
+ })
+
+ @property
+ def name(self):
+ return self['Name']
+
+ @name.setter
+ def name(self, value):
+ self['Name'] = value
+
+ @property
+ def soft(self):
+ return self.get('Soft')
+
+ @soft.setter
+ def soft(self, value):
+ self['Soft'] = value
+
+ @property
+ def hard(self):
+ return self.get('Hard')
+
+ @hard.setter
+ def hard(self, value):
+ self['Hard'] = value
+
+
+class DeviceRequest(DictType):
+ """
+ Create a device request to be used with
+ :py:meth:`~docker.api.container.ContainerApiMixin.create_host_config`.
+
+ Args:
+
+ driver (str): Which driver to use for this device. Optional.
+ count (int): Number or devices to request. Optional.
+ Set to -1 to request all available devices.
+ device_ids (list): List of strings for device IDs. Optional.
+ Set either ``count`` or ``device_ids``.
+ capabilities (list): List of lists of strings to request
+ capabilities. Optional. The global list acts like an OR,
+ and the sub-lists are AND. The driver will try to satisfy
+ one of the sub-lists.
+ Available capabilities for the ``nvidia`` driver can be found
+ `here <https://github.com/NVIDIA/nvidia-container-runtime>`_.
+ options (dict): Driver-specific options. Optional.
+ """
+
+ def __init__(self, **kwargs):
+ driver = kwargs.get('driver', kwargs.get('Driver'))
+ count = kwargs.get('count', kwargs.get('Count'))
+ device_ids = kwargs.get('device_ids', kwargs.get('DeviceIDs'))
+ capabilities = kwargs.get('capabilities', kwargs.get('Capabilities'))
+ options = kwargs.get('options', kwargs.get('Options'))
+
+ if driver is None:
+ driver = ''
+ elif not isinstance(driver, str):
+ raise ValueError('DeviceRequest.driver must be a string')
+ if count is None:
+ count = 0
+ elif not isinstance(count, int):
+ raise ValueError('DeviceRequest.count must be an integer')
+ if device_ids is None:
+ device_ids = []
+ elif not isinstance(device_ids, list):
+ raise ValueError('DeviceRequest.device_ids must be a list')
+ if capabilities is None:
+ capabilities = []
+ elif not isinstance(capabilities, list):
+ raise ValueError('DeviceRequest.capabilities must be a list')
+ if options is None:
+ options = {}
+ elif not isinstance(options, dict):
+ raise ValueError('DeviceRequest.options must be a dict')
+
+ super().__init__({
+ 'Driver': driver,
+ 'Count': count,
+ 'DeviceIDs': device_ids,
+ 'Capabilities': capabilities,
+ 'Options': options
+ })
+
+ @property
+ def driver(self):
+ return self['Driver']
+
+ @driver.setter
+ def driver(self, value):
+ self['Driver'] = value
+
+ @property
+ def count(self):
+ return self['Count']
+
+ @count.setter
+ def count(self, value):
+ self['Count'] = value
+
+ @property
+ def device_ids(self):
+ return self['DeviceIDs']
+
+ @device_ids.setter
+ def device_ids(self, value):
+ self['DeviceIDs'] = value
+
+ @property
+ def capabilities(self):
+ return self['Capabilities']
+
+ @capabilities.setter
+ def capabilities(self, value):
+ self['Capabilities'] = value
+
+ @property
+ def options(self):
+ return self['Options']
+
+ @options.setter
+ def options(self, value):
+ self['Options'] = value
+
+
+class HostConfig(dict):
+ def __init__(self, version, binds=None, port_bindings=None,
+ lxc_conf=None, publish_all_ports=False, links=None,
+ privileged=False, dns=None, dns_search=None,
+ volumes_from=None, network_mode=None, restart_policy=None,
+ cap_add=None, cap_drop=None, devices=None, extra_hosts=None,
+ read_only=None, pid_mode=None, ipc_mode=None,
+ security_opt=None, ulimits=None, log_config=None,
+ mem_limit=None, memswap_limit=None, mem_reservation=None,
+ kernel_memory=None, mem_swappiness=None, cgroup_parent=None,
+ group_add=None, cpu_quota=None, cpu_period=None,
+ blkio_weight=None, blkio_weight_device=None,
+ device_read_bps=None, device_write_bps=None,
+ device_read_iops=None, device_write_iops=None,
+ oom_kill_disable=False, shm_size=None, sysctls=None,
+ tmpfs=None, oom_score_adj=None, dns_opt=None, cpu_shares=None,
+ cpuset_cpus=None, userns_mode=None, uts_mode=None,
+ pids_limit=None, isolation=None, auto_remove=False,
+ storage_opt=None, init=None, init_path=None,
+ volume_driver=None, cpu_count=None, cpu_percent=None,
+ nano_cpus=None, cpuset_mems=None, runtime=None, mounts=None,
+ cpu_rt_period=None, cpu_rt_runtime=None,
+ device_cgroup_rules=None, device_requests=None,
+ cgroupns=None):
+
+ if mem_limit is not None:
+ self['Memory'] = parse_bytes(mem_limit)
+
+ if memswap_limit is not None:
+ self['MemorySwap'] = parse_bytes(memswap_limit)
+
+ if mem_reservation:
+ self['MemoryReservation'] = parse_bytes(mem_reservation)
+
+ if kernel_memory:
+ self['KernelMemory'] = parse_bytes(kernel_memory)
+
+ if mem_swappiness is not None:
+ if not isinstance(mem_swappiness, int):
+ raise host_config_type_error(
+ 'mem_swappiness', mem_swappiness, 'int'
+ )
+
+ self['MemorySwappiness'] = mem_swappiness
+
+ if shm_size is not None:
+ if isinstance(shm_size, str):
+ shm_size = parse_bytes(shm_size)
+
+ self['ShmSize'] = shm_size
+
+ if pid_mode:
+ if version_lt(version, '1.24') and pid_mode != 'host':
+ raise host_config_value_error('pid_mode', pid_mode)
+ self['PidMode'] = pid_mode
+
+ if ipc_mode:
+ self['IpcMode'] = ipc_mode
+
+ if privileged:
+ self['Privileged'] = privileged
+
+ if oom_kill_disable:
+ self['OomKillDisable'] = oom_kill_disable
+
+ if oom_score_adj:
+ if version_lt(version, '1.22'):
+ raise host_config_version_error('oom_score_adj', '1.22')
+ if not isinstance(oom_score_adj, int):
+ raise host_config_type_error(
+ 'oom_score_adj', oom_score_adj, 'int'
+ )
+ self['OomScoreAdj'] = oom_score_adj
+
+ if publish_all_ports:
+ self['PublishAllPorts'] = publish_all_ports
+
+ if read_only is not None:
+ self['ReadonlyRootfs'] = read_only
+
+ if dns_search:
+ self['DnsSearch'] = dns_search
+
+ if network_mode == 'host' and port_bindings:
+ raise host_config_incompatible_error(
+ 'network_mode', 'host', 'port_bindings'
+ )
+ self['NetworkMode'] = network_mode or 'default'
+
+ if restart_policy:
+ if not isinstance(restart_policy, dict):
+ raise host_config_type_error(
+ 'restart_policy', restart_policy, 'dict'
+ )
+
+ self['RestartPolicy'] = restart_policy
+
+ if cap_add:
+ self['CapAdd'] = cap_add
+
+ if cap_drop:
+ self['CapDrop'] = cap_drop
+
+ if devices:
+ self['Devices'] = parse_devices(devices)
+
+ if group_add:
+ self['GroupAdd'] = [str(grp) for grp in group_add]
+
+ if dns is not None:
+ self['Dns'] = dns
+
+ if dns_opt is not None:
+ self['DnsOptions'] = dns_opt
+
+ if security_opt is not None:
+ if not isinstance(security_opt, list):
+ raise host_config_type_error(
+ 'security_opt', security_opt, 'list'
+ )
+
+ self['SecurityOpt'] = security_opt
+
+ if sysctls:
+ if not isinstance(sysctls, dict):
+ raise host_config_type_error('sysctls', sysctls, 'dict')
+ self['Sysctls'] = {}
+ for k, v in sysctls.items():
+ self['Sysctls'][k] = str(v)
+
+ if volumes_from is not None:
+ if isinstance(volumes_from, str):
+ volumes_from = volumes_from.split(',')
+
+ self['VolumesFrom'] = volumes_from
+
+ if binds is not None:
+ self['Binds'] = convert_volume_binds(binds)
+
+ if port_bindings is not None:
+ self['PortBindings'] = convert_port_bindings(port_bindings)
+
+ if extra_hosts is not None:
+ if isinstance(extra_hosts, dict):
+ extra_hosts = format_extra_hosts(extra_hosts)
+
+ self['ExtraHosts'] = extra_hosts
+
+ if links is not None:
+ self['Links'] = normalize_links(links)
+
+ if isinstance(lxc_conf, dict):
+ formatted = []
+ for k, v in lxc_conf.items():
+ formatted.append({'Key': k, 'Value': str(v)})
+ lxc_conf = formatted
+
+ if lxc_conf is not None:
+ self['LxcConf'] = lxc_conf
+
+ if cgroup_parent is not None:
+ self['CgroupParent'] = cgroup_parent
+
+ if ulimits is not None:
+ if not isinstance(ulimits, list):
+ raise host_config_type_error('ulimits', ulimits, 'list')
+ self['Ulimits'] = []
+ for lmt in ulimits:
+ if not isinstance(lmt, Ulimit):
+ lmt = Ulimit(**lmt)
+ self['Ulimits'].append(lmt)
+
+ if log_config is not None:
+ if not isinstance(log_config, LogConfig):
+ if not isinstance(log_config, dict):
+ raise host_config_type_error(
+ 'log_config', log_config, 'LogConfig'
+ )
+ log_config = LogConfig(**log_config)
+
+ self['LogConfig'] = log_config
+
+ if cpu_quota:
+ if not isinstance(cpu_quota, int):
+ raise host_config_type_error('cpu_quota', cpu_quota, 'int')
+ self['CpuQuota'] = cpu_quota
+
+ if cpu_period:
+ if not isinstance(cpu_period, int):
+ raise host_config_type_error('cpu_period', cpu_period, 'int')
+ self['CpuPeriod'] = cpu_period
+
+ if cpu_shares:
+ if not isinstance(cpu_shares, int):
+ raise host_config_type_error('cpu_shares', cpu_shares, 'int')
+
+ self['CpuShares'] = cpu_shares
+
+ if cpuset_cpus:
+ self['CpusetCpus'] = cpuset_cpus
+
+ if cpuset_mems:
+ if not isinstance(cpuset_mems, str):
+ raise host_config_type_error(
+ 'cpuset_mems', cpuset_mems, 'str'
+ )
+ self['CpusetMems'] = cpuset_mems
+
+ if cpu_rt_period:
+ if version_lt(version, '1.25'):
+ raise host_config_version_error('cpu_rt_period', '1.25')
+
+ if not isinstance(cpu_rt_period, int):
+ raise host_config_type_error(
+ 'cpu_rt_period', cpu_rt_period, 'int'
+ )
+ self['CPURealtimePeriod'] = cpu_rt_period
+
+ if cpu_rt_runtime:
+ if version_lt(version, '1.25'):
+ raise host_config_version_error('cpu_rt_runtime', '1.25')
+
+ if not isinstance(cpu_rt_runtime, int):
+ raise host_config_type_error(
+ 'cpu_rt_runtime', cpu_rt_runtime, 'int'
+ )
+ self['CPURealtimeRuntime'] = cpu_rt_runtime
+
+ if blkio_weight:
+ if not isinstance(blkio_weight, int):
+ raise host_config_type_error(
+ 'blkio_weight', blkio_weight, 'int'
+ )
+ if version_lt(version, '1.22'):
+ raise host_config_version_error('blkio_weight', '1.22')
+ self["BlkioWeight"] = blkio_weight
+
+ if blkio_weight_device:
+ if not isinstance(blkio_weight_device, list):
+ raise host_config_type_error(
+ 'blkio_weight_device', blkio_weight_device, 'list'
+ )
+ if version_lt(version, '1.22'):
+ raise host_config_version_error('blkio_weight_device', '1.22')
+ self["BlkioWeightDevice"] = blkio_weight_device
+
+ if device_read_bps:
+ if not isinstance(device_read_bps, list):
+ raise host_config_type_error(
+ 'device_read_bps', device_read_bps, 'list'
+ )
+ if version_lt(version, '1.22'):
+ raise host_config_version_error('device_read_bps', '1.22')
+ self["BlkioDeviceReadBps"] = device_read_bps
+
+ if device_write_bps:
+ if not isinstance(device_write_bps, list):
+ raise host_config_type_error(
+ 'device_write_bps', device_write_bps, 'list'
+ )
+ if version_lt(version, '1.22'):
+ raise host_config_version_error('device_write_bps', '1.22')
+ self["BlkioDeviceWriteBps"] = device_write_bps
+
+ if device_read_iops:
+ if not isinstance(device_read_iops, list):
+ raise host_config_type_error(
+ 'device_read_iops', device_read_iops, 'list'
+ )
+ if version_lt(version, '1.22'):
+ raise host_config_version_error('device_read_iops', '1.22')
+ self["BlkioDeviceReadIOps"] = device_read_iops
+
+ if device_write_iops:
+ if not isinstance(device_write_iops, list):
+ raise host_config_type_error(
+ 'device_write_iops', device_write_iops, 'list'
+ )
+ if version_lt(version, '1.22'):
+ raise host_config_version_error('device_write_iops', '1.22')
+ self["BlkioDeviceWriteIOps"] = device_write_iops
+
+ if tmpfs:
+ if version_lt(version, '1.22'):
+ raise host_config_version_error('tmpfs', '1.22')
+ self["Tmpfs"] = convert_tmpfs_mounts(tmpfs)
+
+ if userns_mode:
+ if version_lt(version, '1.23'):
+ raise host_config_version_error('userns_mode', '1.23')
+
+ if userns_mode != "host":
+ raise host_config_value_error("userns_mode", userns_mode)
+ self['UsernsMode'] = userns_mode
+
+ if uts_mode:
+ if uts_mode != "host":
+ raise host_config_value_error("uts_mode", uts_mode)
+ self['UTSMode'] = uts_mode
+
+ if pids_limit:
+ if not isinstance(pids_limit, int):
+ raise host_config_type_error('pids_limit', pids_limit, 'int')
+ if version_lt(version, '1.23'):
+ raise host_config_version_error('pids_limit', '1.23')
+ self["PidsLimit"] = pids_limit
+
+ if isolation:
+ if not isinstance(isolation, str):
+ raise host_config_type_error('isolation', isolation, 'string')
+ if version_lt(version, '1.24'):
+ raise host_config_version_error('isolation', '1.24')
+ self['Isolation'] = isolation
+
+ if auto_remove:
+ if version_lt(version, '1.25'):
+ raise host_config_version_error('auto_remove', '1.25')
+ self['AutoRemove'] = auto_remove
+
+ if storage_opt is not None:
+ if version_lt(version, '1.24'):
+ raise host_config_version_error('storage_opt', '1.24')
+ self['StorageOpt'] = storage_opt
+
+ if init is not None:
+ if version_lt(version, '1.25'):
+ raise host_config_version_error('init', '1.25')
+ self['Init'] = init
+
+ if init_path is not None:
+ if version_lt(version, '1.25'):
+ raise host_config_version_error('init_path', '1.25')
+
+ if version_gte(version, '1.29'):
+ # https://github.com/moby/moby/pull/32470
+ raise host_config_version_error('init_path', '1.29', False)
+ self['InitPath'] = init_path
+
+ if volume_driver is not None:
+ self['VolumeDriver'] = volume_driver
+
+ if cpu_count:
+ if not isinstance(cpu_count, int):
+ raise host_config_type_error('cpu_count', cpu_count, 'int')
+ if version_lt(version, '1.25'):
+ raise host_config_version_error('cpu_count', '1.25')
+
+ self['CpuCount'] = cpu_count
+
+ if cpu_percent:
+ if not isinstance(cpu_percent, int):
+ raise host_config_type_error('cpu_percent', cpu_percent, 'int')
+ if version_lt(version, '1.25'):
+ raise host_config_version_error('cpu_percent', '1.25')
+
+ self['CpuPercent'] = cpu_percent
+
+ if nano_cpus:
+ if not isinstance(nano_cpus, int):
+ raise host_config_type_error('nano_cpus', nano_cpus, 'int')
+ if version_lt(version, '1.25'):
+ raise host_config_version_error('nano_cpus', '1.25')
+
+ self['NanoCpus'] = nano_cpus
+
+ if runtime:
+ if version_lt(version, '1.25'):
+ raise host_config_version_error('runtime', '1.25')
+ self['Runtime'] = runtime
+
+ if mounts is not None:
+ if version_lt(version, '1.30'):
+ raise host_config_version_error('mounts', '1.30')
+ self['Mounts'] = mounts
+
+ if device_cgroup_rules is not None:
+ if version_lt(version, '1.28'):
+ raise host_config_version_error('device_cgroup_rules', '1.28')
+ if not isinstance(device_cgroup_rules, list):
+ raise host_config_type_error(
+ 'device_cgroup_rules', device_cgroup_rules, 'list'
+ )
+ self['DeviceCgroupRules'] = device_cgroup_rules
+
+ if device_requests is not None:
+ if version_lt(version, '1.40'):
+ raise host_config_version_error('device_requests', '1.40')
+ if not isinstance(device_requests, list):
+ raise host_config_type_error(
+ 'device_requests', device_requests, 'list'
+ )
+ self['DeviceRequests'] = []
+ for req in device_requests:
+ if not isinstance(req, DeviceRequest):
+ req = DeviceRequest(**req)
+ self['DeviceRequests'].append(req)
+
+ if cgroupns:
+ self['CgroupnsMode'] = cgroupns
+
+
+def host_config_type_error(param, param_value, expected):
+ return TypeError(
+ f'Invalid type for {param} param: expected {expected} '
+ f'but found {type(param_value)}'
+ )
+
+
+def host_config_version_error(param, version, less_than=True):
+ operator = '<' if less_than else '>'
+ return errors.InvalidVersion(
+ f'{param} param is not supported in API versions {operator} {version}',
+ )
+
+def host_config_value_error(param, param_value):
+ return ValueError(f'Invalid value for {param} param: {param_value}')
+
+
+def host_config_incompatible_error(param, param_value, incompatible_param):
+ return errors.InvalidArgument(
+ f'\"{param_value}\" {param} is incompatible with {incompatible_param}'
+ )
+
+
+class ContainerConfig(dict):
+ def __init__(
+ self, version, image, command, hostname=None, user=None, detach=False,
+ stdin_open=False, tty=False, ports=None, environment=None,
+ volumes=None, network_disabled=False, entrypoint=None,
+ working_dir=None, domainname=None, host_config=None, mac_address=None,
+ labels=None, stop_signal=None, networking_config=None,
+ healthcheck=None, stop_timeout=None, runtime=None
+ ):
+
+ if stop_timeout is not None and version_lt(version, '1.25'):
+ raise errors.InvalidVersion(
+ 'stop_timeout was only introduced in API version 1.25'
+ )
+
+ if healthcheck is not None:
+ if version_lt(version, '1.24'):
+ raise errors.InvalidVersion(
+ 'Health options were only introduced in API version 1.24'
+ )
+
+ if version_lt(version, '1.29') and 'StartPeriod' in healthcheck:
+ raise errors.InvalidVersion(
+ 'healthcheck start period was introduced in API '
+ 'version 1.29'
+ )
+
+ if isinstance(command, str):
+ command = split_command(command)
+
+ if isinstance(entrypoint, str):
+ entrypoint = split_command(entrypoint)
+
+ if isinstance(environment, dict):
+ environment = format_environment(environment)
+
+ if isinstance(labels, list):
+ labels = {lbl: '' for lbl in labels}
+
+ if isinstance(ports, list):
+ exposed_ports = {}
+ for port_definition in ports:
+ port = port_definition
+ proto = 'tcp'
+ if isinstance(port_definition, tuple):
+ if len(port_definition) == 2:
+ proto = port_definition[1]
+ port = port_definition[0]
+ exposed_ports[f'{port}/{proto}'] = {}
+ ports = exposed_ports
+
+ if isinstance(volumes, str):
+ volumes = [volumes, ]
+
+ if isinstance(volumes, list):
+ volumes_dict = {}
+ for vol in volumes:
+ volumes_dict[vol] = {}
+ volumes = volumes_dict
+
+ if healthcheck and isinstance(healthcheck, dict):
+ healthcheck = Healthcheck(**healthcheck)
+
+ attach_stdin = False
+ attach_stdout = False
+ attach_stderr = False
+ stdin_once = False
+
+ if not detach:
+ attach_stdout = True
+ attach_stderr = True
+
+ if stdin_open:
+ attach_stdin = True
+ stdin_once = True
+
+ self.update({
+ 'Hostname': hostname,
+ 'Domainname': domainname,
+ 'ExposedPorts': ports,
+ 'User': str(user) if user is not None else None,
+ 'Tty': tty,
+ 'OpenStdin': stdin_open,
+ 'StdinOnce': stdin_once,
+ 'AttachStdin': attach_stdin,
+ 'AttachStdout': attach_stdout,
+ 'AttachStderr': attach_stderr,
+ 'Env': environment,
+ 'Cmd': command,
+ 'Image': image,
+ 'Volumes': volumes,
+ 'NetworkDisabled': network_disabled,
+ 'Entrypoint': entrypoint,
+ 'WorkingDir': working_dir,
+ 'HostConfig': host_config,
+ 'NetworkingConfig': networking_config,
+ 'MacAddress': mac_address,
+ 'Labels': labels,
+ 'StopSignal': stop_signal,
+ 'Healthcheck': healthcheck,
+ 'StopTimeout': stop_timeout,
+ 'Runtime': runtime
+ })
diff --git a/contrib/python/docker/docker/types/daemon.py b/contrib/python/docker/docker/types/daemon.py
new file mode 100644
index 00000000000..04e6ccb2d77
--- /dev/null
+++ b/contrib/python/docker/docker/types/daemon.py
@@ -0,0 +1,71 @@
+import socket
+
+import urllib3
+
+from ..errors import DockerException
+
+
+class CancellableStream:
+ """
+ Stream wrapper for real-time events, logs, etc. from the server.
+
+ Example:
+ >>> events = client.events()
+ >>> for event in events:
+ ... print(event)
+ >>> # and cancel from another thread
+ >>> events.close()
+ """
+
+ def __init__(self, stream, response):
+ self._stream = stream
+ self._response = response
+
+ def __iter__(self):
+ return self
+
+ def __next__(self):
+ try:
+ return next(self._stream)
+ except urllib3.exceptions.ProtocolError:
+ raise StopIteration from None
+ except OSError:
+ raise StopIteration from None
+
+ next = __next__
+
+ def close(self):
+ """
+ Closes the event streaming.
+ """
+
+ if not self._response.raw.closed:
+ # find the underlying socket object
+ # based on api.client._get_raw_response_socket
+
+ sock_fp = self._response.raw._fp.fp
+
+ if hasattr(sock_fp, 'raw'):
+ sock_raw = sock_fp.raw
+
+ if hasattr(sock_raw, 'sock'):
+ sock = sock_raw.sock
+
+ elif hasattr(sock_raw, '_sock'):
+ sock = sock_raw._sock
+
+ elif hasattr(sock_fp, 'channel'):
+ # We're working with a paramiko (SSH) channel, which doesn't
+ # support cancelable streams with the current implementation
+ raise DockerException(
+ 'Cancellable streams not supported for the SSH protocol'
+ )
+ else:
+ sock = sock_fp._sock
+
+ if hasattr(urllib3.contrib, 'pyopenssl') and isinstance(
+ sock, urllib3.contrib.pyopenssl.WrappedSocket):
+ sock = sock.socket
+
+ sock.shutdown(socket.SHUT_RDWR)
+ sock.close()
diff --git a/contrib/python/docker/docker/types/healthcheck.py b/contrib/python/docker/docker/types/healthcheck.py
new file mode 100644
index 00000000000..dfc88a97717
--- /dev/null
+++ b/contrib/python/docker/docker/types/healthcheck.py
@@ -0,0 +1,88 @@
+from .base import DictType
+
+
+class Healthcheck(DictType):
+ """
+ Defines a healthcheck configuration for a container or service.
+
+ Args:
+ test (:py:class:`list` or str): Test to perform to determine
+ container health. Possible values:
+
+ - Empty list: Inherit healthcheck from parent image
+ - ``["NONE"]``: Disable healthcheck
+ - ``["CMD", args...]``: exec arguments directly.
+ - ``["CMD-SHELL", command]``: Run command in the system's
+ default shell.
+
+ If a string is provided, it will be used as a ``CMD-SHELL``
+ command.
+ interval (int): The time to wait between checks in nanoseconds. It
+ should be 0 or at least 1000000 (1 ms).
+ timeout (int): The time to wait before considering the check to
+ have hung. It should be 0 or at least 1000000 (1 ms).
+ retries (int): The number of consecutive failures needed to
+ consider a container as unhealthy.
+ start_period (int): Start period for the container to
+ initialize before starting health-retries countdown in
+ nanoseconds. It should be 0 or at least 1000000 (1 ms).
+ """
+ def __init__(self, **kwargs):
+ test = kwargs.get('test', kwargs.get('Test'))
+ if isinstance(test, str):
+ test = ["CMD-SHELL", test]
+
+ interval = kwargs.get('interval', kwargs.get('Interval'))
+ timeout = kwargs.get('timeout', kwargs.get('Timeout'))
+ retries = kwargs.get('retries', kwargs.get('Retries'))
+ start_period = kwargs.get('start_period', kwargs.get('StartPeriod'))
+
+ super().__init__({
+ 'Test': test,
+ 'Interval': interval,
+ 'Timeout': timeout,
+ 'Retries': retries,
+ 'StartPeriod': start_period
+ })
+
+ @property
+ def test(self):
+ return self['Test']
+
+ @test.setter
+ def test(self, value):
+ if isinstance(value, str):
+ value = ["CMD-SHELL", value]
+ self['Test'] = value
+
+ @property
+ def interval(self):
+ return self['Interval']
+
+ @interval.setter
+ def interval(self, value):
+ self['Interval'] = value
+
+ @property
+ def timeout(self):
+ return self['Timeout']
+
+ @timeout.setter
+ def timeout(self, value):
+ self['Timeout'] = value
+
+ @property
+ def retries(self):
+ return self['Retries']
+
+ @retries.setter
+ def retries(self, value):
+ self['Retries'] = value
+
+ @property
+ def start_period(self):
+ return self['StartPeriod']
+
+ @start_period.setter
+ def start_period(self, value):
+ self['StartPeriod'] = value
diff --git a/contrib/python/docker/docker/types/networks.py b/contrib/python/docker/docker/types/networks.py
new file mode 100644
index 00000000000..ed1ced13edf
--- /dev/null
+++ b/contrib/python/docker/docker/types/networks.py
@@ -0,0 +1,128 @@
+from .. import errors
+from ..utils import normalize_links, version_lt
+
+
+class EndpointConfig(dict):
+ def __init__(self, version, aliases=None, links=None, ipv4_address=None,
+ ipv6_address=None, link_local_ips=None, driver_opt=None,
+ mac_address=None):
+ if version_lt(version, '1.22'):
+ raise errors.InvalidVersion(
+ 'Endpoint config is not supported for API version < 1.22'
+ )
+
+ if aliases:
+ self["Aliases"] = aliases
+
+ if links:
+ self["Links"] = normalize_links(links)
+
+ ipam_config = {}
+ if ipv4_address:
+ ipam_config['IPv4Address'] = ipv4_address
+
+ if ipv6_address:
+ ipam_config['IPv6Address'] = ipv6_address
+
+ if mac_address:
+ if version_lt(version, '1.25'):
+ raise errors.InvalidVersion(
+ 'mac_address is not supported for API version < 1.25'
+ )
+ self['MacAddress'] = mac_address
+
+ if link_local_ips is not None:
+ if version_lt(version, '1.24'):
+ raise errors.InvalidVersion(
+ 'link_local_ips is not supported for API version < 1.24'
+ )
+ ipam_config['LinkLocalIPs'] = link_local_ips
+
+ if ipam_config:
+ self['IPAMConfig'] = ipam_config
+
+ if driver_opt:
+ if version_lt(version, '1.32'):
+ raise errors.InvalidVersion(
+ 'DriverOpts is not supported for API version < 1.32'
+ )
+ if not isinstance(driver_opt, dict):
+ raise TypeError('driver_opt must be a dictionary')
+ self['DriverOpts'] = driver_opt
+
+
+class NetworkingConfig(dict):
+ def __init__(self, endpoints_config=None):
+ if endpoints_config:
+ self["EndpointsConfig"] = endpoints_config
+
+
+class IPAMConfig(dict):
+ """
+ Create an IPAM (IP Address Management) config dictionary to be used with
+ :py:meth:`~docker.api.network.NetworkApiMixin.create_network`.
+
+ Args:
+
+ driver (str): The IPAM driver to use. Defaults to ``default``.
+ pool_configs (:py:class:`list`): A list of pool configurations
+ (:py:class:`~docker.types.IPAMPool`). Defaults to empty list.
+ options (dict): Driver options as a key-value dictionary.
+ Defaults to `None`.
+
+ Example:
+
+ >>> ipam_config = docker.types.IPAMConfig(driver='default')
+ >>> network = client.create_network('network1', ipam=ipam_config)
+
+ """
+ def __init__(self, driver='default', pool_configs=None, options=None):
+ self.update({
+ 'Driver': driver,
+ 'Config': pool_configs or []
+ })
+
+ if options:
+ if not isinstance(options, dict):
+ raise TypeError('IPAMConfig options must be a dictionary')
+ self['Options'] = options
+
+
+class IPAMPool(dict):
+ """
+ Create an IPAM pool config dictionary to be added to the
+ ``pool_configs`` parameter of
+ :py:class:`~docker.types.IPAMConfig`.
+
+ Args:
+
+ subnet (str): Custom subnet for this IPAM pool using the CIDR
+ notation. Defaults to ``None``.
+ iprange (str): Custom IP range for endpoints in this IPAM pool using
+ the CIDR notation. Defaults to ``None``.
+ gateway (str): Custom IP address for the pool's gateway.
+ aux_addresses (dict): A dictionary of ``key -> ip_address``
+ relationships specifying auxiliary addresses that need to be
+ allocated by the IPAM driver.
+
+ Example:
+
+ >>> ipam_pool = docker.types.IPAMPool(
+ subnet='124.42.0.0/16',
+ iprange='124.42.0.0/24',
+ gateway='124.42.0.254',
+ aux_addresses={
+ 'reserved1': '124.42.1.1'
+ }
+ )
+ >>> ipam_config = docker.types.IPAMConfig(
+ pool_configs=[ipam_pool])
+ """
+ def __init__(self, subnet=None, iprange=None, gateway=None,
+ aux_addresses=None):
+ self.update({
+ 'Subnet': subnet,
+ 'IPRange': iprange,
+ 'Gateway': gateway,
+ 'AuxiliaryAddresses': aux_addresses
+ })
diff --git a/contrib/python/docker/docker/types/services.py b/contrib/python/docker/docker/types/services.py
new file mode 100644
index 00000000000..821115411c6
--- /dev/null
+++ b/contrib/python/docker/docker/types/services.py
@@ -0,0 +1,867 @@
+from .. import errors
+from ..constants import IS_WINDOWS_PLATFORM
+from ..utils import (
+ check_resource,
+ convert_service_networks,
+ format_environment,
+ format_extra_hosts,
+ parse_bytes,
+ split_command,
+)
+
+
+class TaskTemplate(dict):
+ """
+ Describe the task specification to be used when creating or updating a
+ service.
+
+ Args:
+
+ container_spec (ContainerSpec): Container settings for containers
+ started as part of this task.
+ log_driver (DriverConfig): Log configuration for containers created as
+ part of the service.
+ resources (Resources): Resource requirements which apply to each
+ individual container created as part of the service.
+ restart_policy (RestartPolicy): Specification for the restart policy
+ which applies to containers created as part of this service.
+ placement (Placement): Placement instructions for the scheduler.
+ If a list is passed instead, it is assumed to be a list of
+ constraints as part of a :py:class:`Placement` object.
+ networks (:py:class:`list`): List of network names or IDs or
+ :py:class:`NetworkAttachmentConfig` to attach the service to.
+ force_update (int): A counter that triggers an update even if no
+ relevant parameters have been changed.
+ """
+
+ def __init__(self, container_spec, resources=None, restart_policy=None,
+ placement=None, log_driver=None, networks=None,
+ force_update=None):
+ self['ContainerSpec'] = container_spec
+ if resources:
+ self['Resources'] = resources
+ if restart_policy:
+ self['RestartPolicy'] = restart_policy
+ if placement:
+ if isinstance(placement, list):
+ placement = Placement(constraints=placement)
+ self['Placement'] = placement
+ if log_driver:
+ self['LogDriver'] = log_driver
+ if networks:
+ self['Networks'] = convert_service_networks(networks)
+
+ if force_update is not None:
+ if not isinstance(force_update, int):
+ raise TypeError('force_update must be an integer')
+ self['ForceUpdate'] = force_update
+
+ @property
+ def container_spec(self):
+ return self.get('ContainerSpec')
+
+ @property
+ def resources(self):
+ return self.get('Resources')
+
+ @property
+ def restart_policy(self):
+ return self.get('RestartPolicy')
+
+ @property
+ def placement(self):
+ return self.get('Placement')
+
+
+class ContainerSpec(dict):
+ """
+ Describes the behavior of containers that are part of a task, and is used
+ when declaring a :py:class:`~docker.types.TaskTemplate`.
+
+ Args:
+
+ image (string): The image name to use for the container.
+ command (string or list): The command to be run in the image.
+ args (:py:class:`list`): Arguments to the command.
+ hostname (string): The hostname to set on the container.
+ env (dict): Environment variables.
+ workdir (string): The working directory for commands to run in.
+ user (string): The user inside the container.
+ labels (dict): A map of labels to associate with the service.
+ mounts (:py:class:`list`): A list of specifications for mounts to be
+ added to containers created as part of the service. See the
+ :py:class:`~docker.types.Mount` class for details.
+ stop_grace_period (int): Amount of time to wait for the container to
+ terminate before forcefully killing it.
+ secrets (:py:class:`list`): List of :py:class:`SecretReference` to be
+ made available inside the containers.
+ tty (boolean): Whether a pseudo-TTY should be allocated.
+ groups (:py:class:`list`): A list of additional groups that the
+ container process will run as.
+ open_stdin (boolean): Open ``stdin``
+ read_only (boolean): Mount the container's root filesystem as read
+ only.
+ stop_signal (string): Set signal to stop the service's containers
+ healthcheck (Healthcheck): Healthcheck
+ configuration for this service.
+ hosts (:py:class:`dict`): A set of host to IP mappings to add to
+ the container's ``hosts`` file.
+ dns_config (DNSConfig): Specification for DNS
+ related configurations in resolver configuration file.
+ configs (:py:class:`list`): List of :py:class:`ConfigReference` that
+ will be exposed to the service.
+ privileges (Privileges): Security options for the service's containers.
+ isolation (string): Isolation technology used by the service's
+ containers. Only used for Windows containers.
+ init (boolean): Run an init inside the container that forwards signals
+ and reaps processes.
+ cap_add (:py:class:`list`): A list of kernel capabilities to add to the
+ default set for the container.
+ cap_drop (:py:class:`list`): A list of kernel capabilities to drop from
+ the default set for the container.
+ sysctls (:py:class:`dict`): A dict of sysctl values to add to
+ the container
+ """
+
+ def __init__(self, image, command=None, args=None, hostname=None, env=None,
+ workdir=None, user=None, labels=None, mounts=None,
+ stop_grace_period=None, secrets=None, tty=None, groups=None,
+ open_stdin=None, read_only=None, stop_signal=None,
+ healthcheck=None, hosts=None, dns_config=None, configs=None,
+ privileges=None, isolation=None, init=None, cap_add=None,
+ cap_drop=None, sysctls=None):
+ self['Image'] = image
+
+ if isinstance(command, str):
+ command = split_command(command)
+ self['Command'] = command
+ self['Args'] = args
+
+ if hostname is not None:
+ self['Hostname'] = hostname
+ if env is not None:
+ if isinstance(env, dict):
+ self['Env'] = format_environment(env)
+ else:
+ self['Env'] = env
+ if workdir is not None:
+ self['Dir'] = workdir
+ if user is not None:
+ self['User'] = user
+ if groups is not None:
+ self['Groups'] = groups
+ if stop_signal is not None:
+ self['StopSignal'] = stop_signal
+ if stop_grace_period is not None:
+ self['StopGracePeriod'] = stop_grace_period
+ if labels is not None:
+ self['Labels'] = labels
+ if hosts is not None:
+ self['Hosts'] = format_extra_hosts(hosts, task=True)
+
+ if mounts is not None:
+ parsed_mounts = []
+ for mount in mounts:
+ if isinstance(mount, str):
+ parsed_mounts.append(Mount.parse_mount_string(mount))
+ else:
+ # If mount already parsed
+ parsed_mounts.append(mount)
+ self['Mounts'] = parsed_mounts
+
+ if secrets is not None:
+ if not isinstance(secrets, list):
+ raise TypeError('secrets must be a list')
+ self['Secrets'] = secrets
+
+ if configs is not None:
+ if not isinstance(configs, list):
+ raise TypeError('configs must be a list')
+ self['Configs'] = configs
+
+ if dns_config is not None:
+ self['DNSConfig'] = dns_config
+ if privileges is not None:
+ self['Privileges'] = privileges
+ if healthcheck is not None:
+ self['Healthcheck'] = healthcheck
+
+ if tty is not None:
+ self['TTY'] = tty
+ if open_stdin is not None:
+ self['OpenStdin'] = open_stdin
+ if read_only is not None:
+ self['ReadOnly'] = read_only
+
+ if isolation is not None:
+ self['Isolation'] = isolation
+
+ if init is not None:
+ self['Init'] = init
+
+ if cap_add is not None:
+ if not isinstance(cap_add, list):
+ raise TypeError('cap_add must be a list')
+
+ self['CapabilityAdd'] = cap_add
+
+ if cap_drop is not None:
+ if not isinstance(cap_drop, list):
+ raise TypeError('cap_drop must be a list')
+
+ self['CapabilityDrop'] = cap_drop
+
+ if sysctls is not None:
+ if not isinstance(sysctls, dict):
+ raise TypeError('sysctls must be a dict')
+
+ self['Sysctls'] = sysctls
+
+
+class Mount(dict):
+ """
+ Describes a mounted folder's configuration inside a container. A list of
+ :py:class:`Mount` would be used as part of a
+ :py:class:`~docker.types.ContainerSpec`.
+
+ Args:
+
+ target (string): Container path.
+ source (string): Mount source (e.g. a volume name or a host path).
+ type (string): The mount type (``bind`` / ``volume`` / ``tmpfs`` /
+ ``npipe``). Default: ``volume``.
+ read_only (bool): Whether the mount should be read-only.
+ consistency (string): The consistency requirement for the mount. One of
+ ``default```, ``consistent``, ``cached``, ``delegated``.
+ propagation (string): A propagation mode with the value ``[r]private``,
+ ``[r]shared``, or ``[r]slave``. Only valid for the ``bind`` type.
+ no_copy (bool): False if the volume should be populated with the data
+ from the target. Default: ``False``. Only valid for the ``volume``
+ type.
+ labels (dict): User-defined name and labels for the volume. Only valid
+ for the ``volume`` type.
+ driver_config (DriverConfig): Volume driver configuration. Only valid
+ for the ``volume`` type.
+ tmpfs_size (int or string): The size for the tmpfs mount in bytes.
+ tmpfs_mode (int): The permission mode for the tmpfs mount.
+ """
+
+ def __init__(self, target, source, type='volume', read_only=False,
+ consistency=None, propagation=None, no_copy=False,
+ labels=None, driver_config=None, tmpfs_size=None,
+ tmpfs_mode=None):
+ self['Target'] = target
+ self['Source'] = source
+ if type not in ('bind', 'volume', 'tmpfs', 'npipe'):
+ raise errors.InvalidArgument(
+ f'Unsupported mount type: "{type}"'
+ )
+ self['Type'] = type
+ self['ReadOnly'] = read_only
+
+ if consistency:
+ self['Consistency'] = consistency
+
+ if type == 'bind':
+ if propagation is not None:
+ self['BindOptions'] = {
+ 'Propagation': propagation
+ }
+ if any([labels, driver_config, no_copy, tmpfs_size, tmpfs_mode]):
+ raise errors.InvalidArgument(
+ 'Incompatible options have been provided for the bind '
+ 'type mount.'
+ )
+ elif type == 'volume':
+ volume_opts = {}
+ if no_copy:
+ volume_opts['NoCopy'] = True
+ if labels:
+ volume_opts['Labels'] = labels
+ if driver_config:
+ volume_opts['DriverConfig'] = driver_config
+ if volume_opts:
+ self['VolumeOptions'] = volume_opts
+ if any([propagation, tmpfs_size, tmpfs_mode]):
+ raise errors.InvalidArgument(
+ 'Incompatible options have been provided for the volume '
+ 'type mount.'
+ )
+ elif type == 'tmpfs':
+ tmpfs_opts = {}
+ if tmpfs_mode:
+ if not isinstance(tmpfs_mode, int):
+ raise errors.InvalidArgument(
+ 'tmpfs_mode must be an integer'
+ )
+ tmpfs_opts['Mode'] = tmpfs_mode
+ if tmpfs_size:
+ tmpfs_opts['SizeBytes'] = parse_bytes(tmpfs_size)
+ if tmpfs_opts:
+ self['TmpfsOptions'] = tmpfs_opts
+ if any([propagation, labels, driver_config, no_copy]):
+ raise errors.InvalidArgument(
+ 'Incompatible options have been provided for the tmpfs '
+ 'type mount.'
+ )
+
+ @classmethod
+ def parse_mount_string(cls, string):
+ parts = string.split(':')
+ if len(parts) > 3:
+ raise errors.InvalidArgument(
+ f'Invalid mount format "{string}"'
+ )
+ if len(parts) == 1:
+ return cls(target=parts[0], source=None)
+ else:
+ target = parts[1]
+ source = parts[0]
+ mount_type = 'volume'
+ if source.startswith('/') or (
+ IS_WINDOWS_PLATFORM and source[0].isalpha() and
+ source[1] == ':'
+ ):
+ # FIXME: That windows condition will fail earlier since we
+ # split on ':'. We should look into doing a smarter split
+ # if we detect we are on Windows.
+ mount_type = 'bind'
+ read_only = not (len(parts) == 2 or parts[2] == 'rw')
+ return cls(target, source, read_only=read_only, type=mount_type)
+
+
+class Resources(dict):
+ """
+ Configures resource allocation for containers when made part of a
+ :py:class:`~docker.types.ContainerSpec`.
+
+ Args:
+
+ cpu_limit (int): CPU limit in units of 10^9 CPU shares.
+ mem_limit (int): Memory limit in Bytes.
+ cpu_reservation (int): CPU reservation in units of 10^9 CPU shares.
+ mem_reservation (int): Memory reservation in Bytes.
+ generic_resources (dict or :py:class:`list`): Node level generic
+ resources, for example a GPU, using the following format:
+ ``{ resource_name: resource_value }``. Alternatively, a list of
+ of resource specifications as defined by the Engine API.
+ """
+
+ def __init__(self, cpu_limit=None, mem_limit=None, cpu_reservation=None,
+ mem_reservation=None, generic_resources=None):
+ limits = {}
+ reservation = {}
+ if cpu_limit is not None:
+ limits['NanoCPUs'] = cpu_limit
+ if mem_limit is not None:
+ limits['MemoryBytes'] = mem_limit
+ if cpu_reservation is not None:
+ reservation['NanoCPUs'] = cpu_reservation
+ if mem_reservation is not None:
+ reservation['MemoryBytes'] = mem_reservation
+ if generic_resources is not None:
+ reservation['GenericResources'] = (
+ _convert_generic_resources_dict(generic_resources)
+ )
+ if limits:
+ self['Limits'] = limits
+ if reservation:
+ self['Reservations'] = reservation
+
+
+def _convert_generic_resources_dict(generic_resources):
+ if isinstance(generic_resources, list):
+ return generic_resources
+ if not isinstance(generic_resources, dict):
+ raise errors.InvalidArgument(
+ 'generic_resources must be a dict or a list '
+ f'(found {type(generic_resources)})'
+ )
+ resources = []
+ for kind, value in generic_resources.items():
+ resource_type = None
+ if isinstance(value, int):
+ resource_type = 'DiscreteResourceSpec'
+ elif isinstance(value, str):
+ resource_type = 'NamedResourceSpec'
+ else:
+ kv = {kind: value}
+ raise errors.InvalidArgument(
+ f'Unsupported generic resource reservation type: {kv}'
+ )
+ resources.append({
+ resource_type: {'Kind': kind, 'Value': value}
+ })
+ return resources
+
+
+class UpdateConfig(dict):
+ """
+
+ Used to specify the way container updates should be performed by a service.
+
+ Args:
+
+ parallelism (int): Maximum number of tasks to be updated in one
+ iteration (0 means unlimited parallelism). Default: 0.
+ delay (int): Amount of time between updates, in nanoseconds.
+ failure_action (string): Action to take if an updated task fails to
+ run, or stops running during the update. Acceptable values are
+ ``continue``, ``pause``, as well as ``rollback`` since API v1.28.
+ Default: ``continue``
+ monitor (int): Amount of time to monitor each updated task for
+ failures, in nanoseconds.
+ max_failure_ratio (float): The fraction of tasks that may fail during
+ an update before the failure action is invoked, specified as a
+ floating point number between 0 and 1. Default: 0
+ order (string): Specifies the order of operations when rolling out an
+ updated task. Either ``start-first`` or ``stop-first`` are accepted.
+ """
+
+ def __init__(self, parallelism=0, delay=None, failure_action='continue',
+ monitor=None, max_failure_ratio=None, order=None):
+ self['Parallelism'] = parallelism
+ if delay is not None:
+ self['Delay'] = delay
+ if failure_action not in ('pause', 'continue', 'rollback'):
+ raise errors.InvalidArgument(
+ 'failure_action must be one of `pause`, `continue`, `rollback`'
+ )
+ self['FailureAction'] = failure_action
+
+ if monitor is not None:
+ if not isinstance(monitor, int):
+ raise TypeError('monitor must be an integer')
+ self['Monitor'] = monitor
+
+ if max_failure_ratio is not None:
+ if not isinstance(max_failure_ratio, (float, int)):
+ raise TypeError('max_failure_ratio must be a float')
+ if max_failure_ratio > 1 or max_failure_ratio < 0:
+ raise errors.InvalidArgument(
+ 'max_failure_ratio must be a number between 0 and 1'
+ )
+ self['MaxFailureRatio'] = max_failure_ratio
+
+ if order is not None:
+ if order not in ('start-first', 'stop-first'):
+ raise errors.InvalidArgument(
+ 'order must be either `start-first` or `stop-first`'
+ )
+ self['Order'] = order
+
+
+class RollbackConfig(UpdateConfig):
+ """
+ Used to specify the way container rollbacks should be performed by a
+ service
+
+ Args:
+ parallelism (int): Maximum number of tasks to be rolled back in one
+ iteration (0 means unlimited parallelism). Default: 0
+ delay (int): Amount of time between rollbacks, in nanoseconds.
+ failure_action (string): Action to take if a rolled back task fails to
+ run, or stops running during the rollback. Acceptable values are
+ ``continue``, ``pause`` or ``rollback``.
+ Default: ``continue``
+ monitor (int): Amount of time to monitor each rolled back task for
+ failures, in nanoseconds.
+ max_failure_ratio (float): The fraction of tasks that may fail during
+ a rollback before the failure action is invoked, specified as a
+ floating point number between 0 and 1. Default: 0
+ order (string): Specifies the order of operations when rolling out a
+ rolled back task. Either ``start-first`` or ``stop-first`` are
+ accepted.
+ """
+ pass
+
+
+class RestartConditionTypesEnum:
+ _values = (
+ 'none',
+ 'on-failure',
+ 'any',
+ )
+ NONE, ON_FAILURE, ANY = _values
+
+
+class RestartPolicy(dict):
+ """
+ Used when creating a :py:class:`~docker.types.ContainerSpec`,
+ dictates whether a container should restart after stopping or failing.
+
+ Args:
+
+ condition (string): Condition for restart (``none``, ``on-failure``,
+ or ``any``). Default: `none`.
+ delay (int): Delay between restart attempts. Default: 0
+ max_attempts (int): Maximum attempts to restart a given container
+ before giving up. Default value is 0, which is ignored.
+ window (int): Time window used to evaluate the restart policy. Default
+ value is 0, which is unbounded.
+ """
+
+ condition_types = RestartConditionTypesEnum
+
+ def __init__(self, condition=RestartConditionTypesEnum.NONE, delay=0,
+ max_attempts=0, window=0):
+ if condition not in self.condition_types._values:
+ raise TypeError(
+ f'Invalid RestartPolicy condition {condition}'
+ )
+
+ self['Condition'] = condition
+ self['Delay'] = delay
+ self['MaxAttempts'] = max_attempts
+ self['Window'] = window
+
+
+class DriverConfig(dict):
+ """
+ Indicates which driver to use, as well as its configuration. Can be used
+ as ``log_driver`` in a :py:class:`~docker.types.ContainerSpec`,
+ for the `driver_config` in a volume :py:class:`~docker.types.Mount`, or
+ as the driver object in
+ :py:meth:`create_secret`.
+
+ Args:
+
+ name (string): Name of the driver to use.
+ options (dict): Driver-specific options. Default: ``None``.
+ """
+
+ def __init__(self, name, options=None):
+ self['Name'] = name
+ if options:
+ self['Options'] = options
+
+
+class EndpointSpec(dict):
+ """
+ Describes properties to access and load-balance a service.
+
+ Args:
+
+ mode (string): The mode of resolution to use for internal load
+ balancing between tasks (``'vip'`` or ``'dnsrr'``). Defaults to
+ ``'vip'`` if not provided.
+ ports (dict): Exposed ports that this service is accessible on from the
+ outside, in the form of ``{ published_port: target_port }`` or
+ ``{ published_port: <port_config_tuple> }``. Port config tuple format
+ is ``(target_port [, protocol [, publish_mode]])``.
+ Ports can only be provided if the ``vip`` resolution mode is used.
+ """
+
+ def __init__(self, mode=None, ports=None):
+ if ports:
+ self['Ports'] = convert_service_ports(ports)
+ if mode:
+ self['Mode'] = mode
+
+
+def convert_service_ports(ports):
+ if isinstance(ports, list):
+ return ports
+ if not isinstance(ports, dict):
+ raise TypeError(
+ 'Invalid type for ports, expected dict or list'
+ )
+
+ result = []
+ for k, v in ports.items():
+ port_spec = {
+ 'Protocol': 'tcp',
+ 'PublishedPort': k
+ }
+
+ if isinstance(v, tuple):
+ port_spec['TargetPort'] = v[0]
+ if len(v) >= 2 and v[1] is not None:
+ port_spec['Protocol'] = v[1]
+ if len(v) == 3:
+ port_spec['PublishMode'] = v[2]
+ if len(v) > 3:
+ raise ValueError(
+ 'Service port configuration can have at most 3 elements: '
+ '(target_port, protocol, mode)'
+ )
+ else:
+ port_spec['TargetPort'] = v
+
+ result.append(port_spec)
+ return result
+
+
+class ServiceMode(dict):
+ """
+ Indicate whether a service or a job should be deployed as a replicated
+ or global service, and associated parameters
+
+ Args:
+ mode (string): Can be either ``replicated``, ``global``,
+ ``replicated-job`` or ``global-job``
+ replicas (int): Number of replicas. For replicated services only.
+ concurrency (int): Number of concurrent jobs. For replicated job
+ services only.
+ """
+
+ def __init__(self, mode, replicas=None, concurrency=None):
+ replicated_modes = ('replicated', 'replicated-job')
+ supported_modes = replicated_modes + ('global', 'global-job')
+
+ if mode not in supported_modes:
+ raise errors.InvalidArgument(
+ 'mode must be either "replicated", "global", "replicated-job"'
+ ' or "global-job"'
+ )
+
+ if mode not in replicated_modes:
+ if replicas is not None:
+ raise errors.InvalidArgument(
+ 'replicas can only be used for "replicated" or'
+ ' "replicated-job" mode'
+ )
+
+ if concurrency is not None:
+ raise errors.InvalidArgument(
+ 'concurrency can only be used for "replicated-job" mode'
+ )
+
+ service_mode = self._convert_mode(mode)
+ self.mode = service_mode
+ self[service_mode] = {}
+
+ if replicas is not None:
+ if mode == 'replicated':
+ self[service_mode]['Replicas'] = replicas
+
+ if mode == 'replicated-job':
+ self[service_mode]['MaxConcurrent'] = concurrency or 1
+ self[service_mode]['TotalCompletions'] = replicas
+
+ @staticmethod
+ def _convert_mode(original_mode):
+ if original_mode == 'global-job':
+ return 'GlobalJob'
+
+ if original_mode == 'replicated-job':
+ return 'ReplicatedJob'
+
+ return original_mode
+
+ @property
+ def replicas(self):
+ if 'replicated' in self:
+ return self['replicated'].get('Replicas')
+
+ if 'ReplicatedJob' in self:
+ return self['ReplicatedJob'].get('TotalCompletions')
+
+ return None
+
+
+class SecretReference(dict):
+ """
+ Secret reference to be used as part of a :py:class:`ContainerSpec`.
+ Describes how a secret is made accessible inside the service's
+ containers.
+
+ Args:
+ secret_id (string): Secret's ID
+ secret_name (string): Secret's name as defined at its creation.
+ filename (string): Name of the file containing the secret. Defaults
+ to the secret's name if not specified.
+ uid (string): UID of the secret file's owner. Default: 0
+ gid (string): GID of the secret file's group. Default: 0
+ mode (int): File access mode inside the container. Default: 0o444
+ """
+ @check_resource('secret_id')
+ def __init__(self, secret_id, secret_name, filename=None, uid=None,
+ gid=None, mode=0o444):
+ self['SecretName'] = secret_name
+ self['SecretID'] = secret_id
+ self['File'] = {
+ 'Name': filename or secret_name,
+ 'UID': uid or '0',
+ 'GID': gid or '0',
+ 'Mode': mode
+ }
+
+
+class ConfigReference(dict):
+ """
+ Config reference to be used as part of a :py:class:`ContainerSpec`.
+ Describes how a config is made accessible inside the service's
+ containers.
+
+ Args:
+ config_id (string): Config's ID
+ config_name (string): Config's name as defined at its creation.
+ filename (string): Name of the file containing the config. Defaults
+ to the config's name if not specified.
+ uid (string): UID of the config file's owner. Default: 0
+ gid (string): GID of the config file's group. Default: 0
+ mode (int): File access mode inside the container. Default: 0o444
+ """
+ @check_resource('config_id')
+ def __init__(self, config_id, config_name, filename=None, uid=None,
+ gid=None, mode=0o444):
+ self['ConfigName'] = config_name
+ self['ConfigID'] = config_id
+ self['File'] = {
+ 'Name': filename or config_name,
+ 'UID': uid or '0',
+ 'GID': gid or '0',
+ 'Mode': mode
+ }
+
+
+class Placement(dict):
+ """
+ Placement constraints to be used as part of a :py:class:`TaskTemplate`
+
+ Args:
+ constraints (:py:class:`list` of str): A list of constraints
+ preferences (:py:class:`list` of tuple): Preferences provide a way
+ to make the scheduler aware of factors such as topology. They
+ are provided in order from highest to lowest precedence and
+ are expressed as ``(strategy, descriptor)`` tuples. See
+ :py:class:`PlacementPreference` for details.
+ maxreplicas (int): Maximum number of replicas per node
+ platforms (:py:class:`list` of tuple): A list of platforms
+ expressed as ``(arch, os)`` tuples
+ """
+
+ def __init__(self, constraints=None, preferences=None, platforms=None,
+ maxreplicas=None):
+ if constraints is not None:
+ self['Constraints'] = constraints
+ if preferences is not None:
+ self['Preferences'] = []
+ for pref in preferences:
+ if isinstance(pref, tuple):
+ pref = PlacementPreference(*pref)
+ self['Preferences'].append(pref)
+ if maxreplicas is not None:
+ self['MaxReplicas'] = maxreplicas
+ if platforms:
+ self['Platforms'] = []
+ for plat in platforms:
+ self['Platforms'].append({
+ 'Architecture': plat[0], 'OS': plat[1]
+ })
+
+
+class PlacementPreference(dict):
+ """
+ Placement preference to be used as an element in the list of
+ preferences for :py:class:`Placement` objects.
+
+ Args:
+ strategy (string): The placement strategy to implement. Currently,
+ the only supported strategy is ``spread``.
+ descriptor (string): A label descriptor. For the spread strategy,
+ the scheduler will try to spread tasks evenly over groups of
+ nodes identified by this label.
+ """
+
+ def __init__(self, strategy, descriptor):
+ if strategy != 'spread':
+ raise errors.InvalidArgument(
+ f'PlacementPreference strategy value is invalid ({strategy}): '
+ 'must be "spread".'
+ )
+ self['Spread'] = {'SpreadDescriptor': descriptor}
+
+
+class DNSConfig(dict):
+ """
+ Specification for DNS related configurations in resolver configuration
+ file (``resolv.conf``). Part of a :py:class:`ContainerSpec` definition.
+
+ Args:
+ nameservers (:py:class:`list`): The IP addresses of the name
+ servers.
+ search (:py:class:`list`): A search list for host-name lookup.
+ options (:py:class:`list`): A list of internal resolver variables
+ to be modified (e.g., ``debug``, ``ndots:3``, etc.).
+ """
+
+ def __init__(self, nameservers=None, search=None, options=None):
+ self['Nameservers'] = nameservers
+ self['Search'] = search
+ self['Options'] = options
+
+
+class Privileges(dict):
+ r"""
+ Security options for a service's containers.
+ Part of a :py:class:`ContainerSpec` definition.
+
+ Args:
+ credentialspec_file (str): Load credential spec from this file.
+ The file is read by the daemon, and must be present in the
+ CredentialSpecs subdirectory in the docker data directory,
+ which defaults to ``C:\ProgramData\Docker\`` on Windows.
+ Can not be combined with credentialspec_registry.
+
+ credentialspec_registry (str): Load credential spec from this value
+ in the Windows registry. The specified registry value must be
+ located in: ``HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion
+ \Virtualization\Containers\CredentialSpecs``.
+ Can not be combined with credentialspec_file.
+
+ selinux_disable (boolean): Disable SELinux
+ selinux_user (string): SELinux user label
+ selinux_role (string): SELinux role label
+ selinux_type (string): SELinux type label
+ selinux_level (string): SELinux level label
+ """
+
+ def __init__(self, credentialspec_file=None, credentialspec_registry=None,
+ selinux_disable=None, selinux_user=None, selinux_role=None,
+ selinux_type=None, selinux_level=None):
+ credential_spec = {}
+ if credentialspec_registry is not None:
+ credential_spec['Registry'] = credentialspec_registry
+ if credentialspec_file is not None:
+ credential_spec['File'] = credentialspec_file
+
+ if len(credential_spec) > 1:
+ raise errors.InvalidArgument(
+ 'credentialspec_file and credentialspec_registry are mutually'
+ ' exclusive'
+ )
+
+ selinux_context = {
+ 'Disable': selinux_disable,
+ 'User': selinux_user,
+ 'Role': selinux_role,
+ 'Type': selinux_type,
+ 'Level': selinux_level,
+ }
+
+ if len(credential_spec) > 0:
+ self['CredentialSpec'] = credential_spec
+
+ if len(selinux_context) > 0:
+ self['SELinuxContext'] = selinux_context
+
+
+class NetworkAttachmentConfig(dict):
+ """
+ Network attachment options for a service.
+
+ Args:
+ target (str): The target network for attachment.
+ Can be a network name or ID.
+ aliases (:py:class:`list`): A list of discoverable alternate names
+ for the service.
+ options (:py:class:`dict`): Driver attachment options for the
+ network target.
+ """
+
+ def __init__(self, target, aliases=None, options=None):
+ self['Target'] = target
+ self['Aliases'] = aliases
+ self['DriverOpts'] = options
diff --git a/contrib/python/docker/docker/types/swarm.py b/contrib/python/docker/docker/types/swarm.py
new file mode 100644
index 00000000000..9687a82d82c
--- /dev/null
+++ b/contrib/python/docker/docker/types/swarm.py
@@ -0,0 +1,119 @@
+from ..errors import InvalidVersion
+from ..utils import version_lt
+
+
+class SwarmSpec(dict):
+ """
+ Describe a Swarm's configuration and options. Use
+ :py:meth:`~docker.api.swarm.SwarmApiMixin.create_swarm_spec`
+ to instantiate.
+ """
+ def __init__(self, version, task_history_retention_limit=None,
+ snapshot_interval=None, keep_old_snapshots=None,
+ log_entries_for_slow_followers=None, heartbeat_tick=None,
+ election_tick=None, dispatcher_heartbeat_period=None,
+ node_cert_expiry=None, external_cas=None, name=None,
+ labels=None, signing_ca_cert=None, signing_ca_key=None,
+ ca_force_rotate=None, autolock_managers=None,
+ log_driver=None):
+ if task_history_retention_limit is not None:
+ self['Orchestration'] = {
+ 'TaskHistoryRetentionLimit': task_history_retention_limit
+ }
+ if any([snapshot_interval,
+ keep_old_snapshots,
+ log_entries_for_slow_followers,
+ heartbeat_tick,
+ election_tick]):
+ self['Raft'] = {
+ 'SnapshotInterval': snapshot_interval,
+ 'KeepOldSnapshots': keep_old_snapshots,
+ 'LogEntriesForSlowFollowers': log_entries_for_slow_followers,
+ 'HeartbeatTick': heartbeat_tick,
+ 'ElectionTick': election_tick
+ }
+
+ if dispatcher_heartbeat_period:
+ self['Dispatcher'] = {
+ 'HeartbeatPeriod': dispatcher_heartbeat_period
+ }
+
+ ca_config = {}
+ if node_cert_expiry is not None:
+ ca_config['NodeCertExpiry'] = node_cert_expiry
+ if external_cas:
+ if version_lt(version, '1.25'):
+ if len(external_cas) > 1:
+ raise InvalidVersion(
+ 'Support for multiple external CAs is not available '
+ 'for API version < 1.25'
+ )
+ ca_config['ExternalCA'] = external_cas[0]
+ else:
+ ca_config['ExternalCAs'] = external_cas
+ if signing_ca_key:
+ if version_lt(version, '1.30'):
+ raise InvalidVersion(
+ 'signing_ca_key is not supported in API version < 1.30'
+ )
+ ca_config['SigningCAKey'] = signing_ca_key
+ if signing_ca_cert:
+ if version_lt(version, '1.30'):
+ raise InvalidVersion(
+ 'signing_ca_cert is not supported in API version < 1.30'
+ )
+ ca_config['SigningCACert'] = signing_ca_cert
+ if ca_force_rotate is not None:
+ if version_lt(version, '1.30'):
+ raise InvalidVersion(
+ 'force_rotate is not supported in API version < 1.30'
+ )
+ ca_config['ForceRotate'] = ca_force_rotate
+ if ca_config:
+ self['CAConfig'] = ca_config
+
+ if autolock_managers is not None:
+ if version_lt(version, '1.25'):
+ raise InvalidVersion(
+ 'autolock_managers is not supported in API version < 1.25'
+ )
+
+ self['EncryptionConfig'] = {'AutoLockManagers': autolock_managers}
+
+ if log_driver is not None:
+ if version_lt(version, '1.25'):
+ raise InvalidVersion(
+ 'log_driver is not supported in API version < 1.25'
+ )
+
+ self['TaskDefaults'] = {'LogDriver': log_driver}
+
+ if name is not None:
+ self['Name'] = name
+ if labels is not None:
+ self['Labels'] = labels
+
+
+class SwarmExternalCA(dict):
+ """
+ Configuration for forwarding signing requests to an external
+ certificate authority.
+
+ Args:
+ url (string): URL where certificate signing requests should be
+ sent.
+ protocol (string): Protocol for communication with the external CA.
+ options (dict): An object with key/value pairs that are interpreted
+ as protocol-specific options for the external CA driver.
+ ca_cert (string): The root CA certificate (in PEM format) this
+ external CA uses to issue TLS certificates (assumed to be to
+ the current swarm root CA certificate if not provided).
+
+
+
+ """
+ def __init__(self, url, protocol=None, options=None, ca_cert=None):
+ self['URL'] = url
+ self['Protocol'] = protocol
+ self['Options'] = options
+ self['CACert'] = ca_cert
diff --git a/contrib/python/docker/docker/utils/__init__.py b/contrib/python/docker/docker/utils/__init__.py
new file mode 100644
index 00000000000..c086a9f0733
--- /dev/null
+++ b/contrib/python/docker/docker/utils/__init__.py
@@ -0,0 +1,28 @@
+
+from .build import create_archive, exclude_paths, match_tag, mkbuildcontext, tar
+from .decorators import check_resource, minimum_version, update_headers
+from .utils import (
+ compare_version,
+ convert_filters,
+ convert_port_bindings,
+ convert_service_networks,
+ convert_volume_binds,
+ create_host_config,
+ create_ipam_config,
+ create_ipam_pool,
+ datetime_to_timestamp,
+ decode_json_header,
+ format_environment,
+ format_extra_hosts,
+ kwargs_from_env,
+ normalize_links,
+ parse_bytes,
+ parse_devices,
+ parse_env_file,
+ parse_host,
+ parse_repository_tag,
+ split_command,
+ version_gte,
+ version_lt,
+)
+
diff --git a/contrib/python/docker/docker/utils/build.py b/contrib/python/docker/docker/utils/build.py
new file mode 100644
index 00000000000..b8413910446
--- /dev/null
+++ b/contrib/python/docker/docker/utils/build.py
@@ -0,0 +1,260 @@
+import io
+import os
+import re
+import tarfile
+import tempfile
+
+from ..constants import IS_WINDOWS_PLATFORM
+from .fnmatch import fnmatch
+
+_SEP = re.compile('/|\\\\') if IS_WINDOWS_PLATFORM else re.compile('/')
+_TAG = re.compile(
+ r"^[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*"
+ r"(?::[0-9]+)?(/[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*)*"
+ r"(:[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127})?$"
+)
+
+
+def match_tag(tag: str) -> bool:
+ return bool(_TAG.match(tag))
+
+
+def tar(path, exclude=None, dockerfile=None, fileobj=None, gzip=False):
+ root = os.path.abspath(path)
+ exclude = exclude or []
+ dockerfile = dockerfile or (None, None)
+ extra_files = []
+ if dockerfile[1] is not None:
+ dockerignore_contents = '\n'.join(
+ (exclude or ['.dockerignore']) + [dockerfile[0]]
+ )
+ extra_files = [
+ ('.dockerignore', dockerignore_contents),
+ dockerfile,
+ ]
+ return create_archive(
+ files=sorted(exclude_paths(root, exclude, dockerfile=dockerfile[0])),
+ root=root, fileobj=fileobj, gzip=gzip, extra_files=extra_files
+ )
+
+
+def exclude_paths(root, patterns, dockerfile=None):
+ """
+ Given a root directory path and a list of .dockerignore patterns, return
+ an iterator of all paths (both regular files and directories) in the root
+ directory that do *not* match any of the patterns.
+
+ All paths returned are relative to the root.
+ """
+
+ if dockerfile is None:
+ dockerfile = 'Dockerfile'
+
+ patterns.append(f"!{dockerfile}")
+ pm = PatternMatcher(patterns)
+ return set(pm.walk(root))
+
+
+def build_file_list(root):
+ files = []
+ for dirname, dirnames, fnames in os.walk(root):
+ for filename in fnames + dirnames:
+ longpath = os.path.join(dirname, filename)
+ files.append(
+ longpath.replace(root, '', 1).lstrip('/')
+ )
+
+ return files
+
+
+def create_archive(root, files=None, fileobj=None, gzip=False,
+ extra_files=None):
+ extra_files = extra_files or []
+ if not fileobj:
+ fileobj = tempfile.NamedTemporaryFile()
+ t = tarfile.open(mode='w:gz' if gzip else 'w', fileobj=fileobj)
+ if files is None:
+ files = build_file_list(root)
+ extra_names = {e[0] for e in extra_files}
+ for path in files:
+ if path in extra_names:
+ # Extra files override context files with the same name
+ continue
+ full_path = os.path.join(root, path)
+
+ i = t.gettarinfo(full_path, arcname=path)
+ if i is None:
+ # This happens when we encounter a socket file. We can safely
+ # ignore it and proceed.
+ continue
+
+ # Workaround https://bugs.python.org/issue32713
+ if i.mtime < 0 or i.mtime > 8**11 - 1:
+ i.mtime = int(i.mtime)
+
+ if IS_WINDOWS_PLATFORM:
+ # Windows doesn't keep track of the execute bit, so we make files
+ # and directories executable by default.
+ i.mode = i.mode & 0o755 | 0o111
+
+ if i.isfile():
+ try:
+ with open(full_path, 'rb') as f:
+ t.addfile(i, f)
+ except OSError as oe:
+ raise OSError(
+ f'Can not read file in context: {full_path}'
+ ) from oe
+ else:
+ # Directories, FIFOs, symlinks... don't need to be read.
+ t.addfile(i, None)
+
+ for name, contents in extra_files:
+ info = tarfile.TarInfo(name)
+ contents_encoded = contents.encode('utf-8')
+ info.size = len(contents_encoded)
+ t.addfile(info, io.BytesIO(contents_encoded))
+
+ t.close()
+ fileobj.seek(0)
+ return fileobj
+
+
+def mkbuildcontext(dockerfile):
+ f = tempfile.NamedTemporaryFile()
+ t = tarfile.open(mode='w', fileobj=f)
+ if isinstance(dockerfile, io.StringIO):
+ dfinfo = tarfile.TarInfo('Dockerfile')
+ raise TypeError('Please use io.BytesIO to create in-memory '
+ 'Dockerfiles with Python 3')
+ elif isinstance(dockerfile, io.BytesIO):
+ dfinfo = tarfile.TarInfo('Dockerfile')
+ dfinfo.size = len(dockerfile.getvalue())
+ dockerfile.seek(0)
+ else:
+ dfinfo = t.gettarinfo(fileobj=dockerfile, arcname='Dockerfile')
+ t.addfile(dfinfo, dockerfile)
+ t.close()
+ f.seek(0)
+ return f
+
+
+def split_path(p):
+ return [pt for pt in re.split(_SEP, p) if pt and pt != '.']
+
+
+def normalize_slashes(p):
+ if IS_WINDOWS_PLATFORM:
+ return '/'.join(split_path(p))
+ return p
+
+
+def walk(root, patterns, default=True):
+ pm = PatternMatcher(patterns)
+ return pm.walk(root)
+
+
+# Heavily based on
+# https://github.com/moby/moby/blob/master/pkg/fileutils/fileutils.go
+class PatternMatcher:
+ def __init__(self, patterns):
+ self.patterns = list(filter(
+ lambda p: p.dirs, [Pattern(p) for p in patterns]
+ ))
+ self.patterns.append(Pattern('!.dockerignore'))
+
+ def matches(self, filepath):
+ matched = False
+ parent_path = os.path.dirname(filepath)
+ parent_path_dirs = split_path(parent_path)
+
+ for pattern in self.patterns:
+ negative = pattern.exclusion
+ match = pattern.match(filepath)
+ if not match and parent_path != '':
+ if len(pattern.dirs) <= len(parent_path_dirs):
+ match = pattern.match(
+ os.path.sep.join(parent_path_dirs[:len(pattern.dirs)])
+ )
+
+ if match:
+ matched = not negative
+
+ return matched
+
+ def walk(self, root):
+ def rec_walk(current_dir):
+ for f in os.listdir(current_dir):
+ fpath = os.path.join(
+ os.path.relpath(current_dir, root), f
+ )
+ if fpath.startswith(f".{os.path.sep}"):
+ fpath = fpath[2:]
+ match = self.matches(fpath)
+ if not match:
+ yield fpath
+
+ cur = os.path.join(root, fpath)
+ if not os.path.isdir(cur) or os.path.islink(cur):
+ continue
+
+ if match:
+ # If we want to skip this file and it's a directory
+ # then we should first check to see if there's an
+ # excludes pattern (e.g. !dir/file) that starts with this
+ # dir. If so then we can't skip this dir.
+ skip = True
+
+ for pat in self.patterns:
+ if not pat.exclusion:
+ continue
+ if pat.cleaned_pattern.startswith(
+ normalize_slashes(fpath)):
+ skip = False
+ break
+ if skip:
+ continue
+ yield from rec_walk(cur)
+
+ return rec_walk(root)
+
+
+class Pattern:
+ def __init__(self, pattern_str):
+ self.exclusion = False
+ if pattern_str.startswith('!'):
+ self.exclusion = True
+ pattern_str = pattern_str[1:]
+
+ self.dirs = self.normalize(pattern_str)
+ self.cleaned_pattern = '/'.join(self.dirs)
+
+ @classmethod
+ def normalize(cls, p):
+
+ # Remove trailing spaces
+ p = p.strip()
+
+ # Leading and trailing slashes are not relevant. Yes,
+ # "foo.py/" must exclude the "foo.py" regular file. "."
+ # components are not relevant either, even if the whole
+ # pattern is only ".", as the Docker reference states: "For
+ # historical reasons, the pattern . is ignored."
+ # ".." component must be cleared with the potential previous
+ # component, regardless of whether it exists: "A preprocessing
+ # step [...] eliminates . and .. elements using Go's
+ # filepath.".
+ i = 0
+ split = split_path(p)
+ while i < len(split):
+ if split[i] == '..':
+ del split[i]
+ if i > 0:
+ del split[i - 1]
+ i -= 1
+ else:
+ i += 1
+ return split
+
+ def match(self, filepath):
+ return fnmatch(normalize_slashes(filepath), self.cleaned_pattern)
diff --git a/contrib/python/docker/docker/utils/config.py b/contrib/python/docker/docker/utils/config.py
new file mode 100644
index 00000000000..8e24959a5d2
--- /dev/null
+++ b/contrib/python/docker/docker/utils/config.py
@@ -0,0 +1,66 @@
+import json
+import logging
+import os
+
+from ..constants import IS_WINDOWS_PLATFORM
+
+DOCKER_CONFIG_FILENAME = os.path.join('.docker', 'config.json')
+LEGACY_DOCKER_CONFIG_FILENAME = '.dockercfg'
+
+log = logging.getLogger(__name__)
+
+
+def find_config_file(config_path=None):
+ paths = list(filter(None, [
+ config_path, # 1
+ config_path_from_environment(), # 2
+ os.path.join(home_dir(), DOCKER_CONFIG_FILENAME), # 3
+ os.path.join(home_dir(), LEGACY_DOCKER_CONFIG_FILENAME), # 4
+ ]))
+
+ log.debug(f"Trying paths: {repr(paths)}")
+
+ for path in paths:
+ if os.path.exists(path):
+ log.debug(f"Found file at path: {path}")
+ return path
+
+ log.debug("No config file found")
+
+ return None
+
+
+def config_path_from_environment():
+ config_dir = os.environ.get('DOCKER_CONFIG')
+ if not config_dir:
+ return None
+ return os.path.join(config_dir, os.path.basename(DOCKER_CONFIG_FILENAME))
+
+
+def home_dir():
+ """
+ Get the user's home directory, using the same logic as the Docker Engine
+ client - use %USERPROFILE% on Windows, $HOME/getuid on POSIX.
+ """
+ if IS_WINDOWS_PLATFORM:
+ return os.environ.get('USERPROFILE', '')
+ else:
+ return os.path.expanduser('~')
+
+
+def load_general_config(config_path=None):
+ config_file = find_config_file(config_path)
+
+ if not config_file:
+ return {}
+
+ try:
+ with open(config_file) as f:
+ return json.load(f)
+ except (OSError, ValueError) as e:
+ # In the case of a legacy `.dockercfg` file, we won't
+ # be able to load any JSON data.
+ log.debug(e)
+
+ log.debug("All parsing attempts failed - returning empty config")
+ return {}
diff --git a/contrib/python/docker/docker/utils/decorators.py b/contrib/python/docker/docker/utils/decorators.py
new file mode 100644
index 00000000000..5aab98cd46c
--- /dev/null
+++ b/contrib/python/docker/docker/utils/decorators.py
@@ -0,0 +1,45 @@
+import functools
+
+from .. import errors
+from . import utils
+
+
+def check_resource(resource_name):
+ def decorator(f):
+ @functools.wraps(f)
+ def wrapped(self, resource_id=None, *args, **kwargs):
+ if resource_id is None and kwargs.get(resource_name):
+ resource_id = kwargs.pop(resource_name)
+ if isinstance(resource_id, dict):
+ resource_id = resource_id.get('Id', resource_id.get('ID'))
+ if not resource_id:
+ raise errors.NullResource(
+ 'Resource ID was not provided'
+ )
+ return f(self, resource_id, *args, **kwargs)
+ return wrapped
+ return decorator
+
+
+def minimum_version(version):
+ def decorator(f):
+ @functools.wraps(f)
+ def wrapper(self, *args, **kwargs):
+ if utils.version_lt(self._version, version):
+ raise errors.InvalidVersion(
+ f'{f.__name__} is not available for version < {version}',
+ )
+ return f(self, *args, **kwargs)
+ return wrapper
+ return decorator
+
+
+def update_headers(f):
+ def inner(self, *args, **kwargs):
+ if 'HttpHeaders' in self._general_configs:
+ if not kwargs.get('headers'):
+ kwargs['headers'] = self._general_configs['HttpHeaders']
+ else:
+ kwargs['headers'].update(self._general_configs['HttpHeaders'])
+ return f(self, *args, **kwargs)
+ return inner
diff --git a/contrib/python/docker/docker/utils/fnmatch.py b/contrib/python/docker/docker/utils/fnmatch.py
new file mode 100644
index 00000000000..be745381e4c
--- /dev/null
+++ b/contrib/python/docker/docker/utils/fnmatch.py
@@ -0,0 +1,115 @@
+"""Filename matching with shell patterns.
+
+fnmatch(FILENAME, PATTERN) matches according to the local convention.
+fnmatchcase(FILENAME, PATTERN) always takes case in account.
+
+The functions operate by translating the pattern into a regular
+expression. They cache the compiled regular expressions for speed.
+
+The function translate(PATTERN) returns a regular expression
+corresponding to PATTERN. (It does not compile it.)
+"""
+
+import re
+
+__all__ = ["fnmatch", "fnmatchcase", "translate"]
+
+_cache = {}
+_MAXCACHE = 100
+
+
+def _purge():
+ """Clear the pattern cache"""
+ _cache.clear()
+
+
+def fnmatch(name, pat):
+ """Test whether FILENAME matches PATTERN.
+
+ Patterns are Unix shell style:
+
+ * matches everything
+ ? matches any single character
+ [seq] matches any character in seq
+ [!seq] matches any char not in seq
+
+ An initial period in FILENAME is not special.
+ Both FILENAME and PATTERN are first case-normalized
+ if the operating system requires it.
+ If you don't want this, use fnmatchcase(FILENAME, PATTERN).
+ """
+
+ name = name.lower()
+ pat = pat.lower()
+ return fnmatchcase(name, pat)
+
+
+def fnmatchcase(name, pat):
+ """Test whether FILENAME matches PATTERN, including case.
+ This is a version of fnmatch() which doesn't case-normalize
+ its arguments.
+ """
+
+ try:
+ re_pat = _cache[pat]
+ except KeyError:
+ res = translate(pat)
+ if len(_cache) >= _MAXCACHE:
+ _cache.clear()
+ _cache[pat] = re_pat = re.compile(res)
+ return re_pat.match(name) is not None
+
+
+def translate(pat):
+ """Translate a shell PATTERN to a regular expression.
+
+ There is no way to quote meta-characters.
+ """
+ i, n = 0, len(pat)
+ res = '^'
+ while i < n:
+ c = pat[i]
+ i = i + 1
+ if c == '*':
+ if i < n and pat[i] == '*':
+ # is some flavor of "**"
+ i = i + 1
+ # Treat **/ as ** so eat the "/"
+ if i < n and pat[i] == '/':
+ i = i + 1
+ if i >= n:
+ # is "**EOF" - to align with .gitignore just accept all
+ res = f"{res}.*"
+ else:
+ # is "**"
+ # Note that this allows for any # of /'s (even 0) because
+ # the .* will eat everything, even /'s
+ res = f"{res}(.*/)?"
+ else:
+ # is "*" so map it to anything but "/"
+ res = f"{res}[^/]*"
+ elif c == '?':
+ # "?" is any char except "/"
+ res = f"{res}[^/]"
+ elif c == '[':
+ j = i
+ if j < n and pat[j] == '!':
+ j = j + 1
+ if j < n and pat[j] == ']':
+ j = j + 1
+ while j < n and pat[j] != ']':
+ j = j + 1
+ if j >= n:
+ res = f"{res}\\["
+ else:
+ stuff = pat[i:j].replace('\\', '\\\\')
+ i = j + 1
+ if stuff[0] == '!':
+ stuff = f"^{stuff[1:]}"
+ elif stuff[0] == '^':
+ stuff = f"\\{stuff}"
+ res = f'{res}[{stuff}]'
+ else:
+ res = res + re.escape(c)
+
+ return f"{res}$"
diff --git a/contrib/python/docker/docker/utils/json_stream.py b/contrib/python/docker/docker/utils/json_stream.py
new file mode 100644
index 00000000000..41d25920ce2
--- /dev/null
+++ b/contrib/python/docker/docker/utils/json_stream.py
@@ -0,0 +1,74 @@
+import json
+import json.decoder
+
+from ..errors import StreamParseError
+
+json_decoder = json.JSONDecoder()
+
+
+def stream_as_text(stream):
+ """
+ Given a stream of bytes or text, if any of the items in the stream
+ are bytes convert them to text.
+ This function can be removed once we return text streams
+ instead of byte streams.
+ """
+ for data in stream:
+ if not isinstance(data, str):
+ data = data.decode('utf-8', 'replace')
+ yield data
+
+
+def json_splitter(buffer):
+ """Attempt to parse a json object from a buffer. If there is at least one
+ object, return it and the rest of the buffer, otherwise return None.
+ """
+ buffer = buffer.strip()
+ try:
+ obj, index = json_decoder.raw_decode(buffer)
+ rest = buffer[json.decoder.WHITESPACE.match(buffer, index).end():]
+ return obj, rest
+ except ValueError:
+ return None
+
+
+def json_stream(stream):
+ """Given a stream of text, return a stream of json objects.
+ This handles streams which are inconsistently buffered (some entries may
+ be newline delimited, and others are not).
+ """
+ return split_buffer(stream, json_splitter, json_decoder.decode)
+
+
+def line_splitter(buffer, separator='\n'):
+ index = buffer.find(str(separator))
+ if index == -1:
+ return None
+ return buffer[:index + 1], buffer[index + 1:]
+
+
+def split_buffer(stream, splitter=None, decoder=lambda a: a):
+ """Given a generator which yields strings and a splitter function,
+ joins all input, splits on the separator and yields each chunk.
+ Unlike string.split(), each chunk includes the trailing
+ separator, except for the last one if none was found on the end
+ of the input.
+ """
+ splitter = splitter or line_splitter
+ buffered = ''
+
+ for data in stream_as_text(stream):
+ buffered += data
+ while True:
+ buffer_split = splitter(buffered)
+ if buffer_split is None:
+ break
+
+ item, buffered = buffer_split
+ yield item
+
+ if buffered:
+ try:
+ yield decoder(buffered)
+ except Exception as e:
+ raise StreamParseError(e) from e
diff --git a/contrib/python/docker/docker/utils/ports.py b/contrib/python/docker/docker/utils/ports.py
new file mode 100644
index 00000000000..9fd6e8f6b8f
--- /dev/null
+++ b/contrib/python/docker/docker/utils/ports.py
@@ -0,0 +1,83 @@
+import re
+
+PORT_SPEC = re.compile(
+ "^" # Match full string
+ "(" # External part
+ r"(\[?(?P<host>[a-fA-F\d.:]+)\]?:)?" # Address
+ r"(?P<ext>[\d]*)(-(?P<ext_end>[\d]+))?:" # External range
+ ")?"
+ r"(?P<int>[\d]+)(-(?P<int_end>[\d]+))?" # Internal range
+ "(?P<proto>/(udp|tcp|sctp))?" # Protocol
+ "$" # Match full string
+)
+
+
+def add_port_mapping(port_bindings, internal_port, external):
+ if internal_port in port_bindings:
+ port_bindings[internal_port].append(external)
+ else:
+ port_bindings[internal_port] = [external]
+
+
+def add_port(port_bindings, internal_port_range, external_range):
+ if external_range is None:
+ for internal_port in internal_port_range:
+ add_port_mapping(port_bindings, internal_port, None)
+ else:
+ ports = zip(internal_port_range, external_range)
+ for internal_port, external_port in ports:
+ add_port_mapping(port_bindings, internal_port, external_port)
+
+
+def build_port_bindings(ports):
+ port_bindings = {}
+ for port in ports:
+ internal_port_range, external_range = split_port(port)
+ add_port(port_bindings, internal_port_range, external_range)
+ return port_bindings
+
+
+def _raise_invalid_port(port):
+ raise ValueError('Invalid port "%s", should be '
+ '[[remote_ip:]remote_port[-remote_port]:]'
+ 'port[/protocol]' % port)
+
+
+def port_range(start, end, proto, randomly_available_port=False):
+ if not start:
+ return start
+ if not end:
+ return [start + proto]
+ if randomly_available_port:
+ return [f"{start}-{end}{proto}"]
+ return [str(port) + proto for port in range(int(start), int(end) + 1)]
+
+
+def split_port(port):
+ if hasattr(port, 'legacy_repr'):
+ # This is the worst hack, but it prevents a bug in Compose 1.14.0
+ # https://github.com/docker/docker-py/issues/1668
+ # TODO: remove once fixed in Compose stable
+ port = port.legacy_repr()
+ port = str(port)
+ match = PORT_SPEC.match(port)
+ if match is None:
+ _raise_invalid_port(port)
+ parts = match.groupdict()
+
+ host = parts['host']
+ proto = parts['proto'] or ''
+ internal = port_range(parts['int'], parts['int_end'], proto)
+ external = port_range(
+ parts['ext'], parts['ext_end'], '', len(internal) == 1)
+
+ if host is None:
+ if external is not None and len(internal) != len(external):
+ raise ValueError('Port ranges don\'t match in length')
+ return internal, external
+ else:
+ if not external:
+ external = [None] * len(internal)
+ elif len(internal) != len(external):
+ raise ValueError('Port ranges don\'t match in length')
+ return internal, [(host, ext_port) for ext_port in external]
diff --git a/contrib/python/docker/docker/utils/proxy.py b/contrib/python/docker/docker/utils/proxy.py
new file mode 100644
index 00000000000..e7164b6cea2
--- /dev/null
+++ b/contrib/python/docker/docker/utils/proxy.py
@@ -0,0 +1,77 @@
+from .utils import format_environment
+
+
+class ProxyConfig(dict):
+ '''
+ Hold the client's proxy configuration
+ '''
+ @property
+ def http(self):
+ return self.get('http')
+
+ @property
+ def https(self):
+ return self.get('https')
+
+ @property
+ def ftp(self):
+ return self.get('ftp')
+
+ @property
+ def no_proxy(self):
+ return self.get('no_proxy')
+
+ @staticmethod
+ def from_dict(config):
+ '''
+ Instantiate a new ProxyConfig from a dictionary that represents a
+ client configuration, as described in `the documentation`_.
+
+ .. _the documentation:
+ https://docs.docker.com/network/proxy/#configure-the-docker-client
+ '''
+ return ProxyConfig(
+ http=config.get('httpProxy'),
+ https=config.get('httpsProxy'),
+ ftp=config.get('ftpProxy'),
+ no_proxy=config.get('noProxy'),
+ )
+
+ def get_environment(self):
+ '''
+ Return a dictionary representing the environment variables used to
+ set the proxy settings.
+ '''
+ env = {}
+ if self.http:
+ env['http_proxy'] = env['HTTP_PROXY'] = self.http
+ if self.https:
+ env['https_proxy'] = env['HTTPS_PROXY'] = self.https
+ if self.ftp:
+ env['ftp_proxy'] = env['FTP_PROXY'] = self.ftp
+ if self.no_proxy:
+ env['no_proxy'] = env['NO_PROXY'] = self.no_proxy
+ return env
+
+ def inject_proxy_environment(self, environment):
+ '''
+ Given a list of strings representing environment variables, prepend the
+ environment variables corresponding to the proxy settings.
+ '''
+ if not self:
+ return environment
+
+ proxy_env = format_environment(self.get_environment())
+ if not environment:
+ return proxy_env
+ # It is important to prepend our variables, because we want the
+ # variables defined in "environment" to take precedence.
+ return proxy_env + environment
+
+ def __str__(self):
+ return (
+ 'ProxyConfig('
+ f'http={self.http}, https={self.https}, '
+ f'ftp={self.ftp}, no_proxy={self.no_proxy}'
+ ')'
+ )
diff --git a/contrib/python/docker/docker/utils/socket.py b/contrib/python/docker/docker/utils/socket.py
new file mode 100644
index 00000000000..c7cb584d4ff
--- /dev/null
+++ b/contrib/python/docker/docker/utils/socket.py
@@ -0,0 +1,187 @@
+import errno
+import os
+import select
+import socket as pysocket
+import struct
+
+try:
+ from ..transport import NpipeSocket
+except ImportError:
+ NpipeSocket = type(None)
+
+
+STDOUT = 1
+STDERR = 2
+
+
+class SocketError(Exception):
+ pass
+
+
+# NpipeSockets have their own error types
+# pywintypes.error: (109, 'ReadFile', 'The pipe has been ended.')
+NPIPE_ENDED = 109
+
+
+def read(socket, n=4096):
+ """
+ Reads at most n bytes from socket
+ """
+
+ recoverable_errors = (errno.EINTR, errno.EDEADLK, errno.EWOULDBLOCK)
+
+ if not isinstance(socket, NpipeSocket):
+ if not hasattr(select, "poll"):
+ # Limited to 1024
+ select.select([socket], [], [])
+ else:
+ poll = select.poll()
+ poll.register(socket, select.POLLIN | select.POLLPRI)
+ poll.poll()
+
+ try:
+ if hasattr(socket, 'recv'):
+ return socket.recv(n)
+ if isinstance(socket, pysocket.SocketIO):
+ return socket.read(n)
+ return os.read(socket.fileno(), n)
+ except OSError as e:
+ if e.errno not in recoverable_errors:
+ raise
+ except Exception as e:
+ is_pipe_ended = (isinstance(socket, NpipeSocket) and
+ len(e.args) > 0 and
+ e.args[0] == NPIPE_ENDED)
+ if is_pipe_ended:
+ # npipes don't support duplex sockets, so we interpret
+ # a PIPE_ENDED error as a close operation (0-length read).
+ return ''
+ raise
+
+
+def read_exactly(socket, n):
+ """
+ Reads exactly n bytes from socket
+ Raises SocketError if there isn't enough data
+ """
+ data = b""
+ while len(data) < n:
+ next_data = read(socket, n - len(data))
+ if not next_data:
+ raise SocketError("Unexpected EOF")
+ data += next_data
+ return data
+
+
+def next_frame_header(socket):
+ """
+ Returns the stream and size of the next frame of data waiting to be read
+ from socket, according to the protocol defined here:
+
+ https://docs.docker.com/engine/api/v1.24/#attach-to-a-container
+ """
+ try:
+ data = read_exactly(socket, 8)
+ except SocketError:
+ return (-1, -1)
+
+ stream, actual = struct.unpack('>BxxxL', data)
+ return (stream, actual)
+
+
+def frames_iter(socket, tty):
+ """
+ Return a generator of frames read from socket. A frame is a tuple where
+ the first item is the stream number and the second item is a chunk of data.
+
+ If the tty setting is enabled, the streams are multiplexed into the stdout
+ stream.
+ """
+ if tty:
+ return ((STDOUT, frame) for frame in frames_iter_tty(socket))
+ else:
+ return frames_iter_no_tty(socket)
+
+
+def frames_iter_no_tty(socket):
+ """
+ Returns a generator of data read from the socket when the tty setting is
+ not enabled.
+ """
+ while True:
+ (stream, n) = next_frame_header(socket)
+ if n < 0:
+ break
+ while n > 0:
+ result = read(socket, n)
+ if result is None:
+ continue
+ data_length = len(result)
+ if data_length == 0:
+ # We have reached EOF
+ return
+ n -= data_length
+ yield (stream, result)
+
+
+def frames_iter_tty(socket):
+ """
+ Return a generator of data read from the socket when the tty setting is
+ enabled.
+ """
+ while True:
+ result = read(socket)
+ if len(result) == 0:
+ # We have reached EOF
+ return
+ yield result
+
+
+def consume_socket_output(frames, demux=False):
+ """
+ Iterate through frames read from the socket and return the result.
+
+ Args:
+
+ demux (bool):
+ If False, stdout and stderr are multiplexed, and the result is the
+ concatenation of all the frames. If True, the streams are
+ demultiplexed, and the result is a 2-tuple where each item is the
+ concatenation of frames belonging to the same stream.
+ """
+ if demux is False:
+ # If the streams are multiplexed, the generator returns strings, that
+ # we just need to concatenate.
+ return b"".join(frames)
+
+ # If the streams are demultiplexed, the generator yields tuples
+ # (stdout, stderr)
+ out = [None, None]
+ for frame in frames:
+ # It is guaranteed that for each frame, one and only one stream
+ # is not None.
+ assert frame != (None, None)
+ if frame[0] is not None:
+ if out[0] is None:
+ out[0] = frame[0]
+ else:
+ out[0] += frame[0]
+ else:
+ if out[1] is None:
+ out[1] = frame[1]
+ else:
+ out[1] += frame[1]
+ return tuple(out)
+
+
+def demux_adaptor(stream_id, data):
+ """
+ Utility to demultiplex stdout and stderr when reading frames from the
+ socket.
+ """
+ if stream_id == STDOUT:
+ return (data, None)
+ elif stream_id == STDERR:
+ return (None, data)
+ else:
+ raise ValueError(f'{stream_id} is not a valid stream')
diff --git a/contrib/python/docker/docker/utils/utils.py b/contrib/python/docker/docker/utils/utils.py
new file mode 100644
index 00000000000..f36a3afb893
--- /dev/null
+++ b/contrib/python/docker/docker/utils/utils.py
@@ -0,0 +1,517 @@
+import base64
+import collections
+import json
+import os
+import os.path
+import shlex
+import string
+from datetime import datetime, timezone
+from functools import lru_cache
+from itertools import zip_longest
+from urllib.parse import urlparse, urlunparse
+
+from .. import errors
+from ..constants import (
+ BYTE_UNITS,
+ DEFAULT_HTTP_HOST,
+ DEFAULT_NPIPE,
+ DEFAULT_UNIX_SOCKET,
+)
+from ..tls import TLSConfig
+
+URLComponents = collections.namedtuple(
+ 'URLComponents',
+ 'scheme netloc url params query fragment',
+)
+
+
+def create_ipam_pool(*args, **kwargs):
+ raise errors.DeprecatedMethod(
+ 'utils.create_ipam_pool has been removed. Please use a '
+ 'docker.types.IPAMPool object instead.'
+ )
+
+
+def create_ipam_config(*args, **kwargs):
+ raise errors.DeprecatedMethod(
+ 'utils.create_ipam_config has been removed. Please use a '
+ 'docker.types.IPAMConfig object instead.'
+ )
+
+
+def decode_json_header(header):
+ data = base64.b64decode(header)
+ data = data.decode('utf-8')
+ return json.loads(data)
+
+
+@lru_cache(maxsize=None)
+def compare_version(v1, v2):
+ """Compare docker versions
+
+ >>> v1 = '1.9'
+ >>> v2 = '1.10'
+ >>> compare_version(v1, v2)
+ 1
+ >>> compare_version(v2, v1)
+ -1
+ >>> compare_version(v2, v2)
+ 0
+ """
+ if v1 == v2:
+ return 0
+ # Split into `sys.version_info` like tuples.
+ s1 = tuple(int(p) for p in v1.split('.'))
+ s2 = tuple(int(p) for p in v2.split('.'))
+ # Compare each component, padding with 0 if necessary.
+ for c1, c2 in zip_longest(s1, s2, fillvalue=0):
+ if c1 == c2:
+ continue
+ elif c1 > c2:
+ return -1
+ else:
+ return 1
+ return 0
+
+
+def version_lt(v1, v2):
+ return compare_version(v1, v2) > 0
+
+
+def version_gte(v1, v2):
+ return not version_lt(v1, v2)
+
+
+def _convert_port_binding(binding):
+ result = {'HostIp': '', 'HostPort': ''}
+ if isinstance(binding, tuple):
+ if len(binding) == 2:
+ result['HostPort'] = binding[1]
+ result['HostIp'] = binding[0]
+ elif isinstance(binding[0], str):
+ result['HostIp'] = binding[0]
+ else:
+ result['HostPort'] = binding[0]
+ elif isinstance(binding, dict):
+ if 'HostPort' in binding:
+ result['HostPort'] = binding['HostPort']
+ if 'HostIp' in binding:
+ result['HostIp'] = binding['HostIp']
+ else:
+ raise ValueError(binding)
+ else:
+ result['HostPort'] = binding
+
+ if result['HostPort'] is None:
+ result['HostPort'] = ''
+ else:
+ result['HostPort'] = str(result['HostPort'])
+
+ return result
+
+
+def convert_port_bindings(port_bindings):
+ result = {}
+ for k, v in iter(port_bindings.items()):
+ key = str(k)
+ if '/' not in key:
+ key += '/tcp'
+ if isinstance(v, list):
+ result[key] = [_convert_port_binding(binding) for binding in v]
+ else:
+ result[key] = [_convert_port_binding(v)]
+ return result
+
+
+def convert_volume_binds(binds):
+ if isinstance(binds, list):
+ return binds
+
+ result = []
+ for k, v in binds.items():
+ if isinstance(k, bytes):
+ k = k.decode('utf-8')
+
+ if isinstance(v, dict):
+ if 'ro' in v and 'mode' in v:
+ raise ValueError(
+ f'Binding cannot contain both "ro" and "mode": {v!r}'
+ )
+
+ bind = v['bind']
+ if isinstance(bind, bytes):
+ bind = bind.decode('utf-8')
+
+ if 'ro' in v:
+ mode = 'ro' if v['ro'] else 'rw'
+ elif 'mode' in v:
+ mode = v['mode']
+ else:
+ mode = 'rw'
+
+ # NOTE: this is only relevant for Linux hosts
+ # (doesn't apply in Docker Desktop)
+ propagation_modes = [
+ 'rshared',
+ 'shared',
+ 'rslave',
+ 'slave',
+ 'rprivate',
+ 'private',
+ ]
+ if 'propagation' in v and v['propagation'] in propagation_modes:
+ if mode:
+ mode = f"{mode},{v['propagation']}"
+ else:
+ mode = v['propagation']
+
+ result.append(
+ f'{k}:{bind}:{mode}'
+ )
+ else:
+ if isinstance(v, bytes):
+ v = v.decode('utf-8')
+ result.append(
+ f'{k}:{v}:rw'
+ )
+ return result
+
+
+def convert_tmpfs_mounts(tmpfs):
+ if isinstance(tmpfs, dict):
+ return tmpfs
+
+ if not isinstance(tmpfs, list):
+ raise ValueError(
+ 'Expected tmpfs value to be either a list or a dict, '
+ f'found: {type(tmpfs).__name__}'
+ )
+
+ result = {}
+ for mount in tmpfs:
+ if isinstance(mount, str):
+ if ":" in mount:
+ name, options = mount.split(":", 1)
+ else:
+ name = mount
+ options = ""
+
+ else:
+ raise ValueError(
+ "Expected item in tmpfs list to be a string, "
+ f"found: {type(mount).__name__}"
+ )
+
+ result[name] = options
+ return result
+
+
+def convert_service_networks(networks):
+ if not networks:
+ return networks
+ if not isinstance(networks, list):
+ raise TypeError('networks parameter must be a list.')
+
+ result = []
+ for n in networks:
+ if isinstance(n, str):
+ n = {'Target': n}
+ result.append(n)
+ return result
+
+
+def parse_repository_tag(repo_name):
+ parts = repo_name.rsplit('@', 1)
+ if len(parts) == 2:
+ return tuple(parts)
+ parts = repo_name.rsplit(':', 1)
+ if len(parts) == 2 and '/' not in parts[1]:
+ return tuple(parts)
+ return repo_name, None
+
+
+def parse_host(addr, is_win32=False, tls=False):
+ # Sensible defaults
+ if not addr and is_win32:
+ return DEFAULT_NPIPE
+ if not addr or addr.strip() == 'unix://':
+ return DEFAULT_UNIX_SOCKET
+
+ addr = addr.strip()
+
+ parsed_url = urlparse(addr)
+ proto = parsed_url.scheme
+ if not proto or any(x not in f"{string.ascii_letters}+" for x in proto):
+ # https://bugs.python.org/issue754016
+ parsed_url = urlparse(f"//{addr}", 'tcp')
+ proto = 'tcp'
+
+ if proto == 'fd':
+ raise errors.DockerException('fd protocol is not implemented')
+
+ # These protos are valid aliases for our library but not for the
+ # official spec
+ if proto == 'http' or proto == 'https':
+ tls = proto == 'https'
+ proto = 'tcp'
+ elif proto == 'http+unix':
+ proto = 'unix'
+
+ if proto not in ('tcp', 'unix', 'npipe', 'ssh'):
+ raise errors.DockerException(
+ f"Invalid bind address protocol: {addr}"
+ )
+
+ if proto == 'tcp' and not parsed_url.netloc:
+ # "tcp://" is exceptionally disallowed by convention;
+ # omitting a hostname for other protocols is fine
+ raise errors.DockerException(
+ f'Invalid bind address format: {addr}'
+ )
+
+ if any([
+ parsed_url.params, parsed_url.query, parsed_url.fragment,
+ parsed_url.password
+ ]):
+ raise errors.DockerException(
+ f'Invalid bind address format: {addr}'
+ )
+
+ if parsed_url.path and proto == 'ssh':
+ raise errors.DockerException(
+ f'Invalid bind address format: no path allowed for this protocol: {addr}'
+ )
+ else:
+ path = parsed_url.path
+ if proto == 'unix' and parsed_url.hostname is not None:
+ # For legacy reasons, we consider unix://path
+ # to be valid and equivalent to unix:///path
+ path = f"{parsed_url.hostname}/{path}"
+
+ netloc = parsed_url.netloc
+ if proto in ('tcp', 'ssh'):
+ port = parsed_url.port or 0
+ if port <= 0:
+ if proto != 'ssh':
+ raise errors.DockerException(
+ f'Invalid bind address format: port is required: {addr}'
+ )
+ port = 22
+ netloc = f'{parsed_url.netloc}:{port}'
+
+ if not parsed_url.hostname:
+ netloc = f'{DEFAULT_HTTP_HOST}:{port}'
+
+ # Rewrite schemes to fit library internals (requests adapters)
+ if proto == 'tcp':
+ proto = f"http{'s' if tls else ''}"
+ elif proto == 'unix':
+ proto = 'http+unix'
+
+ if proto in ('http+unix', 'npipe'):
+ return f"{proto}://{path}".rstrip('/')
+
+ return urlunparse(URLComponents(
+ scheme=proto,
+ netloc=netloc,
+ url=path,
+ params='',
+ query='',
+ fragment='',
+ )).rstrip('/')
+
+
+def parse_devices(devices):
+ device_list = []
+ for device in devices:
+ if isinstance(device, dict):
+ device_list.append(device)
+ continue
+ if not isinstance(device, str):
+ raise errors.DockerException(
+ f'Invalid device type {type(device)}'
+ )
+ device_mapping = device.split(':')
+ if device_mapping:
+ path_on_host = device_mapping[0]
+ if len(device_mapping) > 1:
+ path_in_container = device_mapping[1]
+ else:
+ path_in_container = path_on_host
+ if len(device_mapping) > 2:
+ permissions = device_mapping[2]
+ else:
+ permissions = 'rwm'
+ device_list.append({
+ 'PathOnHost': path_on_host,
+ 'PathInContainer': path_in_container,
+ 'CgroupPermissions': permissions
+ })
+ return device_list
+
+
+def kwargs_from_env(environment=None):
+ if not environment:
+ environment = os.environ
+ host = environment.get('DOCKER_HOST')
+
+ # empty string for cert path is the same as unset.
+ cert_path = environment.get('DOCKER_CERT_PATH') or None
+
+ # empty string for tls verify counts as "false".
+ # Any value or 'unset' counts as true.
+ tls_verify = environment.get('DOCKER_TLS_VERIFY')
+ if tls_verify == '':
+ tls_verify = False
+ else:
+ tls_verify = tls_verify is not None
+ enable_tls = cert_path or tls_verify
+
+ params = {}
+
+ if host:
+ params['base_url'] = host
+
+ if not enable_tls:
+ return params
+
+ if not cert_path:
+ cert_path = os.path.join(os.path.expanduser('~'), '.docker')
+
+ params['tls'] = TLSConfig(
+ client_cert=(os.path.join(cert_path, 'cert.pem'),
+ os.path.join(cert_path, 'key.pem')),
+ ca_cert=os.path.join(cert_path, 'ca.pem'),
+ verify=tls_verify,
+ )
+
+ return params
+
+
+def convert_filters(filters):
+ result = {}
+ for k, v in iter(filters.items()):
+ if isinstance(v, bool):
+ v = 'true' if v else 'false'
+ if not isinstance(v, list):
+ v = [v, ]
+ result[k] = [
+ str(item) if not isinstance(item, str) else item
+ for item in v
+ ]
+ return json.dumps(result)
+
+
+def datetime_to_timestamp(dt):
+ """Convert a datetime to a Unix timestamp"""
+ delta = dt.astimezone(timezone.utc) - datetime(1970, 1, 1, tzinfo=timezone.utc)
+ return delta.seconds + delta.days * 24 * 3600
+
+
+def parse_bytes(s):
+ if isinstance(s, (int, float,)):
+ return s
+ if len(s) == 0:
+ return 0
+
+ if s[-2:-1].isalpha() and s[-1].isalpha():
+ if s[-1] == "b" or s[-1] == "B":
+ s = s[:-1]
+ units = BYTE_UNITS
+ suffix = s[-1].lower()
+
+ # Check if the variable is a string representation of an int
+ # without a units part. Assuming that the units are bytes.
+ if suffix.isdigit():
+ digits_part = s
+ suffix = 'b'
+ else:
+ digits_part = s[:-1]
+
+ if suffix in units.keys() or suffix.isdigit():
+ try:
+ digits = float(digits_part)
+ except ValueError as ve:
+ raise errors.DockerException(
+ 'Failed converting the string value for memory '
+ f'({digits_part}) to an integer.'
+ ) from ve
+
+ # Reconvert to long for the final result
+ s = int(digits * units[suffix])
+ else:
+ raise errors.DockerException(
+ f'The specified value for memory ({s}) should specify the units. '
+ 'The postfix should be one of the `b` `k` `m` `g` characters'
+ )
+
+ return s
+
+
+def normalize_links(links):
+ if isinstance(links, dict):
+ links = iter(links.items())
+
+ return [f'{k}:{v}' if v else k for k, v in sorted(links)]
+
+
+def parse_env_file(env_file):
+ """
+ Reads a line-separated environment file.
+ The format of each line should be "key=value".
+ """
+ environment = {}
+
+ with open(env_file) as f:
+ for line in f:
+
+ if line[0] == '#':
+ continue
+
+ line = line.strip()
+ if not line:
+ continue
+
+ parse_line = line.split('=', 1)
+ if len(parse_line) == 2:
+ k, v = parse_line
+ environment[k] = v
+ else:
+ raise errors.DockerException(
+ f'Invalid line in environment file {env_file}:\n{line}')
+
+ return environment
+
+
+def split_command(command):
+ return shlex.split(command)
+
+
+def format_environment(environment):
+ def format_env(key, value):
+ if value is None:
+ return key
+ if isinstance(value, bytes):
+ value = value.decode('utf-8')
+
+ return f'{key}={value}'
+ return [format_env(*var) for var in iter(environment.items())]
+
+
+def format_extra_hosts(extra_hosts, task=False):
+ # Use format dictated by Swarm API if container is part of a task
+ if task:
+ return [
+ f'{v} {k}' for k, v in sorted(iter(extra_hosts.items()))
+ ]
+
+ return [
+ f'{k}:{v}' for k, v in sorted(iter(extra_hosts.items()))
+ ]
+
+
+def create_host_config(self, *args, **kwargs):
+ raise errors.DeprecatedMethod(
+ 'utils.create_host_config has been removed. Please use a '
+ 'docker.types.HostConfig object instead.'
+ )
diff --git a/contrib/python/docker/docker/version.py b/contrib/python/docker/docker/version.py
new file mode 100644
index 00000000000..72b12b84dfe
--- /dev/null
+++ b/contrib/python/docker/docker/version.py
@@ -0,0 +1,8 @@
+try:
+ from ._version import __version__
+except ImportError:
+ from importlib.metadata import PackageNotFoundError, version
+ try:
+ __version__ = version('docker')
+ except PackageNotFoundError:
+ __version__ = '0.0.0'
diff --git a/contrib/python/docker/ya.make b/contrib/python/docker/ya.make
new file mode 100644
index 00000000000..5dbd794e305
--- /dev/null
+++ b/contrib/python/docker/ya.make
@@ -0,0 +1,99 @@
+# Generated by devtools/yamaker (pypi).
+
+PY3_LIBRARY()
+
+VERSION(7.1.0)
+
+LICENSE(Apache-2.0)
+
+PEERDIR(
+ contrib/python/requests
+ contrib/python/urllib3
+)
+
+NO_LINT()
+
+NO_CHECK_IMPORTS(
+ docker.transport.npipeconn
+ docker.transport.npipesocket
+ docker.transport.sshconn
+)
+
+PY_SRCS(
+ TOP_LEVEL
+ docker/__init__.py
+ docker/_version.py
+ docker/api/__init__.py
+ docker/api/build.py
+ docker/api/client.py
+ docker/api/config.py
+ docker/api/container.py
+ docker/api/daemon.py
+ docker/api/exec_api.py
+ docker/api/image.py
+ docker/api/network.py
+ docker/api/plugin.py
+ docker/api/secret.py
+ docker/api/service.py
+ docker/api/swarm.py
+ docker/api/volume.py
+ docker/auth.py
+ docker/client.py
+ docker/constants.py
+ docker/context/__init__.py
+ docker/context/api.py
+ docker/context/config.py
+ docker/context/context.py
+ docker/credentials/__init__.py
+ docker/credentials/constants.py
+ docker/credentials/errors.py
+ docker/credentials/store.py
+ docker/credentials/utils.py
+ docker/errors.py
+ docker/models/__init__.py
+ docker/models/configs.py
+ docker/models/containers.py
+ docker/models/images.py
+ docker/models/networks.py
+ docker/models/nodes.py
+ docker/models/plugins.py
+ docker/models/resource.py
+ docker/models/secrets.py
+ docker/models/services.py
+ docker/models/swarm.py
+ docker/models/volumes.py
+ docker/tls.py
+ docker/transport/__init__.py
+ docker/transport/basehttpadapter.py
+ docker/transport/npipeconn.py
+ docker/transport/npipesocket.py
+ docker/transport/sshconn.py
+ docker/transport/unixconn.py
+ docker/types/__init__.py
+ docker/types/base.py
+ docker/types/containers.py
+ docker/types/daemon.py
+ docker/types/healthcheck.py
+ docker/types/networks.py
+ docker/types/services.py
+ docker/types/swarm.py
+ docker/utils/__init__.py
+ docker/utils/build.py
+ docker/utils/config.py
+ docker/utils/decorators.py
+ docker/utils/fnmatch.py
+ docker/utils/json_stream.py
+ docker/utils/ports.py
+ docker/utils/proxy.py
+ docker/utils/socket.py
+ docker/utils/utils.py
+ docker/version.py
+)
+
+RESOURCE_FILES(
+ PREFIX contrib/python/docker/
+ .dist-info/METADATA
+ .dist-info/top_level.txt
+)
+
+END()
diff --git a/contrib/python/google-auth/py3/.dist-info/METADATA b/contrib/python/google-auth/py3/.dist-info/METADATA
index e0785656a45..d8ad54493ad 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
Name: google-auth
-Version: 2.29.0
+Version: 2.30.0
Summary: Google Authentication Library
Home-page: https://github.com/googleapis/google-auth-library-python
Author: Google Cloud Platform
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 c14001bc2b1..3943de2a342 100644
--- a/contrib/python/google-auth/py3/google/auth/external_account.py
+++ b/contrib/python/google-auth/py3/google/auth/external_account.py
@@ -52,7 +52,7 @@ _STS_REQUESTED_TOKEN_TYPE = "urn:ietf:params:oauth:token-type:access_token"
# Cloud resource manager URL used to retrieve project information.
_CLOUD_RESOURCE_MANAGER = "https://cloudresourcemanager.googleapis.com/v1/projects/"
# Default Google sts token url.
-_DEFAULT_TOKEN_URL = "https://sts.googleapis.com/v1/token"
+_DEFAULT_TOKEN_URL = "https://sts.{universe_domain}/v1/token"
@dataclass
@@ -147,7 +147,12 @@ class Credentials(
super(Credentials, self).__init__()
self._audience = audience
self._subject_token_type = subject_token_type
+ self._universe_domain = universe_domain
self._token_url = token_url
+ if self._token_url == _DEFAULT_TOKEN_URL:
+ self._token_url = self._token_url.replace(
+ "{universe_domain}", self._universe_domain
+ )
self._token_info_url = token_info_url
self._credential_source = credential_source
self._service_account_impersonation_url = service_account_impersonation_url
@@ -160,7 +165,6 @@ class Credentials(
self._scopes = scopes
self._default_scopes = default_scopes
self._workforce_pool_user_project = workforce_pool_user_project
- self._universe_domain = universe_domain or credentials.DEFAULT_UNIVERSE_DOMAIN
self._trust_boundary = {
"locations": [],
"encoded_locations": "0x0",
diff --git a/contrib/python/google-auth/py3/google/auth/iam.py b/contrib/python/google-auth/py3/google/auth/iam.py
index e9df8441781..bba1624c164 100644
--- a/contrib/python/google-auth/py3/google/auth/iam.py
+++ b/contrib/python/google-auth/py3/google/auth/iam.py
@@ -27,8 +27,23 @@ from google.auth import _helpers
from google.auth import crypt
from google.auth import exceptions
-_IAM_API_ROOT_URI = "https://iamcredentials.googleapis.com/v1"
-_SIGN_BLOB_URI = _IAM_API_ROOT_URI + "/projects/-/serviceAccounts/{}:signBlob?alt=json"
+
+_IAM_SCOPE = ["https://www.googleapis.com/auth/iam"]
+
+_IAM_ENDPOINT = (
+ "https://iamcredentials.googleapis.com/v1/projects/-"
+ + "/serviceAccounts/{}:generateAccessToken"
+)
+
+_IAM_SIGN_ENDPOINT = (
+ "https://iamcredentials.googleapis.com/v1/projects/-"
+ + "/serviceAccounts/{}:signBlob"
+)
+
+_IAM_IDTOKEN_ENDPOINT = (
+ "https://iamcredentials.googleapis.com/v1/"
+ + "projects/-/serviceAccounts/{}:generateIdToken"
+)
class Signer(crypt.Signer):
@@ -67,7 +82,7 @@ class Signer(crypt.Signer):
message = _helpers.to_bytes(message)
method = "POST"
- url = _SIGN_BLOB_URI.format(self._service_account_email)
+ url = _IAM_SIGN_ENDPOINT.format(self._service_account_email)
headers = {"Content-Type": "application/json"}
body = json.dumps(
{"payload": base64.b64encode(message).decode("utf-8")}
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 a9ec5773346..1c97885a4ab 100644
--- a/contrib/python/google-auth/py3/google/auth/identity_pool.py
+++ b/contrib/python/google-auth/py3/google/auth/identity_pool.py
@@ -39,7 +39,7 @@ try:
from collections.abc import Mapping
# Python 2.7 compatibility
except ImportError: # pragma: NO COVER
- from collections import Mapping
+ from collections import Mapping # type: ignore
import abc
import json
import os
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 d32e6eb69a5..3c6f8712a9b 100644
--- a/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py
+++ b/contrib/python/google-auth/py3/google/auth/impersonated_credentials.py
@@ -34,32 +34,15 @@ import json
from google.auth import _helpers
from google.auth import credentials
from google.auth import exceptions
+from google.auth import iam
from google.auth import jwt
from google.auth import metrics
-_IAM_SCOPE = ["https://www.googleapis.com/auth/iam"]
-
-_IAM_ENDPOINT = (
- "https://iamcredentials.googleapis.com/v1/projects/-"
- + "/serviceAccounts/{}:generateAccessToken"
-)
-
-_IAM_SIGN_ENDPOINT = (
- "https://iamcredentials.googleapis.com/v1/projects/-"
- + "/serviceAccounts/{}:signBlob"
-)
-
-_IAM_IDTOKEN_ENDPOINT = (
- "https://iamcredentials.googleapis.com/v1/"
- + "projects/-/serviceAccounts/{}:generateIdToken"
-)
_REFRESH_ERROR = "Unable to acquire impersonated credentials"
_DEFAULT_TOKEN_LIFETIME_SECS = 3600 # 1 hour in seconds
-_DEFAULT_TOKEN_URI = "https://oauth2.googleapis.com/token"
-
def _make_iam_token_request(
request, principal, headers, body, iam_endpoint_override=None
@@ -83,7 +66,7 @@ def _make_iam_token_request(
`iamcredentials.googleapis.com` is not enabled or the
`Service Account Token Creator` is not assigned
"""
- iam_endpoint = iam_endpoint_override or _IAM_ENDPOINT.format(principal)
+ iam_endpoint = iam_endpoint_override or iam._IAM_ENDPOINT.format(principal)
body = json.dumps(body).encode("utf-8")
@@ -225,7 +208,9 @@ class Credentials(
# added to refresh correctly. User credentials cannot have
# their original scopes modified.
if isinstance(self._source_credentials, credentials.Scoped):
- self._source_credentials = self._source_credentials.with_scopes(_IAM_SCOPE)
+ self._source_credentials = self._source_credentials.with_scopes(
+ iam._IAM_SCOPE
+ )
# If the source credential is service account and self signed jwt
# is needed, we need to create a jwt credential inside it
if (
@@ -290,7 +275,7 @@ class Credentials(
def sign_bytes(self, message):
from google.auth.transport.requests import AuthorizedSession
- iam_sign_endpoint = _IAM_SIGN_ENDPOINT.format(self._target_principal)
+ iam_sign_endpoint = iam._IAM_SIGN_ENDPOINT.format(self._target_principal)
body = {
"payload": base64.b64encode(message).decode("utf-8"),
@@ -425,7 +410,7 @@ class IDTokenCredentials(credentials.CredentialsWithQuotaProject):
def refresh(self, request):
from google.auth.transport.requests import AuthorizedSession
- iam_sign_endpoint = _IAM_IDTOKEN_ENDPOINT.format(
+ iam_sign_endpoint = iam._IAM_IDTOKEN_ENDPOINT.format(
self._target_credentials.signer_email
)
diff --git a/contrib/python/google-auth/py3/google/auth/pluggable.py b/contrib/python/google-auth/py3/google/auth/pluggable.py
index 53b4eac5b4c..d725188f87a 100644
--- a/contrib/python/google-auth/py3/google/auth/pluggable.py
+++ b/contrib/python/google-auth/py3/google/auth/pluggable.py
@@ -34,7 +34,7 @@ try:
from collections.abc import Mapping
# Python 2.7 compatibility
except ImportError: # pragma: NO COVER
- from collections import Mapping
+ from collections import Mapping # type: ignore
import json
import os
import subprocess
diff --git a/contrib/python/google-auth/py3/google/auth/py.typed b/contrib/python/google-auth/py3/google/auth/py.typed
new file mode 100644
index 00000000000..e1ab889b3a1
--- /dev/null
+++ b/contrib/python/google-auth/py3/google/auth/py.typed
@@ -0,0 +1,2 @@
+# Marker file for PEP 561.
+# The google-auth package uses inline types.
diff --git a/contrib/python/google-auth/py3/google/auth/transport/_custom_tls_signer.py b/contrib/python/google-auth/py3/google/auth/transport/_custom_tls_signer.py
index 57a563d03bd..9279158d45c 100644
--- a/contrib/python/google-auth/py3/google/auth/transport/_custom_tls_signer.py
+++ b/contrib/python/google-auth/py3/google/auth/transport/_custom_tls_signer.py
@@ -46,10 +46,17 @@ SIGN_CALLBACK_CTYPE = ctypes.CFUNCTYPE(
# Cast SSL_CTX* to void*
-def _cast_ssl_ctx_to_void_p(ssl_ctx):
+def _cast_ssl_ctx_to_void_p_pyopenssl(ssl_ctx):
return ctypes.cast(int(cffi.FFI().cast("intptr_t", ssl_ctx)), ctypes.c_void_p)
+# Cast SSL_CTX* to void*
+def _cast_ssl_ctx_to_void_p_stdlib(context):
+ return ctypes.c_void_p.from_address(
+ id(context) + ctypes.sizeof(ctypes.c_void_p) * 2
+ )
+
+
# Load offload library and set up the function types.
def load_offload_lib(offload_lib_path):
_LOGGER.debug("loading offload library from %s", offload_lib_path)
@@ -249,10 +256,15 @@ class CustomTlsSigner(object):
self._signer_lib, self._enterprise_cert_file_path
)
- def attach_to_ssl_context(self, ctx):
+ def should_use_provider(self):
if self._provider_lib:
+ return True
+ return False
+
+ def attach_to_ssl_context(self, ctx):
+ if self.should_use_provider():
if not self._provider_lib.ECP_attach_to_ctx(
- _cast_ssl_ctx_to_void_p(ctx._ctx._context),
+ _cast_ssl_ctx_to_void_p_stdlib(ctx),
self._enterprise_cert_file_path.encode("ascii"),
):
raise exceptions.MutualTLSChannelError(
@@ -262,7 +274,7 @@ class CustomTlsSigner(object):
if not self._offload_lib.ConfigureSslContext(
self._sign_callback,
ctypes.c_char_p(self._cert),
- _cast_ssl_ctx_to_void_p(ctx._ctx._context),
+ _cast_ssl_ctx_to_void_p_pyopenssl(ctx._ctx._context),
):
raise exceptions.MutualTLSChannelError(
"failed to configure ECP Offload SSL context"
diff --git a/contrib/python/google-auth/py3/google/auth/transport/requests.py b/contrib/python/google-auth/py3/google/auth/transport/requests.py
index aa161132262..63a2b4596c4 100644
--- a/contrib/python/google-auth/py3/google/auth/transport/requests.py
+++ b/contrib/python/google-auth/py3/google/auth/transport/requests.py
@@ -262,19 +262,16 @@ class _MutualTlsOffloadAdapter(requests.adapters.HTTPAdapter):
def __init__(self, enterprise_cert_file_path):
import certifi
- import urllib3.contrib.pyopenssl
-
from google.auth.transport import _custom_tls_signer
- # Call inject_into_urllib3 to activate certificate checking. See the
- # following links for more info:
- # (1) doc: https://github.com/urllib3/urllib3/blob/cb9ebf8aac5d75f64c8551820d760b72b619beff/src/urllib3/contrib/pyopenssl.py#L31-L32
- # (2) mTLS example: https://github.com/urllib3/urllib3/issues/474#issuecomment-253168415
- urllib3.contrib.pyopenssl.inject_into_urllib3()
-
self.signer = _custom_tls_signer.CustomTlsSigner(enterprise_cert_file_path)
self.signer.load_libraries()
+ if not self.signer.should_use_provider():
+ import urllib3.contrib.pyopenssl
+
+ urllib3.contrib.pyopenssl.inject_into_urllib3()
+
poolmanager = create_urllib3_context()
poolmanager.load_verify_locations(cafile=certifi.where())
self.signer.attach_to_ssl_context(poolmanager)
diff --git a/contrib/python/google-auth/py3/google/auth/version.py b/contrib/python/google-auth/py3/google/auth/version.py
index f0dd919dca6..0800489978c 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.29.0"
+__version__ = "2.30.0"
diff --git a/contrib/python/google-auth/py3/google/oauth2/_client.py b/contrib/python/google-auth/py3/google/oauth2/_client.py
index d2af6c8aa85..bce797b88bb 100644
--- a/contrib/python/google-auth/py3/google/oauth2/_client.py
+++ b/contrib/python/google-auth/py3/google/oauth2/_client.py
@@ -39,10 +39,6 @@ _URLENCODED_CONTENT_TYPE = "application/x-www-form-urlencoded"
_JSON_CONTENT_TYPE = "application/json"
_JWT_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:jwt-bearer"
_REFRESH_GRANT_TYPE = "refresh_token"
-_IAM_IDTOKEN_ENDPOINT = (
- "https://iamcredentials.googleapis.com/v1/"
- + "projects/-/serviceAccounts/{}:generateIdToken"
-)
def _handle_error_response(response_data, retryable_error):
@@ -328,12 +324,15 @@ def jwt_grant(request, token_uri, assertion, can_retry=True):
return access_token, expiry, response_data
-def call_iam_generate_id_token_endpoint(request, signer_email, audience, access_token):
+def call_iam_generate_id_token_endpoint(
+ request, iam_id_token_endpoint, signer_email, audience, access_token
+):
"""Call iam.generateIdToken endpoint to get ID token.
Args:
request (google.auth.transport.Request): A callable used to make
HTTP requests.
+ iam_id_token_endpoint (str): The IAM ID token endpoint to use.
signer_email (str): The signer email used to form the IAM
generateIdToken endpoint.
audience (str): The audience for the ID token.
@@ -346,7 +345,7 @@ def call_iam_generate_id_token_endpoint(request, signer_email, audience, access_
response_data = _token_endpoint_request(
request,
- _IAM_IDTOKEN_ENDPOINT.format(signer_email),
+ iam_id_token_endpoint.format(signer_email),
body,
access_token=access_token,
use_json=True,
diff --git a/contrib/python/google-auth/py3/google/oauth2/challenges.py b/contrib/python/google-auth/py3/google/oauth2/challenges.py
index c55796323ba..6468498bcb6 100644
--- a/contrib/python/google-auth/py3/google/oauth2/challenges.py
+++ b/contrib/python/google-auth/py3/google/oauth2/challenges.py
@@ -22,12 +22,19 @@ import sys
from google.auth import _helpers
from google.auth import exceptions
+from google.oauth2 import webauthn_handler_factory
+from google.oauth2.webauthn_types import (
+ AuthenticationExtensionsClientInputs,
+ GetRequest,
+ PublicKeyCredentialDescriptor,
+)
REAUTH_ORIGIN = "https://accounts.google.com"
SAML_CHALLENGE_MESSAGE = (
"Please run `gcloud auth login` to complete reauthentication with SAML."
)
+WEBAUTHN_TIMEOUT_MS = 120000 # Two minute timeout
def get_user_password(text):
@@ -110,6 +117,17 @@ class SecurityKeyChallenge(ReauthChallenge):
@_helpers.copy_docstring(ReauthChallenge)
def obtain_challenge_input(self, metadata):
+ # Check if there is an available Webauthn Handler, if not use pyu2f
+ try:
+ factory = webauthn_handler_factory.WebauthnHandlerFactory()
+ webauthn_handler = factory.get_handler()
+ if webauthn_handler is not None:
+ sys.stderr.write("Please insert and touch your security key\n")
+ return self._obtain_challenge_input_webauthn(metadata, webauthn_handler)
+ except Exception:
+ # Attempt pyu2f if exception in webauthn flow
+ pass
+
try:
import pyu2f.convenience.authenticator # type: ignore
import pyu2f.errors # type: ignore
@@ -173,6 +191,66 @@ class SecurityKeyChallenge(ReauthChallenge):
sys.stderr.write("No security key found.\n")
return None
+ def _obtain_challenge_input_webauthn(self, metadata, webauthn_handler):
+ sk = metadata.get("securityKey")
+ if sk is None:
+ raise exceptions.InvalidValue("securityKey is None")
+ challenges = sk.get("challenges")
+ application_id = sk.get("applicationId")
+ relying_party_id = sk.get("relyingPartyId")
+ if challenges is None or len(challenges) < 1:
+ raise exceptions.InvalidValue("challenges is None or empty")
+ if application_id is None:
+ raise exceptions.InvalidValue("application_id is None")
+ if relying_party_id is None:
+ raise exceptions.InvalidValue("relying_party_id is None")
+
+ allow_credentials = []
+ for challenge in challenges:
+ kh = challenge.get("keyHandle")
+ if kh is None:
+ raise exceptions.InvalidValue("keyHandle is None")
+ key_handle = self._unpadded_urlsafe_b64recode(kh)
+ allow_credentials.append(PublicKeyCredentialDescriptor(id=key_handle))
+
+ extension = AuthenticationExtensionsClientInputs(appid=application_id)
+
+ challenge = challenges[0].get("challenge")
+ if challenge is None:
+ raise exceptions.InvalidValue("challenge is None")
+
+ get_request = GetRequest(
+ origin=REAUTH_ORIGIN,
+ rpid=relying_party_id,
+ challenge=self._unpadded_urlsafe_b64recode(challenge),
+ timeout_ms=WEBAUTHN_TIMEOUT_MS,
+ allow_credentials=allow_credentials,
+ user_verification="required",
+ extensions=extension,
+ )
+
+ try:
+ get_response = webauthn_handler.get(get_request)
+ except Exception as e:
+ sys.stderr.write("Webauthn Error: {}.\n".format(e))
+ raise e
+
+ response = {
+ "clientData": get_response.response.client_data_json,
+ "authenticatorData": get_response.response.authenticator_data,
+ "signatureData": get_response.response.signature,
+ "applicationId": application_id,
+ "keyHandle": get_response.id,
+ "securityKeyReplyType": 2,
+ }
+ return {"securityKey": response}
+
+ def _unpadded_urlsafe_b64recode(self, s):
+ """Converts standard b64 encoded string to url safe b64 encoded string
+ with no padding."""
+ b = base64.urlsafe_b64decode(s)
+ return base64.urlsafe_b64encode(b).decode().rstrip("=")
+
class SamlChallenge(ReauthChallenge):
"""Challenge that asks the users to browse to their ID Providers.
diff --git a/contrib/python/google-auth/py3/google/oauth2/py.typed b/contrib/python/google-auth/py3/google/oauth2/py.typed
new file mode 100644
index 00000000000..aedf18e4b64
--- /dev/null
+++ b/contrib/python/google-auth/py3/google/oauth2/py.typed
@@ -0,0 +1,2 @@
+# Marker file for PEP 561.
+# The google-oauth2 package uses inline types.
diff --git a/contrib/python/google-auth/py3/google/oauth2/reauth.py b/contrib/python/google-auth/py3/google/oauth2/reauth.py
index 5870347739b..1e39e0bc7f4 100644
--- a/contrib/python/google-auth/py3/google/oauth2/reauth.py
+++ b/contrib/python/google-auth/py3/google/oauth2/reauth.py
@@ -274,6 +274,7 @@ def get_rapt_token(
# Get rapt token from reauth API.
rapt_token = _obtain_rapt(request, access_token, requested_scopes=scopes)
+ sys.stderr.write("Reauthentication successful.\n")
return rapt_token
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 04fd7797ada..0e12868f14b 100644
--- a/contrib/python/google-auth/py3/google/oauth2/service_account.py
+++ b/contrib/python/google-auth/py3/google/oauth2/service_account.py
@@ -77,6 +77,7 @@ from google.auth import _helpers
from google.auth import _service_account_info
from google.auth import credentials
from google.auth import exceptions
+from google.auth import iam
from google.auth import jwt
from google.auth import metrics
from google.oauth2 import _client
@@ -595,8 +596,11 @@ class IDTokenCredentials(
self._universe_domain = credentials.DEFAULT_UNIVERSE_DOMAIN
else:
self._universe_domain = universe_domain
+ self._iam_id_token_endpoint = iam._IAM_IDTOKEN_ENDPOINT.replace(
+ "googleapis.com", self._universe_domain
+ )
- if universe_domain != credentials.DEFAULT_UNIVERSE_DOMAIN:
+ if self._universe_domain != credentials.DEFAULT_UNIVERSE_DOMAIN:
self._use_iam_endpoint = True
if additional_claims is not None:
@@ -792,6 +796,7 @@ class IDTokenCredentials(
jwt_credentials.refresh(request)
self.token, self.expiry = _client.call_iam_generate_id_token_endpoint(
request,
+ self._iam_id_token_endpoint,
self.signer_email,
self._target_audience,
jwt_credentials.token.decode(),
diff --git a/contrib/python/google-auth/py3/google/oauth2/webauthn_handler.py b/contrib/python/google-auth/py3/google/oauth2/webauthn_handler.py
new file mode 100644
index 00000000000..e27c7e09900
--- /dev/null
+++ b/contrib/python/google-auth/py3/google/oauth2/webauthn_handler.py
@@ -0,0 +1,82 @@
+import abc
+import os
+import struct
+import subprocess
+
+from google.auth import exceptions
+from google.oauth2.webauthn_types import GetRequest, GetResponse
+
+
+class WebAuthnHandler(abc.ABC):
+ @abc.abstractmethod
+ def is_available(self) -> bool:
+ """Check whether this WebAuthn handler is available"""
+ raise NotImplementedError("is_available method must be implemented")
+
+ @abc.abstractmethod
+ def get(self, get_request: GetRequest) -> GetResponse:
+ """WebAuthn get (assertion)"""
+ raise NotImplementedError("get method must be implemented")
+
+
+class PluginHandler(WebAuthnHandler):
+ """Offloads WebAuthn get reqeust to a pluggable command-line tool.
+
+ Offloads WebAuthn get to a plugin which takes the form of a
+ command-line tool. The command-line tool is configurable via the
+ PluginHandler._ENV_VAR environment variable.
+
+ The WebAuthn plugin should implement the following interface:
+
+ Communication occurs over stdin/stdout, and messages are both sent and
+ received in the form:
+
+ [4 bytes - payload size (little-endian)][variable bytes - json payload]
+ """
+
+ _ENV_VAR = "GOOGLE_AUTH_WEBAUTHN_PLUGIN"
+
+ def is_available(self) -> bool:
+ try:
+ self._find_plugin()
+ except Exception:
+ return False
+ else:
+ return True
+
+ def get(self, get_request: GetRequest) -> GetResponse:
+ request_json = get_request.to_json()
+ cmd = self._find_plugin()
+ response_json = self._call_plugin(cmd, request_json)
+ return GetResponse.from_json(response_json)
+
+ def _call_plugin(self, cmd: str, input_json: str) -> str:
+ # Calculate length of input
+ input_length = len(input_json)
+ length_bytes_le = struct.pack("<I", input_length)
+ request = length_bytes_le + input_json.encode()
+
+ # Call plugin
+ process_result = subprocess.run(
+ [cmd], input=request, capture_output=True, check=True
+ )
+
+ # Check length of response
+ response_len_le = process_result.stdout[:4]
+ response_len = struct.unpack("<I", response_len_le)[0]
+ response = process_result.stdout[4:]
+ if response_len != len(response):
+ raise exceptions.MalformedError(
+ "Plugin response length {} does not match data {}".format(
+ response_len, len(response)
+ )
+ )
+ return response.decode()
+
+ def _find_plugin(self) -> str:
+ plugin_cmd = os.environ.get(PluginHandler._ENV_VAR)
+ if plugin_cmd is None:
+ raise exceptions.InvalidResource(
+ "{} env var is not set".format(PluginHandler._ENV_VAR)
+ )
+ return plugin_cmd
diff --git a/contrib/python/google-auth/py3/google/oauth2/webauthn_handler_factory.py b/contrib/python/google-auth/py3/google/oauth2/webauthn_handler_factory.py
new file mode 100644
index 00000000000..184329fed7e
--- /dev/null
+++ b/contrib/python/google-auth/py3/google/oauth2/webauthn_handler_factory.py
@@ -0,0 +1,16 @@
+from typing import List, Optional
+
+from google.oauth2.webauthn_handler import PluginHandler, WebAuthnHandler
+
+
+class WebauthnHandlerFactory:
+ handlers: List[WebAuthnHandler]
+
+ def __init__(self):
+ self.handlers = [PluginHandler()]
+
+ def get_handler(self) -> Optional[WebAuthnHandler]:
+ for handler in self.handlers:
+ if handler.is_available():
+ return handler
+ return None
diff --git a/contrib/python/google-auth/py3/google/oauth2/webauthn_types.py b/contrib/python/google-auth/py3/google/oauth2/webauthn_types.py
new file mode 100644
index 00000000000..7784e83d0b9
--- /dev/null
+++ b/contrib/python/google-auth/py3/google/oauth2/webauthn_types.py
@@ -0,0 +1,156 @@
+from dataclasses import dataclass
+import json
+from typing import Any, Dict, List, Optional
+
+from google.auth import exceptions
+
+
+@dataclass(frozen=True)
+class PublicKeyCredentialDescriptor:
+ """Descriptor for a security key based credential.
+
+ https://www.w3.org/TR/webauthn-3/#dictionary-credential-descriptor
+
+ Args:
+ id: <url-safe base64-encoded> credential id (key handle).
+ transports: <'usb'|'nfc'|'ble'|'internal'> List of supported transports.
+ """
+
+ id: str
+ transports: Optional[List[str]] = None
+
+ def to_dict(self):
+ cred = {"type": "public-key", "id": self.id}
+ if self.transports:
+ cred["transports"] = self.transports
+ return cred
+
+
+@dataclass
+class AuthenticationExtensionsClientInputs:
+ """Client extensions inputs for WebAuthn extensions.
+
+ Args:
+ appid: app id that can be asserted with in addition to rpid.
+ https://www.w3.org/TR/webauthn-3/#sctn-appid-extension
+ """
+
+ appid: Optional[str] = None
+
+ def to_dict(self):
+ extensions = {}
+ if self.appid:
+ extensions["appid"] = self.appid
+ return extensions
+
+
+@dataclass
+class GetRequest:
+ """WebAuthn get request
+
+ Args:
+ origin: Origin where the WebAuthn get assertion takes place.
+ rpid: Relying Party ID.
+ challenge: <url-safe base64-encoded> raw challenge.
+ timeout_ms: Timeout number in millisecond.
+ allow_credentials: List of allowed credentials.
+ user_verification: <'required'|'preferred'|'discouraged'> User verification requirement.
+ extensions: WebAuthn authentication extensions inputs.
+ """
+
+ origin: str
+ rpid: str
+ challenge: str
+ timeout_ms: Optional[int] = None
+ allow_credentials: Optional[List[PublicKeyCredentialDescriptor]] = None
+ user_verification: Optional[str] = None
+ extensions: Optional[AuthenticationExtensionsClientInputs] = None
+
+ def to_json(self) -> str:
+ req_options: Dict[str, Any] = {"rpid": self.rpid, "challenge": self.challenge}
+ if self.timeout_ms:
+ req_options["timeout"] = self.timeout_ms
+ if self.allow_credentials:
+ req_options["allowCredentials"] = [
+ c.to_dict() for c in self.allow_credentials
+ ]
+ if self.user_verification:
+ req_options["userVerification"] = self.user_verification
+ if self.extensions:
+ req_options["extensions"] = self.extensions.to_dict()
+ return json.dumps(
+ {"type": "get", "origin": self.origin, "requestData": req_options}
+ )
+
+
+@dataclass(frozen=True)
+class AuthenticatorAssertionResponse:
+ """Authenticator response to a WebAuthn get (assertion) request.
+
+ https://www.w3.org/TR/webauthn-3/#authenticatorassertionresponse
+
+ Args:
+ client_data_json: <url-safe base64-encoded> client data JSON.
+ authenticator_data: <url-safe base64-encoded> authenticator data.
+ signature: <url-safe base64-encoded> signature.
+ user_handle: <url-safe base64-encoded> user handle.
+ """
+
+ client_data_json: str
+ authenticator_data: str
+ signature: str
+ user_handle: Optional[str]
+
+
+@dataclass(frozen=True)
+class GetResponse:
+ """WebAuthn get (assertion) response.
+
+ Args:
+ id: <url-safe base64-encoded> credential id (key handle).
+ response: The authenticator assertion response.
+ authenticator_attachment: <'cross-platform'|'platform'> The attachment status of the authenticator.
+ client_extension_results: WebAuthn authentication extensions output results in a dictionary.
+ """
+
+ id: str
+ response: AuthenticatorAssertionResponse
+ authenticator_attachment: Optional[str]
+ client_extension_results: Optional[Dict]
+
+ @staticmethod
+ def from_json(json_str: str):
+ """Verify and construct GetResponse from a JSON string."""
+ try:
+ resp_json = json.loads(json_str)
+ except ValueError:
+ raise exceptions.MalformedError("Invalid Get JSON response")
+ if resp_json.get("type") != "getResponse":
+ raise exceptions.MalformedError(
+ "Invalid Get response type: {}".format(resp_json.get("type"))
+ )
+ pk_cred = resp_json.get("responseData")
+ if pk_cred is None:
+ if resp_json.get("error"):
+ raise exceptions.ReauthFailError(
+ "WebAuthn.get failure: {}".format(resp_json["error"])
+ )
+ else:
+ raise exceptions.MalformedError("Get response is empty")
+ if pk_cred.get("type") != "public-key":
+ raise exceptions.MalformedError(
+ "Invalid credential type: {}".format(pk_cred.get("type"))
+ )
+ assertion_json = pk_cred["response"]
+ assertion_resp = AuthenticatorAssertionResponse(
+ client_data_json=assertion_json["clientDataJSON"],
+ authenticator_data=assertion_json["authenticatorData"],
+ signature=assertion_json["signature"],
+ user_handle=assertion_json.get("userHandle"),
+ )
+ return GetResponse(
+ id=pk_cred["id"],
+ response=assertion_resp,
+ authenticator_attachment=pk_cred.get("authenticatorAttachment"),
+ client_extension_results=pk_cred.get("clientExtensionResults"),
+ )
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 9cca317924e..bb29f8c6e2b 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
@@ -499,7 +499,7 @@ class TestIDTokenCredentials(object):
responses.add(
responses.POST,
"https://iamcredentials.googleapis.com/v1/projects/-/"
- "serviceAccounts/[email protected]:signBlob?alt=json",
+ "serviceAccounts/[email protected]:signBlob",
status=200,
content_type="application/json",
json={"keyId": "some-key-id", "signedBlob": signature},
@@ -657,7 +657,7 @@ class TestIDTokenCredentials(object):
responses.add(
responses.POST,
"https://iamcredentials.googleapis.com/v1/projects/-/"
- "serviceAccounts/[email protected]:signBlob?alt=json",
+ "serviceAccounts/[email protected]:signBlob",
status=200,
content_type="application/json",
json={"keyId": "some-key-id", "signedBlob": signature},
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 444232f3967..f9a2d3aff49 100644
--- a/contrib/python/google-auth/py3/tests/oauth2/test__client.py
+++ b/contrib/python/google-auth/py3/tests/oauth2/test__client.py
@@ -24,6 +24,7 @@ import pytest # type: ignore
from google.auth import _helpers
from google.auth import crypt
from google.auth import exceptions
+from google.auth import iam
from google.auth import jwt
from google.auth import transport
from google.oauth2 import _client
@@ -319,7 +320,11 @@ def test_call_iam_generate_id_token_endpoint():
request = make_request({"token": id_token})
token, expiry = _client.call_iam_generate_id_token_endpoint(
- request, "fake_email", "fake_audience", "fake_access_token"
+ request,
+ iam._IAM_IDTOKEN_ENDPOINT,
+ "fake_email",
+ "fake_audience",
+ "fake_access_token",
)
assert (
@@ -352,7 +357,11 @@ def test_call_iam_generate_id_token_endpoint_no_id_token():
with pytest.raises(exceptions.RefreshError) as excinfo:
_client.call_iam_generate_id_token_endpoint(
- request, "fake_email", "fake_audience", "fake_access_token"
+ request,
+ iam._IAM_IDTOKEN_ENDPOINT,
+ "fake_email",
+ "fake_audience",
+ "fake_access_token",
)
assert excinfo.match("No ID token in response")
diff --git a/contrib/python/google-auth/py3/tests/oauth2/test_challenges.py b/contrib/python/google-auth/py3/tests/oauth2/test_challenges.py
index a06f5528377..4116b913abd 100644
--- a/contrib/python/google-auth/py3/tests/oauth2/test_challenges.py
+++ b/contrib/python/google-auth/py3/tests/oauth2/test_challenges.py
@@ -15,6 +15,7 @@
"""Tests for the reauth module."""
import base64
+import os
import sys
import mock
@@ -23,6 +24,13 @@ import pyu2f # type: ignore
from google.auth import exceptions
from google.oauth2 import challenges
+from google.oauth2.webauthn_types import (
+ AuthenticationExtensionsClientInputs,
+ AuthenticatorAssertionResponse,
+ GetRequest,
+ GetResponse,
+ PublicKeyCredentialDescriptor,
+)
def test_get_user_password():
@@ -54,6 +62,8 @@ def test_security_key():
# Test the case that security key challenge is passed with applicationId and
# relyingPartyId the same.
+ os.environ.pop('"GOOGLE_AUTH_WEBAUTHN_PLUGIN"', None)
+
with mock.patch("pyu2f.model.RegisteredKey", return_value=mock_key):
with mock.patch(
"pyu2f.convenience.authenticator.CompositeAuthenticator.Authenticate"
@@ -70,6 +80,19 @@ def test_security_key():
print_callback=sys.stderr.write,
)
+ # Test the case that webauthn plugin is available
+ os.environ["GOOGLE_AUTH_WEBAUTHN_PLUGIN"] = "plugin"
+
+ with mock.patch(
+ "google.oauth2.challenges.SecurityKeyChallenge._obtain_challenge_input_webauthn",
+ return_value={"securityKey": "security key response"},
+ ):
+
+ assert challenge.obtain_challenge_input(metadata) == {
+ "securityKey": "security key response"
+ }
+ os.environ.pop('"GOOGLE_AUTH_WEBAUTHN_PLUGIN"', None)
+
# Test the case that security key challenge is passed with applicationId and
# relyingPartyId different, first call works.
metadata["securityKey"]["relyingPartyId"] = "security_key_relying_party_id"
@@ -173,6 +196,136 @@ def test_security_key():
assert excinfo.match(r"pyu2f dependency is required")
+def test_security_key_webauthn():
+ metadata = {
+ "status": "READY",
+ "challengeId": 2,
+ "challengeType": "SECURITY_KEY",
+ "securityKey": {
+ "applicationId": "security_key_application_id",
+ "challenges": [
+ {
+ "keyHandle": "some_key",
+ "challenge": base64.urlsafe_b64encode(
+ "some_challenge".encode("ascii")
+ ).decode("ascii"),
+ }
+ ],
+ "relyingPartyId": "security_key_application_id",
+ },
+ }
+
+ challenge = challenges.SecurityKeyChallenge()
+
+ sk = metadata["securityKey"]
+ sk_challenges = sk["challenges"]
+
+ application_id = sk["applicationId"]
+
+ allow_credentials = []
+ for sk_challenge in sk_challenges:
+ allow_credentials.append(
+ PublicKeyCredentialDescriptor(id=sk_challenge["keyHandle"])
+ )
+
+ extension = AuthenticationExtensionsClientInputs(appid=application_id)
+
+ get_request = GetRequest(
+ origin=challenges.REAUTH_ORIGIN,
+ rpid=application_id,
+ challenge=challenge._unpadded_urlsafe_b64recode(sk_challenge["challenge"]),
+ timeout_ms=challenges.WEBAUTHN_TIMEOUT_MS,
+ allow_credentials=allow_credentials,
+ user_verification="required",
+ extensions=extension,
+ )
+
+ assertion_resp = AuthenticatorAssertionResponse(
+ client_data_json="clientDataJSON",
+ authenticator_data="authenticatorData",
+ signature="signature",
+ user_handle="userHandle",
+ )
+ get_response = GetResponse(
+ id="id",
+ response=assertion_resp,
+ authenticator_attachment="authenticatorAttachment",
+ client_extension_results="clientExtensionResults",
+ )
+ response = {
+ "clientData": get_response.response.client_data_json,
+ "authenticatorData": get_response.response.authenticator_data,
+ "signatureData": get_response.response.signature,
+ "applicationId": "security_key_application_id",
+ "keyHandle": get_response.id,
+ "securityKeyReplyType": 2,
+ }
+
+ mock_handler = mock.Mock()
+ mock_handler.get.return_value = get_response
+
+ # Test success case
+ assert challenge._obtain_challenge_input_webauthn(metadata, mock_handler) == {
+ "securityKey": response
+ }
+ mock_handler.get.assert_called_with(get_request)
+
+ # Test exceptions
+
+ # Missing Values
+ sk = metadata["securityKey"]
+ metadata["securityKey"] = None
+ with pytest.raises(exceptions.InvalidValue):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+ metadata["securityKey"] = sk
+
+ c = metadata["securityKey"]["challenges"]
+ metadata["securityKey"]["challenges"] = None
+ with pytest.raises(exceptions.InvalidValue):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+ metadata["securityKey"]["challenges"] = []
+ with pytest.raises(exceptions.InvalidValue):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+ metadata["securityKey"]["challenges"] = c
+
+ aid = metadata["securityKey"]["applicationId"]
+ metadata["securityKey"]["applicationId"] = None
+ with pytest.raises(exceptions.InvalidValue):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+ metadata["securityKey"]["applicationId"] = aid
+
+ rpi = metadata["securityKey"]["relyingPartyId"]
+ metadata["securityKey"]["relyingPartyId"] = None
+ with pytest.raises(exceptions.InvalidValue):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+ metadata["securityKey"]["relyingPartyId"] = rpi
+
+ kh = metadata["securityKey"]["challenges"][0]["keyHandle"]
+ metadata["securityKey"]["challenges"][0]["keyHandle"] = None
+ with pytest.raises(exceptions.InvalidValue):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+ metadata["securityKey"]["challenges"][0]["keyHandle"] = kh
+
+ ch = metadata["securityKey"]["challenges"][0]["challenge"]
+ metadata["securityKey"]["challenges"][0]["challenge"] = None
+ with pytest.raises(exceptions.InvalidValue):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+ metadata["securityKey"]["challenges"][0]["challenge"] = ch
+
+ # Handler Exceptions
+ mock_handler.get.side_effect = exceptions.MalformedError
+ with pytest.raises(exceptions.MalformedError):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+
+ mock_handler.get.side_effect = exceptions.InvalidResource
+ with pytest.raises(exceptions.InvalidResource):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+
+ mock_handler.get.side_effect = exceptions.ReauthFailError
+ with pytest.raises(exceptions.ReauthFailError):
+ challenge._obtain_challenge_input_webauthn(metadata, mock_handler)
+
+
@mock.patch("getpass.getpass", return_value="foo")
def test_password_challenge(getpass_mock):
challenge = challenges.PasswordChallenge()
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 ce0c72fa0ab..0dbe316a0f4 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
@@ -22,6 +22,7 @@ import pytest # type: ignore
from google.auth import _helpers
from google.auth import crypt
from google.auth import exceptions
+from google.auth import iam
from google.auth import jwt
from google.auth import transport
from google.auth.credentials import DEFAULT_UNIVERSE_DOMAIN
@@ -772,10 +773,36 @@ class TestIDTokenCredentials(object):
)
request = mock.Mock()
credentials.refresh(request)
- req, signer_email, target_audience, access_token = call_iam_generate_id_token_endpoint.call_args[
+ req, iam_endpoint, signer_email, target_audience, access_token = call_iam_generate_id_token_endpoint.call_args[
0
]
assert req == request
+ assert iam_endpoint == iam._IAM_IDTOKEN_ENDPOINT
+ assert signer_email == "[email protected]"
+ assert target_audience == "https://example.com"
+ decoded_access_token = jwt.decode(access_token, verify=False)
+ assert decoded_access_token["scope"] == "https://www.googleapis.com/auth/iam"
+
+ @mock.patch(
+ "google.oauth2._client.call_iam_generate_id_token_endpoint", autospec=True
+ )
+ def test_refresh_iam_flow_non_gdu(self, call_iam_generate_id_token_endpoint):
+ credentials = self.make_credentials(universe_domain="fake-universe")
+ token = "id_token"
+ call_iam_generate_id_token_endpoint.return_value = (
+ token,
+ _helpers.utcnow() + datetime.timedelta(seconds=500),
+ )
+ request = mock.Mock()
+ credentials.refresh(request)
+ req, iam_endpoint, signer_email, target_audience, access_token = call_iam_generate_id_token_endpoint.call_args[
+ 0
+ ]
+ assert req == request
+ assert (
+ iam_endpoint
+ == "https://iamcredentials.fake-universe/v1/projects/-/serviceAccounts/{}:generateIdToken"
+ )
assert signer_email == "[email protected]"
assert target_audience == "https://example.com"
decoded_access_token = jwt.decode(access_token, verify=False)
diff --git a/contrib/python/google-auth/py3/tests/oauth2/test_webauthn_handler.py b/contrib/python/google-auth/py3/tests/oauth2/test_webauthn_handler.py
new file mode 100644
index 00000000000..454e97cb61d
--- /dev/null
+++ b/contrib/python/google-auth/py3/tests/oauth2/test_webauthn_handler.py
@@ -0,0 +1,148 @@
+import json
+import struct
+
+import mock
+import pytest # type: ignore
+
+from google.auth import exceptions
+from google.oauth2 import webauthn_handler
+from google.oauth2 import webauthn_types
+
+
+def os_get_stub():
+ with mock.patch.object(
+ webauthn_handler.os.environ,
+ "get",
+ return_value="gcloud_webauthn_plugin",
+ name="fake os.environ.get",
+ ) as mock_os_environ_get:
+ yield mock_os_environ_get
+
+
+def subprocess_run_stub():
+ with mock.patch.object(
+ webauthn_handler.subprocess, "run", name="fake subprocess.run"
+ ) as mock_subprocess_run:
+ yield mock_subprocess_run
+
+
+def test_PluginHandler_is_available(os_get_stub):
+ test_handler = webauthn_handler.PluginHandler()
+
+ assert test_handler.is_available() is True
+
+ os_get_stub.return_value = None
+ assert test_handler.is_available() is False
+
+
+GET_ASSERTION_REQUEST = webauthn_types.GetRequest(
+ origin="fake_origin",
+ rpid="fake_rpid",
+ challenge="fake_challenge",
+ allow_credentials=[webauthn_types.PublicKeyCredentialDescriptor(id="fake_id_1")],
+)
+
+
+def test_malformated_get_assertion_response(os_get_stub, subprocess_run_stub):
+ response_len = struct.pack("<I", 5)
+ response = "1234567890"
+ mock_response = mock.Mock()
+ mock_response.stdout = response_len + response.encode()
+ subprocess_run_stub.return_value = mock_response
+
+ test_handler = webauthn_handler.PluginHandler()
+ with pytest.raises(exceptions.MalformedError) as excinfo:
+ test_handler.get(GET_ASSERTION_REQUEST)
+ assert "Plugin response length" in str(excinfo.value)
+
+
+def test_failure_get_assertion(os_get_stub, subprocess_run_stub):
+ failure_response = {
+ "type": "getResponse",
+ "error": "fake_plugin_get_assertion_failure",
+ }
+ response_json = json.dumps(failure_response).encode()
+ response_len = struct.pack("<I", len(response_json))
+
+ # process returns get response in json
+ mock_response = mock.Mock()
+ mock_response.stdout = response_len + response_json
+ subprocess_run_stub.return_value = mock_response
+
+ test_handler = webauthn_handler.PluginHandler()
+ with pytest.raises(exceptions.ReauthFailError) as excinfo:
+ test_handler.get(GET_ASSERTION_REQUEST)
+ assert failure_response["error"] in str(excinfo.value)
+
+
+def test_success_get_assertion(os_get_stub, subprocess_run_stub):
+ success_response = {
+ "type": "public-key",
+ "id": "fake-id",
+ "authenticatorAttachment": "cross-platform",
+ "clientExtensionResults": {"appid": True},
+ "response": {
+ "clientDataJSON": "fake_client_data_json_base64",
+ "authenticatorData": "fake_authenticator_data_base64",
+ "signature": "fake_signature_base64",
+ "userHandle": "fake_user_handle_base64",
+ },
+ }
+ valid_plugin_response = {"type": "getResponse", "responseData": success_response}
+ valid_plugin_response_json = json.dumps(valid_plugin_response).encode()
+ valid_plugin_response_len = struct.pack("<I", len(valid_plugin_response_json))
+
+ # process returns get response in json
+ mock_response = mock.Mock()
+ mock_response.stdout = valid_plugin_response_len + valid_plugin_response_json
+ subprocess_run_stub.return_value = mock_response
+
+ # Call get()
+ test_handler = webauthn_handler.PluginHandler()
+ got_response = test_handler.get(GET_ASSERTION_REQUEST)
+
+ # Validate expected plugin request
+ os_get_stub.assert_called_once()
+ subprocess_run_stub.assert_called_once()
+
+ stdin_input = subprocess_run_stub.call_args.kwargs["input"]
+ input_json_len_le = stdin_input[:4]
+ input_json_len = struct.unpack("<I", input_json_len_le)[0]
+ input_json = stdin_input[4:]
+ assert len(input_json) == input_json_len
+
+ input_dict = json.loads(input_json.decode("utf8"))
+ assert input_dict == {
+ "type": "get",
+ "origin": "fake_origin",
+ "requestData": {
+ "rpid": "fake_rpid",
+ "challenge": "fake_challenge",
+ "allowCredentials": [{"type": "public-key", "id": "fake_id_1"}],
+ },
+ }
+
+ # Validate get assertion response
+ assert got_response.id == success_response["id"]
+ assert (
+ got_response.authenticator_attachment
+ == success_response["authenticatorAttachment"]
+ )
+ assert (
+ got_response.client_extension_results
+ == success_response["clientExtensionResults"]
+ )
+ assert (
+ got_response.response.client_data_json
+ == success_response["response"]["clientDataJSON"]
+ )
+ assert (
+ got_response.response.authenticator_data
+ == success_response["response"]["authenticatorData"]
+ )
+ assert got_response.response.signature == success_response["response"]["signature"]
+ assert (
+ got_response.response.user_handle == success_response["response"]["userHandle"]
+ )
diff --git a/contrib/python/google-auth/py3/tests/oauth2/test_webauthn_handler_factory.py b/contrib/python/google-auth/py3/tests/oauth2/test_webauthn_handler_factory.py
new file mode 100644
index 00000000000..47890ce4b46
--- /dev/null
+++ b/contrib/python/google-auth/py3/tests/oauth2/test_webauthn_handler_factory.py
@@ -0,0 +1,29 @@
+import mock
+import pytest # type: ignore
+
+from google.oauth2 import webauthn_handler
+from google.oauth2 import webauthn_handler_factory
+
+
+def os_get_stub():
+ with mock.patch.object(
+ webauthn_handler.os.environ,
+ "get",
+ return_value="gcloud_webauthn_plugin",
+ name="fake os.environ.get",
+ ) as mock_os_environ_get:
+ yield mock_os_environ_get
+
+
+# Check that get_handler returns a value when env is set,
+# that type is PluginHandler, and that no value is returned
+# if env not set.
+def test_WebauthHandlerFactory_get(os_get_stub):
+ factory = webauthn_handler_factory.WebauthnHandlerFactory()
+ assert factory.get_handler() is not None
+
+ assert isinstance(factory.get_handler(), webauthn_handler.PluginHandler)
+
+ os_get_stub.return_value = None
+ assert factory.get_handler() is None
diff --git a/contrib/python/google-auth/py3/tests/oauth2/test_webauthn_types.py b/contrib/python/google-auth/py3/tests/oauth2/test_webauthn_types.py
new file mode 100644
index 00000000000..5231d21896a
--- /dev/null
+++ b/contrib/python/google-auth/py3/tests/oauth2/test_webauthn_types.py
@@ -0,0 +1,237 @@
+import json
+
+import pytest # type: ignore
+
+from google.oauth2 import webauthn_types
+
+
+ "test_pub_key_cred,expected_dict",
+ [
+ (
+ webauthn_types.PublicKeyCredentialDescriptor(
+ id="fake_cred_id_base64", transports=None
+ ),
+ {"type": "public-key", "id": "fake_cred_id_base64"},
+ ),
+ (
+ webauthn_types.PublicKeyCredentialDescriptor(
+ id="fake_cred_id_base64", transports=[]
+ ),
+ {"type": "public-key", "id": "fake_cred_id_base64"},
+ ),
+ (
+ webauthn_types.PublicKeyCredentialDescriptor(
+ id="fake_cred_id_base64", transports=["usb"]
+ ),
+ {"type": "public-key", "id": "fake_cred_id_base64", "transports": ["usb"]},
+ ),
+ (
+ webauthn_types.PublicKeyCredentialDescriptor(
+ id="fake_cred_id_base64", transports=["usb", "internal"]
+ ),
+ {
+ "type": "public-key",
+ "id": "fake_cred_id_base64",
+ "transports": ["usb", "internal"],
+ },
+ ),
+ ],
+)
+def test_PublicKeyCredentialDescriptor(test_pub_key_cred, expected_dict):
+ assert test_pub_key_cred.to_dict() == expected_dict
+
+
+ "test_extension_input,expected_dict",
+ [
+ (webauthn_types.AuthenticationExtensionsClientInputs(), {}),
+ (webauthn_types.AuthenticationExtensionsClientInputs(appid=""), {}),
+ (
+ webauthn_types.AuthenticationExtensionsClientInputs(appid="fake_appid"),
+ {"appid": "fake_appid"},
+ ),
+ ],
+)
+def test_AuthenticationExtensionsClientInputs(test_extension_input, expected_dict):
+ assert test_extension_input.to_dict() == expected_dict
+
+
[email protected]("has_allow_credentials", [(False), (True)])
+def test_GetRequest(has_allow_credentials):
+ allow_credentials = [
+ webauthn_types.PublicKeyCredentialDescriptor(id="fake_id_1"),
+ webauthn_types.PublicKeyCredentialDescriptor(id="fake_id_2"),
+ ]
+ test_get_request = webauthn_types.GetRequest(
+ origin="fake_origin",
+ rpid="fake_rpid",
+ challenge="fake_challenge",
+ timeout_ms=123,
+ allow_credentials=allow_credentials if has_allow_credentials else None,
+ user_verification="preferred",
+ extensions=webauthn_types.AuthenticationExtensionsClientInputs(
+ appid="fake_appid"
+ ),
+ )
+ expected_allow_credentials = [
+ {"type": "public-key", "id": "fake_id_1"},
+ {"type": "public-key", "id": "fake_id_2"},
+ ]
+ exepcted_dict = {
+ "type": "get",
+ "origin": "fake_origin",
+ "requestData": {
+ "rpid": "fake_rpid",
+ "timeout": 123,
+ "challenge": "fake_challenge",
+ "userVerification": "preferred",
+ "extensions": {"appid": "fake_appid"},
+ },
+ }
+ if has_allow_credentials:
+ exepcted_dict["requestData"]["allowCredentials"] = expected_allow_credentials
+ assert json.loads(test_get_request.to_json()) == exepcted_dict
+
+
+ "has_user_handle,has_authenticator_attachment,has_client_extension_results",
+ [
+ (False, False, False),
+ (False, False, True),
+ (False, True, False),
+ (False, True, True),
+ (True, False, False),
+ (True, False, True),
+ (True, True, False),
+ (True, True, True),
+ ],
+)
+def test_GetResponse(
+ has_user_handle, has_authenticator_attachment, has_client_extension_results
+):
+ input_response_data = {
+ "type": "public-key",
+ "id": "fake-id",
+ "authenticatorAttachment": "cross-platform",
+ "clientExtensionResults": {"appid": True},
+ "response": {
+ "clientDataJSON": "fake_client_data_json_base64",
+ "authenticatorData": "fake_authenticator_data_base64",
+ "signature": "fake_signature_base64",
+ "userHandle": "fake_user_handle_base64",
+ },
+ }
+ if not has_authenticator_attachment:
+ input_response_data.pop("authenticatorAttachment")
+ if not has_client_extension_results:
+ input_response_data.pop("clientExtensionResults")
+ if not has_user_handle:
+ input_response_data["response"].pop("userHandle")
+
+ response = webauthn_types.GetResponse.from_json(
+ json.dumps({"type": "getResponse", "responseData": input_response_data})
+ )
+
+ assert response.id == input_response_data["id"]
+ assert response.authenticator_attachment == (
+ input_response_data["authenticatorAttachment"]
+ if has_authenticator_attachment
+ else None
+ )
+ assert response.client_extension_results == (
+ input_response_data["clientExtensionResults"]
+ if has_client_extension_results
+ else None
+ )
+ assert (
+ response.response.client_data_json
+ == input_response_data["response"]["clientDataJSON"]
+ )
+ assert (
+ response.response.authenticator_data
+ == input_response_data["response"]["authenticatorData"]
+ )
+ assert response.response.signature == input_response_data["response"]["signature"]
+ assert response.response.user_handle == (
+ input_response_data["response"]["userHandle"] if has_user_handle else None
+ )
+
+
+ "input_dict,expected_error",
+ [
+ ({"xyz_type": "wrong_type"}, "Invalid Get response type"),
+ ({"type": "wrong_type"}, "Invalid Get response type"),
+ ({"type": "getResponse"}, "Get response is empty"),
+ (
+ {"type": "getResponse", "error": "fake_get_response_error"},
+ "WebAuthn.get failure: fake_get_response_error",
+ ),
+ (
+ {"type": "getResponse", "responseData": {"xyz_type": "wrong_type"}},
+ "Invalid credential type",
+ ),
+ (
+ {"type": "getResponse", "responseData": {"type": "wrong_type"}},
+ "Invalid credential type",
+ ),
+ (
+ {
+ "type": "getResponse",
+ "responseData": {"type": "public-key", "response": {}},
+ },
+ "KeyError",
+ ),
+ (
+ {
+ "type": "getResponse",
+ "responseData": {
+ "type": "public-key",
+ "response": {"clientDataJSON": "fake_client_data_json_base64"},
+ },
+ },
+ "KeyError",
+ ),
+ (
+ {
+ "type": "getResponse",
+ "responseData": {
+ "type": "public-key",
+ "response": {
+ "clientDataJSON": "fake_client_data_json_base64",
+ "authenticatorData": "fake_authenticator_data_base64",
+ },
+ },
+ },
+ "KeyError",
+ ),
+ (
+ {
+ "type": "getResponse",
+ "responseData": {
+ "type": "public-key",
+ "response": {
+ "clientDataJSON": "fake_client_data_json_base64",
+ "authenticatorData": "fake_authenticator_data_base64",
+ "signature": "fake_signature_base64",
+ },
+ },
+ },
+ "KeyError",
+ ),
+ ],
+)
+def test_GetResponse_error(input_dict, expected_error):
+ with pytest.raises(Exception) as excinfo:
+ webauthn_types.GetResponse.from_json(json.dumps(input_dict))
+ if expected_error == "KeyError":
+ assert excinfo.type is KeyError
+ else:
+ assert expected_error in str(excinfo.value)
+
+
+def test_MalformatedJsonInput():
+ with pytest.raises(ValueError) as excinfo:
+ webauthn_types.GetResponse.from_json(")]}")
+ assert "Invalid Get JSON response" in str(excinfo.value)
diff --git a/contrib/python/google-auth/py3/tests/test_aws.py b/contrib/python/google-auth/py3/tests/test_aws.py
index 56148203128..df1f02e7d70 100644
--- a/contrib/python/google-auth/py3/tests/test_aws.py
+++ b/contrib/python/google-auth/py3/tests/test_aws.py
@@ -1220,6 +1220,39 @@ class TestCredentials(object):
url + SERVICE_ACCOUNT_IMPERSONATION_URL_ROUTE
)
+ def test_info_with_default_token_url(self):
+ credentials = aws.Credentials(
+ audience=AUDIENCE,
+ subject_token_type=SUBJECT_TOKEN_TYPE,
+ credential_source=self.CREDENTIAL_SOURCE.copy(),
+ )
+
+ assert credentials.info == {
+ "type": "external_account",
+ "audience": AUDIENCE,
+ "subject_token_type": SUBJECT_TOKEN_TYPE,
+ "token_url": TOKEN_URL,
+ "credential_source": self.CREDENTIAL_SOURCE.copy(),
+ "universe_domain": DEFAULT_UNIVERSE_DOMAIN,
+ }
+
+ def test_info_with_default_token_url_with_universe_domain(self):
+ credentials = aws.Credentials(
+ audience=AUDIENCE,
+ subject_token_type=SUBJECT_TOKEN_TYPE,
+ credential_source=self.CREDENTIAL_SOURCE.copy(),
+ universe_domain="testdomain.org",
+ )
+
+ assert credentials.info == {
+ "type": "external_account",
+ "audience": AUDIENCE,
+ "subject_token_type": SUBJECT_TOKEN_TYPE,
+ "token_url": "https://sts.testdomain.org/v1/token",
+ "credential_source": self.CREDENTIAL_SOURCE.copy(),
+ "universe_domain": "testdomain.org",
+ }
+
def test_retrieve_subject_token_missing_region_url(self):
# When AWS_REGION envvar is not available, region_url is required for
# determining the current AWS region.
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 0de711832f6..e4efe46c6bb 100644
--- a/contrib/python/google-auth/py3/tests/test_identity_pool.py
+++ b/contrib/python/google-auth/py3/tests/test_identity_pool.py
@@ -783,6 +783,39 @@ class TestCredentials(object):
"universe_domain": DEFAULT_UNIVERSE_DOMAIN,
}
+ def test_info_with_default_token_url(self):
+ credentials = identity_pool.Credentials(
+ audience=AUDIENCE,
+ subject_token_type=SUBJECT_TOKEN_TYPE,
+ credential_source=self.CREDENTIAL_SOURCE_TEXT_URL.copy(),
+ )
+
+ assert credentials.info == {
+ "type": "external_account",
+ "audience": AUDIENCE,
+ "subject_token_type": SUBJECT_TOKEN_TYPE,
+ "token_url": TOKEN_URL,
+ "credential_source": self.CREDENTIAL_SOURCE_TEXT_URL,
+ "universe_domain": DEFAULT_UNIVERSE_DOMAIN,
+ }
+
+ def test_info_with_default_token_url_with_universe_domain(self):
+ credentials = identity_pool.Credentials(
+ audience=AUDIENCE,
+ subject_token_type=SUBJECT_TOKEN_TYPE,
+ credential_source=self.CREDENTIAL_SOURCE_TEXT_URL.copy(),
+ universe_domain="testdomain.org",
+ )
+
+ assert credentials.info == {
+ "type": "external_account",
+ "audience": AUDIENCE,
+ "subject_token_type": SUBJECT_TOKEN_TYPE,
+ "token_url": "https://sts.testdomain.org/v1/token",
+ "credential_source": self.CREDENTIAL_SOURCE_TEXT_URL,
+ "universe_domain": "testdomain.org",
+ }
+
def test_retrieve_subject_token_missing_subject_token(self, tmpdir):
# Provide empty text file.
empty_file = tmpdir.join("empty.txt")
diff --git a/contrib/python/google-auth/py3/tests/transport/test__custom_tls_signer.py b/contrib/python/google-auth/py3/tests/transport/test__custom_tls_signer.py
index d2907bad297..3a33c2c0215 100644
--- a/contrib/python/google-auth/py3/tests/transport/test__custom_tls_signer.py
+++ b/contrib/python/google-auth/py3/tests/transport/test__custom_tls_signer.py
@@ -195,6 +195,7 @@ def test_custom_tls_signer():
get_cert.assert_called_once()
get_sign_callback.assert_called_once()
offload_lib.ConfigureSslContext.assert_called_once()
+ assert not signer_object.should_use_provider()
assert signer_object._enterprise_cert_file_path == ENTERPRISE_CERT_FILE
assert signer_object._offload_lib == offload_lib
assert signer_object._signer_lib == signer_lib
@@ -216,6 +217,7 @@ def test_custom_tls_signer_provider():
signer_object.load_libraries()
signer_object.attach_to_ssl_context(mock.MagicMock())
+ assert signer_object.should_use_provider()
assert signer_object._enterprise_cert_file_path == ENTERPRISE_CERT_FILE_PROVIDER
assert signer_object._provider_lib == provider_lib
load_provider_lib.assert_called_with("/path/to/provider/lib")
diff --git a/contrib/python/google-auth/py3/tests/transport/test_requests.py b/contrib/python/google-auth/py3/tests/transport/test_requests.py
index aadc1ddbfd0..0da3e36d9a3 100644
--- a/contrib/python/google-auth/py3/tests/transport/test_requests.py
+++ b/contrib/python/google-auth/py3/tests/transport/test_requests.py
@@ -568,3 +568,38 @@ class TestMutualTlsOffloadAdapter(object):
adapter.proxy_manager_for()
mock_proxy_manager_for.assert_called_with(ssl_context=adapter._ctx_proxymanager)
+
+ @mock.patch.object(requests.adapters.HTTPAdapter, "init_poolmanager")
+ @mock.patch.object(requests.adapters.HTTPAdapter, "proxy_manager_for")
+ @mock.patch.object(
+ google.auth.transport._custom_tls_signer.CustomTlsSigner, "should_use_provider"
+ )
+ @mock.patch.object(
+ google.auth.transport._custom_tls_signer.CustomTlsSigner, "load_libraries"
+ )
+ @mock.patch.object(
+ google.auth.transport._custom_tls_signer.CustomTlsSigner,
+ "attach_to_ssl_context",
+ )
+ def test_success_should_use_provider(
+ self,
+ mock_attach_to_ssl_context,
+ mock_load_libraries,
+ mock_should_use_provider,
+ mock_proxy_manager_for,
+ mock_init_poolmanager,
+ ):
+ enterprise_cert_file_path = "/path/to/enterprise/cert/json"
+ adapter = google.auth.transport.requests._MutualTlsOffloadAdapter(
+ enterprise_cert_file_path
+ )
+
+ mock_should_use_provider.side_effect = True
+ mock_load_libraries.assert_called_once()
+ assert mock_attach_to_ssl_context.call_count == 2
+
+ adapter.init_poolmanager()
+ mock_init_poolmanager.assert_called_with(ssl_context=adapter._ctx_poolmanager)
+
+ adapter.proxy_manager_for()
+ mock_proxy_manager_for.assert_called_with(ssl_context=adapter._ctx_proxymanager)
diff --git a/contrib/python/google-auth/py3/ya.make b/contrib/python/google-auth/py3/ya.make
index 952d1ebdd3a..32164999806 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.29.0)
+VERSION(2.30.0)
LICENSE(Apache-2.0)
@@ -86,12 +86,17 @@ PY_SRCS(
google/oauth2/service_account.py
google/oauth2/sts.py
google/oauth2/utils.py
+ google/oauth2/webauthn_handler.py
+ google/oauth2/webauthn_handler_factory.py
+ google/oauth2/webauthn_types.py
)
RESOURCE_FILES(
PREFIX contrib/python/google-auth/py3/
.dist-info/METADATA
.dist-info/top_level.txt
+ google/auth/py.typed
+ google/oauth2/py.typed
)
END()
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 0d4287365be..57cf50eec17 100644
--- a/contrib/python/hypothesis/py3/.dist-info/METADATA
+++ b/contrib/python/hypothesis/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hypothesis
-Version: 6.103.0
+Version: 6.103.1
Summary: A library for property-based testing
Home-page: https://hypothesis.works
Author: David R. MacIver and Zac Hatfield-Dodds
diff --git a/contrib/python/hypothesis/py3/hypothesis/core.py b/contrib/python/hypothesis/py3/hypothesis/core.py
index ccd5c43b6e8..9af0381feaf 100644
--- a/contrib/python/hypothesis/py3/hypothesis/core.py
+++ b/contrib/python/hypothesis/py3/hypothesis/core.py
@@ -77,7 +77,10 @@ from hypothesis.internal.compat import (
)
from hypothesis.internal.conjecture.data import ConjectureData, Status
from hypothesis.internal.conjecture.engine import BUFFER_SIZE, ConjectureRunner
-from hypothesis.internal.conjecture.junkdrawer import ensure_free_stackframes
+from hypothesis.internal.conjecture.junkdrawer import (
+ ensure_free_stackframes,
+ gc_cumulative_time,
+)
from hypothesis.internal.conjecture.shrinker import sort_key
from hypothesis.internal.entropy import deterministic_PRNG
from hypothesis.internal.escalation import (
@@ -820,21 +823,34 @@ class StateForActualGivenExecution:
self._string_repr = ""
text_repr = None
if self.settings.deadline is None and not TESTCASE_CALLBACKS:
- test = self.test
+
+ @proxies(self.test)
+ def test(*args, **kwargs):
+ with ensure_free_stackframes():
+ return self.test(*args, **kwargs)
+
else:
@proxies(self.test)
def test(*args, **kwargs):
arg_drawtime = math.fsum(data.draw_times.values())
+ arg_stateful = math.fsum(data._stateful_run_times.values())
+ arg_gctime = gc_cumulative_time()
start = time.perf_counter()
try:
- result = self.test(*args, **kwargs)
+ with ensure_free_stackframes():
+ result = self.test(*args, **kwargs)
finally:
finish = time.perf_counter()
in_drawtime = math.fsum(data.draw_times.values()) - arg_drawtime
- runtime = datetime.timedelta(seconds=finish - start - in_drawtime)
+ in_stateful = (
+ math.fsum(data._stateful_run_times.values()) - arg_stateful
+ )
+ in_gctime = gc_cumulative_time() - arg_gctime
+ runtime = finish - start - in_drawtime - in_stateful - in_gctime
self._timing_features = {
- "execute:test": finish - start - in_drawtime,
+ "execute:test": runtime,
+ "overall:gc": in_gctime,
**data.draw_times,
**data._stateful_run_times,
}
@@ -842,8 +858,10 @@ class StateForActualGivenExecution:
if (current_deadline := self.settings.deadline) is not None:
if not is_final:
current_deadline = (current_deadline // 4) * 5
- if runtime >= current_deadline:
- raise DeadlineExceeded(runtime, self.settings.deadline)
+ if runtime >= current_deadline.total_seconds():
+ raise DeadlineExceeded(
+ datetime.timedelta(seconds=runtime), self.settings.deadline
+ )
return result
def run(data):
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py
index 3fc6658e083..10ae727c2d3 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py
@@ -44,7 +44,11 @@ from hypothesis.errors import Frozen, InvalidArgument, StopTest
from hypothesis.internal.cache import LRUReusedCache
from hypothesis.internal.compat import add_note, floor, int_from_bytes, int_to_bytes
from hypothesis.internal.conjecture.floats import float_to_lex, lex_to_float
-from hypothesis.internal.conjecture.junkdrawer import IntList, uniform
+from hypothesis.internal.conjecture.junkdrawer import (
+ IntList,
+ gc_cumulative_time,
+ uniform,
+)
from hypothesis.internal.conjecture.utils import (
INT_SIZES,
INT_SIZES_SAMPLER,
@@ -1980,6 +1984,7 @@ class ConjectureData:
self.testcounter = global_test_counter
global_test_counter += 1
self.start_time = time.perf_counter()
+ self.gc_start_time = gc_cumulative_time()
self.events: Dict[str, Union[str, int, float]] = {}
self.forced_indices: "Set[int]" = set()
self.interesting_origin: Optional[InterestingOrigin] = None
@@ -2420,6 +2425,7 @@ class ConjectureData:
# where we cache something expensive, this led to Flaky deadline errors!
# See https://github.com/HypothesisWorks/hypothesis/issues/2108
start_time = time.perf_counter()
+ gc_start_time = gc_cumulative_time()
strategy.validate()
@@ -2443,7 +2449,10 @@ class ConjectureData:
try:
return strategy.do_draw(self)
finally:
- self.draw_times[key] = time.perf_counter() - start_time
+ # Subtract the time spent in GC to avoid overcounting, as it is
+ # accounted for at the overall example level.
+ in_gctime = gc_cumulative_time() - gc_start_time
+ self.draw_times[key] = time.perf_counter() - start_time - in_gctime
except Exception as err:
add_note(err, f"while generating {key[9:]!r} from {strategy!r}")
raise
@@ -2520,6 +2529,7 @@ class ConjectureData:
assert isinstance(self.buffer, bytes)
return
self.finish_time = time.perf_counter()
+ self.gc_finish_time = gc_cumulative_time()
assert len(self.buffer) == self.index
# Always finish by closing all remaining examples so that we have a
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py
index 89a8c7829c4..efeb284dbf6 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py
@@ -168,6 +168,7 @@ class CallStats(TypedDict):
status: str
runtime: float
drawtime: float
+ gctime: float
events: List[str]
@@ -298,7 +299,9 @@ class ConjectureRunner:
"""
# We ensure that the test has this much stack space remaining, no
# matter the size of the stack when called, to de-flake RecursionErrors
- # (#2494, #3671).
+ # (#2494, #3671). Note, this covers the data generation part of the test;
+ # the actual test execution is additionally protected at the call site
+ # in hypothesis.core.execute_once.
with ensure_free_stackframes():
try:
self._test_function(data)
@@ -430,6 +433,7 @@ class ConjectureRunner:
"status": data.status.name.lower(),
"runtime": data.finish_time - data.start_time,
"drawtime": math.fsum(data.draw_times.values()),
+ "gctime": data.gc_finish_time - data.gc_start_time,
"events": sorted(
k if v == "" else f"{k}: {v}" for k, v in data.events.items()
),
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py
index 716b5d3d82f..7dbab5b9717 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py
@@ -13,7 +13,9 @@ obviously belong anywhere else. If you spot a better home for
anything that lives here, please move it."""
import array
+import gc
import sys
+import time
import warnings
from random import Random
from typing import (
@@ -413,3 +415,52 @@ class SelfOrganisingList(Generic[T]):
self.__values.append(value)
return value
raise NotFound("No values satisfying condition")
+
+
+_gc_initialized = False
+_gc_start = 0
+_gc_cumulative_time = 0
+
+
+def gc_cumulative_time() -> float:
+ global _gc_initialized
+ if not _gc_initialized:
+ if hasattr(gc, "callbacks"):
+ # CPython
+ def gc_callback(phase, info):
+ global _gc_start, _gc_cumulative_time
+ try:
+ now = time.perf_counter()
+ if phase == "start":
+ _gc_start = now
+ elif phase == "stop" and _gc_start > 0:
+ _gc_cumulative_time += now - _gc_start # pragma: no cover # ??
+ except RecursionError: # pragma: no cover
+ # Avoid flakiness via UnraisableException, which is caught and
+ # warned by pytest. The actual callback (this function) is
+ # validated to never trigger a RecursionError itself when
+ # when called by gc.collect.
+ # Anyway, we should hit the same error on "start"
+ # and "stop", but to ensure we don't get out of sync we just
+ # signal that there is no matching start.
+ _gc_start = 0
+ return
+
+ gc.callbacks.insert(0, gc_callback)
+ elif hasattr(gc, "hooks"): # pragma: no cover # pypy only
+ # PyPy
+ def hook(stats):
+ global _gc_cumulative_time
+ try:
+ _gc_cumulative_time += stats.duration
+ except RecursionError:
+ pass
+
+ if gc.hooks.on_gc_minor is None:
+ gc.hooks.on_gc_minor = hook
+ if gc.hooks.on_gc_collect_step is None:
+ gc.hooks.on_gc_collect_step = hook
+
+ _gc_initialized = True
+
+ return _gc_cumulative_time
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/escalation.py b/contrib/python/hypothesis/py3/hypothesis/internal/escalation.py
index c3c678d2391..b85d9fcdc9b 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/escalation.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/escalation.py
@@ -87,9 +87,12 @@ def get_trimmed_traceback(exception=None):
else:
tb = exception.__traceback__
# Avoid trimming the traceback if we're in verbose mode, or the error
- # was raised inside Hypothesis
+ # was raised inside Hypothesis. Additionally, the environment variable
+ # HYPOTHESIS_NO_TRACEBACK_TRIM is respected if nonempty, because verbose
+ # mode is prohibitively slow when debugging strategy recursion errors.
if (
tb is None
+ or os.environ.get("HYPOTHESIS_NO_TRACEBACK_TRIM", None)
or hypothesis.settings.default.verbosity >= hypothesis.Verbosity.debug
or is_hypothesis_file(traceback.extract_tb(tb)[-1][0])
and not isinstance(exception, _Trimmable)
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/scrutineer.py b/contrib/python/hypothesis/py3/hypothesis/internal/scrutineer.py
index 39352844b4d..d99e767c1d6 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/scrutineer.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/scrutineer.py
@@ -10,6 +10,7 @@
import functools
import os
+import re
import subprocess
import sys
import types
@@ -58,15 +59,18 @@ class Tracer:
self._previous_location = None
def trace(self, frame, event, arg):
- if event == "call":
- return self.trace
- elif event == "line":
- # manual inlining of self.trace_line for performance.
- fname = frame.f_code.co_filename
- if should_trace_file(fname):
- current_location = (fname, frame.f_lineno)
- self.branches.add((self._previous_location, current_location))
- self._previous_location = current_location
+ try:
+ if event == "call":
+ return self.trace
+ elif event == "line":
+ # manual inlining of self.trace_line for performance.
+ fname = frame.f_code.co_filename
+ if should_trace_file(fname):
+ current_location = (fname, frame.f_lineno)
+ self.branches.add((self._previous_location, current_location))
+ self._previous_location = current_location
+ except RecursionError:
+ pass
def trace_line(self, code: types.CodeType, line_number: int) -> None:
fname = code.co_filename
@@ -104,19 +108,38 @@ UNHELPFUL_LOCATIONS = (
# a contextmanager; this is probably after the fault has been triggered.
# Similar reasoning applies to a few other standard-library modules: even
# if the fault was later, these still aren't useful locations to report!
- f"{sep}contextlib.py",
- f"{sep}inspect.py",
- f"{sep}re.py",
- f"{sep}re{sep}__init__.py", # refactored in Python 3.11
- f"{sep}warnings.py",
+ # Note: The list is post-processed, so use plain "/" for separator here.
+ "/contextlib.py",
+ "/inspect.py",
+ "/re.py",
+ "/re/__init__.py", # refactored in Python 3.11
+ "/warnings.py",
# Quite rarely, the first AFNP line is in Pytest's internals.
- f"{sep}_pytest{sep}assertion{sep}__init__.py",
- f"{sep}_pytest{sep}assertion{sep}rewrite.py",
- f"{sep}_pytest{sep}_io{sep}saferepr.py",
- f"{sep}pluggy{sep}_result.py",
+ "/_pytest/_io/saferepr.py",
+ "/_pytest/assertion/*.py",
+ "/_pytest/config/__init__.py",
+ "/_pytest/pytester.py",
+ "/pluggy/_*.py",
+ "/reprlib.py",
+ "/typing.py",
+ "/conftest.py",
)
+def _glob_to_re(locs):
+ """Translate a list of glob patterns to a combined regular expression.
+ Only the * wildcard is supported, and patterns including special
+ characters will only work by chance."""
+ # fnmatch.translate is not an option since its "*" consumes path sep
+ return "|".join(
+ loc.replace("*", r"[^/]+")
+ .replace(".", re.escape("."))
+ .replace("/", re.escape(sep))
+ + r"\Z" # right anchored
+ for loc in locs
+ )
+
+
def get_explaining_locations(traces):
# Traces is a dict[interesting_origin | None, set[frozenset[tuple[str, int]]]]
# Each trace in the set might later become a Counter instead of frozenset.
@@ -159,8 +182,9 @@ def get_explaining_locations(traces):
# The last step is to filter out explanations that we know would be uninformative.
# When this is the first AFNP location, we conclude that Scrutineer missed the
# real divergence (earlier in the trace) and drop that unhelpful explanation.
+ filter_regex = re.compile(_glob_to_re(UNHELPFUL_LOCATIONS))
return {
- origin: {loc for loc in afnp_locs if not loc[0].endswith(UNHELPFUL_LOCATIONS)}
+ origin: {loc for loc in afnp_locs if not filter_regex.search(loc[0])}
for origin, afnp_locs in explanations.items()
}
diff --git a/contrib/python/hypothesis/py3/hypothesis/stateful.py b/contrib/python/hypothesis/py3/hypothesis/stateful.py
index 8c8272df7b8..067d9c77c62 100644
--- a/contrib/python/hypothesis/py3/hypothesis/stateful.py
+++ b/contrib/python/hypothesis/py3/hypothesis/stateful.py
@@ -50,6 +50,7 @@ from hypothesis.errors import InvalidArgument, InvalidDefinition
from hypothesis.internal.compat import add_note
from hypothesis.internal.conjecture import utils as cu
from hypothesis.internal.conjecture.engine import BUFFER_SIZE
+from hypothesis.internal.conjecture.junkdrawer import gc_cumulative_time
from hypothesis.internal.healthcheck import fail_health_check
from hypothesis.internal.observability import TESTCASE_CALLBACKS
from hypothesis.internal.reflection import (
@@ -158,6 +159,7 @@ def run_state_machine_as_test(state_machine_factory, *, settings=None, _min_step
must_stop = True
start_draw = perf_counter()
+ start_gc = gc_cumulative_time()
if cd.draw_boolean(p=2**-16, forced=must_stop):
break
steps_run += 1
@@ -175,7 +177,8 @@ def run_state_machine_as_test(state_machine_factory, *, settings=None, _min_step
rule, data = cd.draw(machine._rules_strategy)
draw_label = f"generate:rule:{rule.function.__name__}"
cd.draw_times.setdefault(draw_label, 0.0)
- cd.draw_times[draw_label] += perf_counter() - start_draw
+ in_gctime = gc_cumulative_time() - start_gc
+ cd.draw_times[draw_label] += perf_counter() - start_draw - in_gctime
# Pretty-print the values this rule was called with *before* calling
# _add_result_to_targets, to avoid printing arguments which are also
@@ -196,8 +199,10 @@ def run_state_machine_as_test(state_machine_factory, *, settings=None, _min_step
label = f"execute:rule:{rule.function.__name__}"
start = perf_counter()
+ start_gc = gc_cumulative_time()
result = rule.function(machine, **data)
- cd._stateful_run_times[label] += perf_counter() - start
+ in_gctime = gc_cumulative_time() - start_gc
+ cd._stateful_run_times[label] += perf_counter() - start - in_gctime
if rule.targets:
if isinstance(result, MultipleResults):
diff --git a/contrib/python/hypothesis/py3/hypothesis/statistics.py b/contrib/python/hypothesis/py3/hypothesis/statistics.py
index 33e4ea6706c..7425db7bcba 100644
--- a/contrib/python/hypothesis/py3/hypothesis/statistics.py
+++ b/contrib/python/hypothesis/py3/hypothesis/statistics.py
@@ -48,7 +48,8 @@ def format_ms(times):
"""
ordered = sorted(times)
n = len(ordered) - 1
- assert n >= 0
+ if n < 0 or any(math.isnan(t) for t in ordered):
+ return "NaN ms"
lower = int(ordered[int(math.floor(n * 0.05))] * 1000)
upper = int(ordered[int(math.ceil(n * 0.95))] * 1000)
if upper == 0:
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index a3a5493aa18..0260a877466 100644
--- a/contrib/python/hypothesis/py3/hypothesis/version.py
+++ b/contrib/python/hypothesis/py3/hypothesis/version.py
@@ -8,5 +8,5 @@
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
-__version_info__ = (6, 103, 0)
+__version_info__ = (6, 103, 1)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 35e83e20004..c1289cb94f9 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.103.0)
+VERSION(6.103.1)
LICENSE(MPL-2.0)
diff --git a/contrib/python/kubernetes/.dist-info/METADATA b/contrib/python/kubernetes/.dist-info/METADATA
index 50dc941b0f6..cccc23a8fe4 100644
--- a/contrib/python/kubernetes/.dist-info/METADATA
+++ b/contrib/python/kubernetes/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: kubernetes
-Version: 29.0.0
+Version: 30.1.0
Summary: Kubernetes python client
Home-page: https://github.com/kubernetes-client/python
Author: Kubernetes
@@ -33,7 +33,6 @@ Requires-Dist: requests
Requires-Dist: requests-oauthlib
Requires-Dist: oauthlib >=3.2.2
Requires-Dist: urllib3 >=1.24.2
-Requires-Dist: ipaddress >=1.0.17 ; python_version=="2.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 1e164b091a9..c85e670f97c 100644
--- a/contrib/python/kubernetes/README.md
+++ b/contrib/python/kubernetes/README.md
@@ -99,6 +99,8 @@ supported versions of Kubernetes clusters.
- [client 27.y.z](https://pypi.org/project/kubernetes/27.2.0/): Kubernetes 1.26 or below (+-), Kubernetes 1.27 (✓), Kubernetes 1.28 or above (+-)
- [client 28.y.z](https://pypi.org/project/kubernetes/28.1.0/): Kubernetes 1.27 or below (+-), Kubernetes 1.28 (✓), Kubernetes 1.29 or above (+-)
- [client 29.y.z](https://pypi.org/project/kubernetes/29.0.0/): Kubernetes 1.28 or below (+-), Kubernetes 1.29 (✓), Kubernetes 1.30 or above (+-)
+- [client 30.y.z](https://pypi.org/project/kubernetes/30.1.0/): Kubernetes 1.29 or below (+-), Kubernetes 1.30 (✓), Kubernetes 1.31 or above (+-)
+
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release.
@@ -156,11 +158,13 @@ between client-python versions.
| 26.0 Alpha/Beta | Kubernetes main repo, 1.26 branch | ✗ |
| 26.0 | Kubernetes main repo, 1.26 branch | ✗ |
| 27.0 Alpha/Beta | Kubernetes main repo, 1.27 branch | ✗ |
-| 27.0 | Kubernetes main repo, 1.27 branch | ✓ |
+| 27.0 | Kubernetes main repo, 1.27 branch | ✗ |
| 28.0 Alpha/Beta | Kubernetes main repo, 1.28 branch | ✗ |
| 28.0 | Kubernetes main repo, 1.28 branch | ✓ |
| 29.0 Alpha/Beta | Kubernetes main repo, 1.29 branch | ✗ |
| 29.0 | Kubernetes main repo, 1.29 branch | ✓ |
+| 30.0 Alpha/Beta | Kubernetes main repo, 1.30 branch | ✗ |
+| 30.0 | Kubernetes main repo, 1.30 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 d0da13f8493..175ef1bc8f9 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__ = "29.0.0"
+__version__ = "30.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 623e054f9e1..abe65e3b06a 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
-__version__ = "29.0.0"
+__version__ = "30.1.0"
# import apis into sdk package
from kubernetes.client.api.well_known_api import WellKnownApi
@@ -75,6 +75,8 @@ from kubernetes.client.api.scheduling_v1_api import SchedulingV1Api
from kubernetes.client.api.storage_api import StorageApi
from kubernetes.client.api.storage_v1_api import StorageV1Api
from kubernetes.client.api.storage_v1alpha1_api import StorageV1alpha1Api
+from kubernetes.client.api.storagemigration_api import StoragemigrationApi
+from kubernetes.client.api.storagemigration_v1alpha1_api import StoragemigrationV1alpha1Api
from kubernetes.client.api.version_api import VersionApi
# import ApiClient
@@ -116,7 +118,9 @@ 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_app_armor_profile import V1AppArmorProfile
from kubernetes.client.models.v1_attached_volume import V1AttachedVolume
+from kubernetes.client.models.v1_audit_annotation import V1AuditAnnotation
from kubernetes.client.models.v1_azure_disk_volume_source import V1AzureDiskVolumeSource
from kubernetes.client.models.v1_azure_file_persistent_volume_source import V1AzureFilePersistentVolumeSource
from kubernetes.client.models.v1_azure_file_volume_source import V1AzureFileVolumeSource
@@ -225,6 +229,7 @@ from kubernetes.client.models.v1_event_source import V1EventSource
from kubernetes.client.models.v1_eviction import V1Eviction
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
from kubernetes.client.models.v1_external_documentation import V1ExternalDocumentation
from kubernetes.client.models.v1_fc_volume_source import V1FCVolumeSource
from kubernetes.client.models.v1_flex_persistent_volume_source import V1FlexPersistentVolumeSource
@@ -302,11 +307,13 @@ from kubernetes.client.models.v1_local_subject_access_review import V1LocalSubje
from kubernetes.client.models.v1_local_volume_source import V1LocalVolumeSource
from kubernetes.client.models.v1_managed_fields_entry import V1ManagedFieldsEntry
from kubernetes.client.models.v1_match_condition import V1MatchCondition
+from kubernetes.client.models.v1_match_resources import V1MatchResources
from kubernetes.client.models.v1_modify_volume_status import V1ModifyVolumeStatus
from kubernetes.client.models.v1_mutating_webhook import V1MutatingWebhook
from kubernetes.client.models.v1_mutating_webhook_configuration import V1MutatingWebhookConfiguration
from kubernetes.client.models.v1_mutating_webhook_configuration_list import V1MutatingWebhookConfigurationList
from kubernetes.client.models.v1_nfs_volume_source import V1NFSVolumeSource
+from kubernetes.client.models.v1_named_rule_with_operations import V1NamedRuleWithOperations
from kubernetes.client.models.v1_namespace import V1Namespace
from kubernetes.client.models.v1_namespace_condition import V1NamespaceCondition
from kubernetes.client.models.v1_namespace_list import V1NamespaceList
@@ -327,6 +334,8 @@ from kubernetes.client.models.v1_node_config_source import V1NodeConfigSource
from kubernetes.client.models.v1_node_config_status import V1NodeConfigStatus
from kubernetes.client.models.v1_node_daemon_endpoints import V1NodeDaemonEndpoints
from kubernetes.client.models.v1_node_list import V1NodeList
+from kubernetes.client.models.v1_node_runtime_handler import V1NodeRuntimeHandler
+from kubernetes.client.models.v1_node_runtime_handler_features import V1NodeRuntimeHandlerFeatures
from kubernetes.client.models.v1_node_selector import V1NodeSelector
from kubernetes.client.models.v1_node_selector_requirement import V1NodeSelectorRequirement
from kubernetes.client.models.v1_node_selector_term import V1NodeSelectorTerm
@@ -341,6 +350,8 @@ from kubernetes.client.models.v1_object_meta import V1ObjectMeta
from kubernetes.client.models.v1_object_reference import V1ObjectReference
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
+from kubernetes.client.models.v1_param_ref import V1ParamRef
from kubernetes.client.models.v1_persistent_volume import V1PersistentVolume
from kubernetes.client.models.v1_persistent_volume_claim import V1PersistentVolumeClaim
from kubernetes.client.models.v1_persistent_volume_claim_condition import V1PersistentVolumeClaimCondition
@@ -450,6 +461,7 @@ from kubernetes.client.models.v1_secret_projection import V1SecretProjection
from kubernetes.client.models.v1_secret_reference import V1SecretReference
from kubernetes.client.models.v1_secret_volume_source import V1SecretVolumeSource
from kubernetes.client.models.v1_security_context import V1SecurityContext
+from kubernetes.client.models.v1_selectable_field import V1SelectableField
from kubernetes.client.models.v1_self_subject_access_review import V1SelfSubjectAccessReview
from kubernetes.client.models.v1_self_subject_access_review_spec import V1SelfSubjectAccessReviewSpec
from kubernetes.client.models.v1_self_subject_review import V1SelfSubjectReview
@@ -488,6 +500,8 @@ from kubernetes.client.models.v1_subject_access_review import V1SubjectAccessRev
from kubernetes.client.models.v1_subject_access_review_spec import V1SubjectAccessReviewSpec
from kubernetes.client.models.v1_subject_access_review_status import V1SubjectAccessReviewStatus
from kubernetes.client.models.v1_subject_rules_review_status import V1SubjectRulesReviewStatus
+from kubernetes.client.models.v1_success_policy import V1SuccessPolicy
+from kubernetes.client.models.v1_success_policy_rule import V1SuccessPolicyRule
from kubernetes.client.models.v1_sysctl import V1Sysctl
from kubernetes.client.models.v1_tcp_socket_action import V1TCPSocketAction
from kubernetes.client.models.v1_taint import V1Taint
@@ -500,15 +514,25 @@ from kubernetes.client.models.v1_toleration import V1Toleration
from kubernetes.client.models.v1_topology_selector_label_requirement import V1TopologySelectorLabelRequirement
from kubernetes.client.models.v1_topology_selector_term import V1TopologySelectorTerm
from kubernetes.client.models.v1_topology_spread_constraint import V1TopologySpreadConstraint
+from kubernetes.client.models.v1_type_checking import V1TypeChecking
from kubernetes.client.models.v1_typed_local_object_reference import V1TypedLocalObjectReference
from kubernetes.client.models.v1_typed_object_reference import V1TypedObjectReference
from kubernetes.client.models.v1_uncounted_terminated_pods import V1UncountedTerminatedPods
from kubernetes.client.models.v1_user_info import V1UserInfo
from kubernetes.client.models.v1_user_subject import V1UserSubject
+from kubernetes.client.models.v1_validating_admission_policy import V1ValidatingAdmissionPolicy
+from kubernetes.client.models.v1_validating_admission_policy_binding import V1ValidatingAdmissionPolicyBinding
+from kubernetes.client.models.v1_validating_admission_policy_binding_list import V1ValidatingAdmissionPolicyBindingList
+from kubernetes.client.models.v1_validating_admission_policy_binding_spec import V1ValidatingAdmissionPolicyBindingSpec
+from kubernetes.client.models.v1_validating_admission_policy_list import V1ValidatingAdmissionPolicyList
+from kubernetes.client.models.v1_validating_admission_policy_spec import V1ValidatingAdmissionPolicySpec
+from kubernetes.client.models.v1_validating_admission_policy_status import V1ValidatingAdmissionPolicyStatus
from kubernetes.client.models.v1_validating_webhook import V1ValidatingWebhook
from kubernetes.client.models.v1_validating_webhook_configuration import V1ValidatingWebhookConfiguration
from kubernetes.client.models.v1_validating_webhook_configuration_list import V1ValidatingWebhookConfigurationList
+from kubernetes.client.models.v1_validation import V1Validation
from kubernetes.client.models.v1_validation_rule import V1ValidationRule
+from kubernetes.client.models.v1_variable import V1Variable
from kubernetes.client.models.v1_volume import V1Volume
from kubernetes.client.models.v1_volume_attachment import V1VolumeAttachment
from kubernetes.client.models.v1_volume_attachment_list import V1VolumeAttachmentList
@@ -518,6 +542,7 @@ from kubernetes.client.models.v1_volume_attachment_status import V1VolumeAttachm
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
+from kubernetes.client.models.v1_volume_mount_status import V1VolumeMountStatus
from kubernetes.client.models.v1_volume_node_affinity import V1VolumeNodeAffinity
from kubernetes.client.models.v1_volume_node_resources import V1VolumeNodeResources
from kubernetes.client.models.v1_volume_projection import V1VolumeProjection
@@ -532,11 +557,13 @@ from kubernetes.client.models.v1alpha1_cluster_trust_bundle import V1alpha1Clust
from kubernetes.client.models.v1alpha1_cluster_trust_bundle_list import V1alpha1ClusterTrustBundleList
from kubernetes.client.models.v1alpha1_cluster_trust_bundle_spec import V1alpha1ClusterTrustBundleSpec
from kubernetes.client.models.v1alpha1_expression_warning import V1alpha1ExpressionWarning
+from kubernetes.client.models.v1alpha1_group_version_resource import V1alpha1GroupVersionResource
from kubernetes.client.models.v1alpha1_ip_address import V1alpha1IPAddress
from kubernetes.client.models.v1alpha1_ip_address_list import V1alpha1IPAddressList
from kubernetes.client.models.v1alpha1_ip_address_spec import V1alpha1IPAddressSpec
from kubernetes.client.models.v1alpha1_match_condition import V1alpha1MatchCondition
from kubernetes.client.models.v1alpha1_match_resources import V1alpha1MatchResources
+from kubernetes.client.models.v1alpha1_migration_condition import V1alpha1MigrationCondition
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
@@ -551,6 +578,10 @@ from kubernetes.client.models.v1alpha1_service_cidr_status import V1alpha1Servic
from kubernetes.client.models.v1alpha1_storage_version import V1alpha1StorageVersion
from kubernetes.client.models.v1alpha1_storage_version_condition import V1alpha1StorageVersionCondition
from kubernetes.client.models.v1alpha1_storage_version_list import V1alpha1StorageVersionList
+from kubernetes.client.models.v1alpha1_storage_version_migration import V1alpha1StorageVersionMigration
+from kubernetes.client.models.v1alpha1_storage_version_migration_list import V1alpha1StorageVersionMigrationList
+from kubernetes.client.models.v1alpha1_storage_version_migration_spec import V1alpha1StorageVersionMigrationSpec
+from kubernetes.client.models.v1alpha1_storage_version_migration_status import V1alpha1StorageVersionMigrationStatus
from kubernetes.client.models.v1alpha1_storage_version_status import V1alpha1StorageVersionStatus
from kubernetes.client.models.v1alpha1_type_checking import V1alpha1TypeChecking
from kubernetes.client.models.v1alpha1_validating_admission_policy import V1alpha1ValidatingAdmissionPolicy
@@ -565,6 +596,16 @@ from kubernetes.client.models.v1alpha1_variable import V1alpha1Variable
from kubernetes.client.models.v1alpha1_volume_attributes_class import V1alpha1VolumeAttributesClass
from kubernetes.client.models.v1alpha1_volume_attributes_class_list import V1alpha1VolumeAttributesClassList
from kubernetes.client.models.v1alpha2_allocation_result import V1alpha2AllocationResult
+from kubernetes.client.models.v1alpha2_driver_allocation_result import V1alpha2DriverAllocationResult
+from kubernetes.client.models.v1alpha2_driver_requests import V1alpha2DriverRequests
+from kubernetes.client.models.v1alpha2_named_resources_allocation_result import V1alpha2NamedResourcesAllocationResult
+from kubernetes.client.models.v1alpha2_named_resources_attribute import V1alpha2NamedResourcesAttribute
+from kubernetes.client.models.v1alpha2_named_resources_filter import V1alpha2NamedResourcesFilter
+from kubernetes.client.models.v1alpha2_named_resources_instance import V1alpha2NamedResourcesInstance
+from kubernetes.client.models.v1alpha2_named_resources_int_slice import V1alpha2NamedResourcesIntSlice
+from kubernetes.client.models.v1alpha2_named_resources_request import V1alpha2NamedResourcesRequest
+from kubernetes.client.models.v1alpha2_named_resources_resources import V1alpha2NamedResourcesResources
+from kubernetes.client.models.v1alpha2_named_resources_string_slice import V1alpha2NamedResourcesStringSlice
from kubernetes.client.models.v1alpha2_pod_scheduling_context import V1alpha2PodSchedulingContext
from kubernetes.client.models.v1alpha2_pod_scheduling_context_list import V1alpha2PodSchedulingContextList
from kubernetes.client.models.v1alpha2_pod_scheduling_context_spec import V1alpha2PodSchedulingContextSpec
@@ -572,6 +613,8 @@ from kubernetes.client.models.v1alpha2_pod_scheduling_context_status import V1al
from kubernetes.client.models.v1alpha2_resource_claim import V1alpha2ResourceClaim
from kubernetes.client.models.v1alpha2_resource_claim_consumer_reference import V1alpha2ResourceClaimConsumerReference
from kubernetes.client.models.v1alpha2_resource_claim_list import V1alpha2ResourceClaimList
+from kubernetes.client.models.v1alpha2_resource_claim_parameters import V1alpha2ResourceClaimParameters
+from kubernetes.client.models.v1alpha2_resource_claim_parameters_list import V1alpha2ResourceClaimParametersList
from kubernetes.client.models.v1alpha2_resource_claim_parameters_reference import V1alpha2ResourceClaimParametersReference
from kubernetes.client.models.v1alpha2_resource_claim_scheduling_status import V1alpha2ResourceClaimSchedulingStatus
from kubernetes.client.models.v1alpha2_resource_claim_spec import V1alpha2ResourceClaimSpec
@@ -581,8 +624,16 @@ from kubernetes.client.models.v1alpha2_resource_claim_template_list import V1alp
from kubernetes.client.models.v1alpha2_resource_claim_template_spec import V1alpha2ResourceClaimTemplateSpec
from kubernetes.client.models.v1alpha2_resource_class import V1alpha2ResourceClass
from kubernetes.client.models.v1alpha2_resource_class_list import V1alpha2ResourceClassList
+from kubernetes.client.models.v1alpha2_resource_class_parameters import V1alpha2ResourceClassParameters
+from kubernetes.client.models.v1alpha2_resource_class_parameters_list import V1alpha2ResourceClassParametersList
from kubernetes.client.models.v1alpha2_resource_class_parameters_reference import V1alpha2ResourceClassParametersReference
+from kubernetes.client.models.v1alpha2_resource_filter import V1alpha2ResourceFilter
from kubernetes.client.models.v1alpha2_resource_handle import V1alpha2ResourceHandle
+from kubernetes.client.models.v1alpha2_resource_request import V1alpha2ResourceRequest
+from kubernetes.client.models.v1alpha2_resource_slice import V1alpha2ResourceSlice
+from kubernetes.client.models.v1alpha2_resource_slice_list import V1alpha2ResourceSliceList
+from kubernetes.client.models.v1alpha2_structured_resource_handle import V1alpha2StructuredResourceHandle
+from kubernetes.client.models.v1alpha2_vendor_parameters import V1alpha2VendorParameters
from kubernetes.client.models.v1beta1_audit_annotation import V1beta1AuditAnnotation
from kubernetes.client.models.v1beta1_expression_warning import V1beta1ExpressionWarning
from kubernetes.client.models.v1beta1_match_condition import V1beta1MatchCondition
diff --git a/contrib/python/kubernetes/kubernetes/client/api/__init__.py b/contrib/python/kubernetes/kubernetes/client/api/__init__.py
index 9fac12147cb..1ff4b8308a8 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/__init__.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/__init__.py
@@ -61,4 +61,6 @@ from kubernetes.client.api.scheduling_v1_api import SchedulingV1Api
from kubernetes.client.api.storage_api import StorageApi
from kubernetes.client.api.storage_v1_api import StorageV1Api
from kubernetes.client.api.storage_v1alpha1_api import StorageV1alpha1Api
+from kubernetes.client.api.storagemigration_api import StoragemigrationApi
+from kubernetes.client.api.storagemigration_v1alpha1_api import StoragemigrationV1alpha1Api
from kubernetes.client.api.version_api import VersionApi
diff --git a/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_api.py b/contrib/python/kubernetes/kubernetes/client/api/admissionregistration_api.py
index d1e03b1585a..f629b7153cf 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.29
+ The version of the OpenAPI document: release-1.30
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 bd7838849c8..bf989162873 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -170,6 +170,274 @@ class AdmissionregistrationV1Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def create_validating_admission_policy(self, body, **kwargs): # noqa: E501
+ """create_validating_admission_policy # noqa: E501
+
+ create a ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_validating_admission_policy(body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param V1ValidatingAdmissionPolicy 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: V1ValidatingAdmissionPolicy
+ 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
+
+ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_validating_admission_policy # noqa: E501
+
+ create a ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_validating_admission_policy_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param V1ValidatingAdmissionPolicy 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(V1ValidatingAdmissionPolicy, 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_validating_admission_policy" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('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
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicy', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_validating_admission_policy_binding(self, body, **kwargs): # noqa: E501
+ """create_validating_admission_policy_binding # noqa: E501
+
+ create a ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_validating_admission_policy_binding(body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param V1ValidatingAdmissionPolicyBinding 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: V1ValidatingAdmissionPolicyBinding
+ 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
+
+ def create_validating_admission_policy_binding_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_validating_admission_policy_binding # noqa: E501
+
+ create a ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_validating_admission_policy_binding_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param V1ValidatingAdmissionPolicyBinding 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(V1ValidatingAdmissionPolicyBinding, 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_validating_admission_policy_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'body' is set
+ if self.api_client.client_side_validation and ('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
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicyBinding', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_validating_webhook_configuration(self, body, **kwargs): # noqa: E501
"""create_validating_webhook_configuration # noqa: E501
@@ -479,6 +747,356 @@ class AdmissionregistrationV1Api(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
+
+ delete collection of ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_collection_validating_admission_policy(async_req=True)
+ >>> result = thread.get()
+
+ :param 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 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_validating_admission_policy_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_validating_admission_policy # noqa: E501
+
+ delete collection of ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_collection_validating_admission_policy_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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 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',
+ '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_validating_admission_policy" % 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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_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_validating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """delete_collection_validating_admission_policy_binding # noqa: E501
+
+ delete collection of ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_collection_validating_admission_policy_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param 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 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_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_validating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_validating_admission_policy_binding # noqa: E501
+
+ delete collection of ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_collection_validating_admission_policy_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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 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',
+ '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_validating_admission_policy_binding" % 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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_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_validating_webhook_configuration(self, **kwargs): # noqa: E501
"""delete_collection_validating_webhook_configuration # noqa: E501
@@ -798,6 +1416,294 @@ class AdmissionregistrationV1Api(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
+
+ delete a ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_validating_admission_policy(name, async_req=True)
+ >>> result = thread.get()
+
+ :param 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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"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_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_validating_admission_policy # noqa: E501
+
+ delete a ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_validating_admission_policy_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param 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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty',
+ 'dry_run',
+ 'grace_period_seconds',
+ '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_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 `delete_validating_admission_policy`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if '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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_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_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501
+ """delete_validating_admission_policy_binding # noqa: E501
+
+ delete a ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_validating_admission_policy_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"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_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_validating_admission_policy_binding # noqa: E501
+
+ delete a ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_validating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty',
+ 'dry_run',
+ 'grace_period_seconds',
+ '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_validating_admission_policy_binding" % key
+ )
+ local_var_params[key] = val
+ del local_var_params['kwargs']
+ # verify the required parameter 'name' is set
+ if self.api_client.client_side_validation and ('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
+
+ 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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_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_validating_webhook_configuration(self, name, **kwargs): # noqa: E501
"""delete_validating_webhook_configuration # noqa: E501
@@ -1207,6 +2113,326 @@ class AdmissionregistrationV1Api(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
+
+ list or watch objects of kind ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_validating_admission_policy(async_req=True)
+ >>> result = thread.get()
+
+ :param 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: V1ValidatingAdmissionPolicyList
+ 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
+
+ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E501
+ """list_validating_admission_policy # noqa: E501
+
+ list or watch objects of kind ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_validating_admission_policy_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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(V1ValidatingAdmissionPolicyList, 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_validating_admission_policy" % 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/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicyList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_validating_admission_policy_binding(self, **kwargs): # noqa: E501
+ """list_validating_admission_policy_binding # noqa: E501
+
+ list or watch objects of kind ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_validating_admission_policy_binding(async_req=True)
+ >>> result = thread.get()
+
+ :param 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: V1ValidatingAdmissionPolicyBindingList
+ 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
+
+ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501
+ """list_validating_admission_policy_binding # noqa: E501
+
+ list or watch objects of kind ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_validating_admission_policy_binding_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param 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(V1ValidatingAdmissionPolicyBindingList, 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_validating_admission_policy_binding" % 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/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicyBindingList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_validating_webhook_configuration(self, **kwargs): # noqa: E501
"""list_validating_webhook_configuration # noqa: E501
@@ -1519,6 +2745,462 @@ class AdmissionregistrationV1Api(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
+
+ partially update the specified ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_validating_admission_policy(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param 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: V1ValidatingAdmissionPolicy
+ 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
+
+ def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy # noqa: E501
+
+ partially update the specified ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_validating_admission_policy_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param 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(V1ValidatingAdmissionPolicy, 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" % key
+ )
+ local_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
+ # 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
+
+ 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']) # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicy', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy_binding # noqa: E501
+
+ partially update the specified ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_validating_admission_policy_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicyBinding (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: V1ValidatingAdmissionPolicyBinding
+ 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
+
+ def patch_validating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy_binding # noqa: E501
+
+ partially update the specified ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_validating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicyBinding (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(V1ValidatingAdmissionPolicyBinding, 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_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
+ # 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
+
+ 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']) # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicyBinding', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501
+ """patch_validating_admission_policy_status # noqa: E501
+
+ partially update status of the specified ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_validating_admission_policy_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param 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: V1ValidatingAdmissionPolicy
+ 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(V1ValidatingAdmissionPolicy, 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']) # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicy', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_validating_webhook_configuration(self, name, body, **kwargs): # noqa: E501
"""patch_validating_webhook_configuration # noqa: E501
@@ -1790,6 +3472,363 @@ class AdmissionregistrationV1Api(object):
_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 pretty: If 'true', then 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: V1ValidatingAdmissionPolicy
+ 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
+
+ def read_validating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_validating_admission_policy # noqa: E501
+
+ read the specified ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.read_validating_admission_policy_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param 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(V1ValidatingAdmissionPolicy, 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" % key
+ )
+ local_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
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicy', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_binding(self, name, **kwargs): # noqa: E501
+ """read_validating_admission_policy_binding # noqa: E501
+
+ read the specified ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.read_validating_admission_policy_binding(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str pretty: If 'true', then 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: V1ValidatingAdmissionPolicyBinding
+ 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
+
+ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_validating_admission_policy_binding # noqa: E501
+
+ read the specified ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.read_validating_admission_policy_binding_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param str pretty: If 'true', then 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(V1ValidatingAdmissionPolicyBinding, 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_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
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicyBinding', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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: V1ValidatingAdmissionPolicy
+ 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(V1ValidatingAdmissionPolicy, 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicy', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_webhook_configuration(self, name, **kwargs): # noqa: E501
"""read_validating_webhook_configuration # noqa: E501
@@ -2052,6 +4091,435 @@ class AdmissionregistrationV1Api(object):
_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 V1ValidatingAdmissionPolicy 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: V1ValidatingAdmissionPolicy
+ 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 V1ValidatingAdmissionPolicy 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(V1ValidatingAdmissionPolicy, 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicy', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_binding(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy_binding # noqa: E501
+
+ replace the specified ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_validating_admission_policy_binding(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param V1ValidatingAdmissionPolicyBinding 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: V1ValidatingAdmissionPolicyBinding
+ 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
+
+ def replace_validating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy_binding # noqa: E501
+
+ replace the specified ValidatingAdmissionPolicyBinding # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_validating_admission_policy_binding_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicyBinding (required)
+ :param V1ValidatingAdmissionPolicyBinding 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(V1ValidatingAdmissionPolicyBinding, 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_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_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_binding`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicyBinding', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_status(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy_status # noqa: E501
+
+ replace status of the specified ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_validating_admission_policy_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicy (required)
+ :param V1ValidatingAdmissionPolicy 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: V1ValidatingAdmissionPolicy
+ 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
+
+ def replace_validating_admission_policy_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_validating_admission_policy_status # noqa: E501
+
+ replace status of the specified ValidatingAdmissionPolicy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_validating_admission_policy_status_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ValidatingAdmissionPolicy (required)
+ :param V1ValidatingAdmissionPolicy 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(V1ValidatingAdmissionPolicy, 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_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_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 `replace_validating_admission_policy_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1ValidatingAdmissionPolicy', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_webhook_configuration(self, name, body, **kwargs): # noqa: E501
"""replace_validating_webhook_configuration # noqa: E501
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 b7f5a82c7e3..dbdffe0af64 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.29
+ The version of the OpenAPI document: release-1.30
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 3515694bffa..253d8707452 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/apiextensions_api.py b/contrib/python/kubernetes/kubernetes/client/api/apiextensions_api.py
index 7c3d0fe47f5..462e760f1d3 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.29
+ The version of the OpenAPI document: release-1.30
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 c7e143d9230..c346abcc3da 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.29
+ The version of the OpenAPI document: release-1.30
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 6da75aff7c8..739aa7858ea 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.29
+ The version of the OpenAPI document: release-1.30
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 61156002633..3484fe954bf 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.29
+ The version of the OpenAPI document: release-1.30
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 9faecca8621..fdad40cde76 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.29
+ The version of the OpenAPI document: release-1.30
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 47092410836..f365dc59e4b 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.29
+ The version of the OpenAPI document: release-1.30
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 f7c095fff97..cdde677fd74 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.29
+ The version of the OpenAPI document: release-1.30
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 89e9d7897a5..11e9e1c58e3 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.29
+ The version of the OpenAPI document: release-1.30
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 f93602ffd5c..b22e5f0f483 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/authentication_v1alpha1_api.py b/contrib/python/kubernetes/kubernetes/client/api/authentication_v1alpha1_api.py
index 72885cae0c4..8ef53156242 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/authentication_v1alpha1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/authentication_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/authentication_v1beta1_api.py b/contrib/python/kubernetes/kubernetes/client/api/authentication_v1beta1_api.py
index 29a66fb3cac..5271de544c0 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/authentication_v1beta1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/authentication_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.29
+ The version of the OpenAPI document: release-1.30
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 e1a2b9233c7..90bbfa8fd4a 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.29
+ The version of the OpenAPI document: release-1.30
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 31ecae0e7ad..ade2451a803 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.29
+ The version of the OpenAPI document: release-1.30
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 6e0055bbd2f..c0a1336bd62 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.29
+ The version of the OpenAPI document: release-1.30
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 566f37173a6..fc2130bf141 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.29
+ The version of the OpenAPI document: release-1.30
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 acad32545ad..b900e333aee 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.29
+ The version of the OpenAPI document: release-1.30
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 3402c4f8005..b62f7b81b1f 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.29
+ The version of the OpenAPI document: release-1.30
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 e47e4e18013..5763c0ec855 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.29
+ The version of the OpenAPI document: release-1.30
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 c021d0f1e79..39001a023fe 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.29
+ The version of the OpenAPI document: release-1.30
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 455484e579f..7fc7f747610 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.29
+ The version of the OpenAPI document: release-1.30
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 28f52599d3f..af7bba3ee01 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.29
+ The version of the OpenAPI document: release-1.30
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 0e721a4ab29..0c4a44ad655 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.29
+ The version of the OpenAPI document: release-1.30
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 244a1b1bdb7..ccaad8cea6e 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.29
+ The version of the OpenAPI document: release-1.30
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 e0e966f4458..bca933654e9 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.29
+ The version of the OpenAPI document: release-1.30
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 282d9b888f9..698b8ba27e9 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.29
+ The version of the OpenAPI document: release-1.30
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 31b887dbca8..0d033165c18 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.29
+ The version of the OpenAPI document: release-1.30
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 5077748ca31..78d4826df55 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.29
+ The version of the OpenAPI document: release-1.30
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 363c23789ba..08cd9316a1d 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.29
+ The version of the OpenAPI document: release-1.30
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 a73b01cea00..f7b032ff2ff 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.29
+ The version of the OpenAPI document: release-1.30
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 5fd0944b21f..d5841fea614 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.29
+ The version of the OpenAPI document: release-1.30
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 c6cc89f1f27..b64fbbd5ce1 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.29
+ The version of the OpenAPI document: release-1.30
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 0f3d2aa3545..902c7d81839 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_v1beta3_api.py b/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_v1beta3_api.py
index 18d08b93b4b..81d6e6e2903 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_v1beta3_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/flowcontrol_apiserver_v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
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 452fad72eaa..e9cecb1424d 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.29
+ The version of the OpenAPI document: release-1.30
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 ec48ab57fcb..8bc0a939f10 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.29
+ The version of the OpenAPI document: release-1.30
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 43db4648b80..686851670a7 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.29
+ The version of the OpenAPI document: release-1.30
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 50f43d82d20..1b0bf75a3cb 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.29
+ The version of the OpenAPI document: release-1.30
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 f361ea7b24b..9148d6d0528 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/networking_v1alpha1_api.py b/contrib/python/kubernetes/kubernetes/client/api/networking_v1alpha1_api.py
index 913318bd702..be2ffd78404 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/networking_v1alpha1_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/networking_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.29
+ The version of the OpenAPI document: release-1.30
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 235efc38995..152e8f94e7e 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.29
+ The version of the OpenAPI document: release-1.30
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 2b67b66e549..8c24cb48b53 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.29
+ The version of the OpenAPI document: release-1.30
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 649530a652f..6ffc34cd696 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.29
+ The version of the OpenAPI document: release-1.30
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 863df450c8d..3a39b3a4ef8 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.29
+ The version of the OpenAPI document: release-1.30
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 c017796b7e4..a6c633ffa43 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.29
+ The version of the OpenAPI document: release-1.30
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 8fa0de81a07..31c9d06f3e1 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.29
+ The version of the OpenAPI document: release-1.30
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 2088e11982a..ab40b4accb4 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.29
+ The version of the OpenAPI document: release-1.30
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 6be05068b9d..2d63a7074a7 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/api/resource_v1alpha2_api.py b/contrib/python/kubernetes/kubernetes/client/api/resource_v1alpha2_api.py
index ace3384fa82..2bdb3703631 100644
--- a/contrib/python/kubernetes/kubernetes/client/api/resource_v1alpha2_api.py
+++ b/contrib/python/kubernetes/kubernetes/client/api/resource_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -322,6 +322,149 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def create_namespaced_resource_claim_parameters(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim_parameters # noqa: E501
+
+ create ResourceClaimParameters # 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_parameters(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 V1alpha2ResourceClaimParameters 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: V1alpha2ResourceClaimParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_resource_claim_parameters_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_resource_claim_parameters_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_claim_parameters # noqa: E501
+
+ create ResourceClaimParameters # 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_parameters_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 V1alpha2ResourceClaimParameters 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(V1alpha2ResourceClaimParameters, 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_parameters" % 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_parameters`") # 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_parameters`") # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClaimParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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
@@ -465,6 +608,149 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def create_namespaced_resource_class_parameters(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_class_parameters # noqa: E501
+
+ create ResourceClassParameters # 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_class_parameters(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 V1alpha2ResourceClassParameters 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: V1alpha2ResourceClassParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_namespaced_resource_class_parameters_with_http_info(namespace, body, **kwargs) # noqa: E501
+
+ def create_namespaced_resource_class_parameters_with_http_info(self, namespace, body, **kwargs): # noqa: E501
+ """create_namespaced_resource_class_parameters # noqa: E501
+
+ create ResourceClassParameters # 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_class_parameters_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 V1alpha2ResourceClassParameters 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(V1alpha2ResourceClassParameters, 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_class_parameters" % 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_class_parameters`") # 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_class_parameters`") # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClassParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_class(self, body, **kwargs): # noqa: E501
"""create_resource_class # noqa: E501
@@ -599,6 +885,140 @@ class ResourceV1alpha2Api(object):
_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 V1alpha2ResourceSlice 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: V1alpha2ResourceSlice
+ 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 V1alpha2ResourceSlice 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(V1alpha2ResourceSlice, 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/resourceslices', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=local_var_params.get('_preload_content', True),
+ _request_timeout=local_var_params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def delete_collection_namespaced_pod_scheduling_context(self, namespace, **kwargs): # noqa: E501
"""delete_collection_namespaced_pod_scheduling_context # noqa: E501
@@ -967,6 +1387,190 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def delete_collection_namespaced_resource_claim_parameters(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim_parameters # noqa: E501
+
+ delete collection of ResourceClaimParameters # noqa: 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_parameters(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 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_parameters_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_resource_claim_parameters_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_claim_parameters # noqa: E501
+
+ delete collection of ResourceClaimParameters # noqa: 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_parameters_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 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',
+ '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_parameters" % 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_parameters`") # 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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters', '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
@@ -1151,6 +1755,190 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def delete_collection_namespaced_resource_class_parameters(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_class_parameters # noqa: E501
+
+ delete collection of ResourceClassParameters # noqa: 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_class_parameters(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 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_class_parameters_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def delete_collection_namespaced_resource_class_parameters_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """delete_collection_namespaced_resource_class_parameters # noqa: E501
+
+ delete collection of ResourceClassParameters # noqa: 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_class_parameters_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 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',
+ '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_class_parameters" % 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_class_parameters`") # 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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters', '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_class(self, **kwargs): # noqa: E501
"""delete_collection_resource_class # noqa: E501
@@ -1326,6 +2114,181 @@ class ResourceV1alpha2Api(object):
_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 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 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',
+ '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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/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_namespaced_pod_scheduling_context(self, name, namespace, **kwargs): # noqa: E501
"""delete_namespaced_pod_scheduling_context # noqa: E501
@@ -1632,6 +2595,159 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def delete_namespaced_resource_claim_parameters(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_claim_parameters # noqa: E501
+
+ delete ResourceClaimParameters # noqa: 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_parameters(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimParameters (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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"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: V1alpha2ResourceClaimParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_resource_claim_parameters_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_resource_claim_parameters_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_claim_parameters # noqa: E501
+
+ delete ResourceClaimParameters # noqa: 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_parameters_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimParameters (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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"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(V1alpha2ResourceClaimParameters, 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',
+ '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_parameters" % key
+ )
+ local_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_parameters`") # 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_parameters`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = 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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClaimParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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
@@ -1785,6 +2901,159 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def delete_namespaced_resource_class_parameters(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_class_parameters # noqa: E501
+
+ delete ResourceClassParameters # noqa: 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_class_parameters(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClassParameters (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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"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: V1alpha2ResourceClassParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.delete_namespaced_resource_class_parameters_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def delete_namespaced_resource_class_parameters_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """delete_namespaced_resource_class_parameters # noqa: E501
+
+ delete ResourceClassParameters # noqa: 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_class_parameters_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClassParameters (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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"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(V1alpha2ResourceClassParameters, 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',
+ '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_class_parameters" % key
+ )
+ local_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_class_parameters`") # 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_class_parameters`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = 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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClassParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_class(self, name, **kwargs): # noqa: E501
"""delete_resource_class # noqa: E501
@@ -1929,6 +3198,150 @@ class ResourceV1alpha2Api(object):
_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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"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: V1alpha2ResourceSlice
+ 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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"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(V1alpha2ResourceSlice, 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',
+ '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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}', 'DELETE',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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
@@ -2372,6 +3785,175 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def list_namespaced_resource_claim_parameters(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_resource_claim_parameters # noqa: E501
+
+ list or watch objects of kind ResourceClaimParameters # noqa: 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_parameters(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: V1alpha2ResourceClaimParametersList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_resource_claim_parameters_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_resource_claim_parameters_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_resource_claim_parameters # noqa: E501
+
+ list or watch objects of kind ResourceClaimParameters # noqa: 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_parameters_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(V1alpha2ResourceClaimParametersList, 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_parameters" % 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_parameters`") # 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/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClaimParametersList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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
@@ -2541,6 +4123,175 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def list_namespaced_resource_class_parameters(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_resource_class_parameters # noqa: E501
+
+ list or watch objects of kind ResourceClassParameters # noqa: 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_class_parameters(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: V1alpha2ResourceClassParametersList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_namespaced_resource_class_parameters_with_http_info(namespace, **kwargs) # noqa: E501
+
+ def list_namespaced_resource_class_parameters_with_http_info(self, namespace, **kwargs): # noqa: E501
+ """list_namespaced_resource_class_parameters # noqa: E501
+
+ list or watch objects of kind ResourceClassParameters # noqa: 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_class_parameters_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(V1alpha2ResourceClassParametersList, 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_class_parameters" % 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_class_parameters`") # 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/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClassParametersList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_scheduling_context_for_all_namespaces(self, **kwargs): # noqa: E501
"""list_pod_scheduling_context_for_all_namespaces # noqa: E501
@@ -2861,6 +4612,166 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def list_resource_claim_parameters_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_resource_claim_parameters_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ResourceClaimParameters # noqa: 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_parameters_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: V1alpha2ResourceClaimParametersList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_resource_claim_parameters_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_resource_claim_parameters_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_resource_claim_parameters_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ResourceClaimParameters # noqa: 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_parameters_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(V1alpha2ResourceClaimParametersList, 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_parameters_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/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/resourceclaimparameters', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClaimParametersList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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
@@ -3181,6 +5092,326 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def list_resource_class_parameters_for_all_namespaces(self, **kwargs): # noqa: E501
+ """list_resource_class_parameters_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ResourceClassParameters # noqa: 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_class_parameters_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: V1alpha2ResourceClassParametersList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_resource_class_parameters_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ def list_resource_class_parameters_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501
+ """list_resource_class_parameters_for_all_namespaces # noqa: E501
+
+ list or watch objects of kind ResourceClassParameters # noqa: 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_class_parameters_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(V1alpha2ResourceClassParametersList, 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_class_parameters_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/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/resourceclassparameters', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClassParametersList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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: V1alpha2ResourceSliceList
+ 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(V1alpha2ResourceSliceList, 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/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/resourceslices', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceSliceList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_scheduling_context(self, name, namespace, body, **kwargs): # noqa: E501
"""patch_namespaced_pod_scheduling_context # noqa: E501
@@ -3664,6 +5895,167 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def patch_namespaced_resource_claim_parameters(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_claim_parameters # noqa: E501
+
+ partially update the specified ResourceClaimParameters # noqa: 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_parameters(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimParameters (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: V1alpha2ResourceClaimParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_resource_claim_parameters_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_resource_claim_parameters_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_claim_parameters # noqa: E501
+
+ partially update the specified ResourceClaimParameters # noqa: 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_parameters_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 ResourceClaimParameters (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(V1alpha2ResourceClaimParameters, 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_parameters" % key
+ )
+ local_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_parameters`") # 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_parameters`") # 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_parameters`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = 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']) # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClaimParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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
@@ -3986,6 +6378,167 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def patch_namespaced_resource_class_parameters(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_class_parameters # noqa: E501
+
+ partially update the specified ResourceClassParameters # noqa: 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_class_parameters(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClassParameters (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: V1alpha2ResourceClassParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_namespaced_resource_class_parameters_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def patch_namespaced_resource_class_parameters_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """patch_namespaced_resource_class_parameters # noqa: E501
+
+ partially update the specified ResourceClassParameters # noqa: 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_class_parameters_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 ResourceClassParameters (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(V1alpha2ResourceClassParameters, 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_class_parameters" % key
+ )
+ local_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_class_parameters`") # 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_class_parameters`") # 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_class_parameters`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = 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']) # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClassParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_class(self, name, body, **kwargs): # noqa: E501
"""patch_resource_class # noqa: E501
@@ -4138,6 +6691,158 @@ class ResourceV1alpha2Api(object):
_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: V1alpha2ResourceSlice
+ 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(V1alpha2ResourceSlice, 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']) # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_scheduling_context(self, name, namespace, **kwargs): # noqa: E501
"""read_namespaced_pod_scheduling_context # noqa: E501
@@ -4522,6 +7227,134 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def read_namespaced_resource_claim_parameters(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_claim_parameters # noqa: E501
+
+ read the specified ResourceClaimParameters # noqa: 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_parameters(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimParameters (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: V1alpha2ResourceClaimParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_resource_claim_parameters_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_resource_claim_parameters_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_claim_parameters # noqa: E501
+
+ read the specified ResourceClaimParameters # noqa: 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_parameters_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimParameters (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(V1alpha2ResourceClaimParameters, 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_parameters" % key
+ )
+ local_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_parameters`") # 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_parameters`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClaimParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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
@@ -4778,6 +7611,134 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def read_namespaced_resource_class_parameters(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_class_parameters # noqa: E501
+
+ read the specified ResourceClassParameters # noqa: 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_class_parameters(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClassParameters (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: V1alpha2ResourceClassParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_namespaced_resource_class_parameters_with_http_info(name, namespace, **kwargs) # noqa: E501
+
+ def read_namespaced_resource_class_parameters_with_http_info(self, name, namespace, **kwargs): # noqa: E501
+ """read_namespaced_resource_class_parameters # noqa: E501
+
+ read the specified ResourceClassParameters # noqa: 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_class_parameters_with_http_info(name, namespace, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClassParameters (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(V1alpha2ResourceClassParameters, 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_class_parameters" % key
+ )
+ local_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_class_parameters`") # 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_class_parameters`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClassParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_class(self, name, **kwargs): # noqa: E501
"""read_resource_class # noqa: E501
@@ -4897,6 +7858,125 @@ class ResourceV1alpha2Api(object):
_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: V1alpha2ResourceSlice
+ 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(V1alpha2ResourceSlice, 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_scheduling_context(self, name, namespace, body, **kwargs): # noqa: E501
"""replace_namespaced_pod_scheduling_context # noqa: E501
@@ -5353,6 +8433,158 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def replace_namespaced_resource_claim_parameters(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_claim_parameters # noqa: E501
+
+ replace the specified ResourceClaimParameters # noqa: 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_parameters(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClaimParameters (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha2ResourceClaimParameters 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: V1alpha2ResourceClaimParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_resource_claim_parameters_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_resource_claim_parameters_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_claim_parameters # noqa: E501
+
+ replace the specified ResourceClaimParameters # noqa: 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_parameters_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 ResourceClaimParameters (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha2ResourceClaimParameters 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(V1alpha2ResourceClaimParameters, 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_parameters" % key
+ )
+ local_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_parameters`") # 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_parameters`") # 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_parameters`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClaimParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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
@@ -5657,6 +8889,158 @@ class ResourceV1alpha2Api(object):
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
+ def replace_namespaced_resource_class_parameters(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_class_parameters # noqa: E501
+
+ replace the specified ResourceClassParameters # noqa: 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_class_parameters(name, namespace, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the ResourceClassParameters (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha2ResourceClassParameters 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: V1alpha2ResourceClassParameters
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_namespaced_resource_class_parameters_with_http_info(name, namespace, body, **kwargs) # noqa: E501
+
+ def replace_namespaced_resource_class_parameters_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501
+ """replace_namespaced_resource_class_parameters # noqa: E501
+
+ replace the specified ResourceClassParameters # noqa: 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_class_parameters_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 ResourceClassParameters (required)
+ :param str namespace: object name and auth scope, such as for teams and projects (required)
+ :param V1alpha2ResourceClassParameters 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(V1alpha2ResourceClassParameters, 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_class_parameters" % key
+ )
+ local_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_class_parameters`") # 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_class_parameters`") # 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_class_parameters`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceClassParameters', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_class(self, name, body, **kwargs): # noqa: E501
"""replace_resource_class # noqa: E501
@@ -5799,3 +9183,146 @@ class ResourceV1alpha2Api(object):
_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 V1alpha2ResourceSlice 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: V1alpha2ResourceSlice
+ 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 V1alpha2ResourceSlice 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(V1alpha2ResourceSlice, 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha2ResourceSlice', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_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/scheduling_api.py b/contrib/python/kubernetes/kubernetes/client/api/scheduling_api.py
index 31b9d8aed73..eac6594d75f 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.29
+ The version of the OpenAPI document: release-1.30
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 471d37e0314..5d3429339bf 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.29
+ The version of the OpenAPI document: release-1.30
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 adb43418a70..9b7735a8fd4 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.29
+ The version of the OpenAPI document: release-1.30
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 4aaf44bae84..ca99c332eaf 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 4e9c1ebd34f..1be111f7bbc 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..b1d4653e3f5
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/api/storagemigration_api.py
@@ -0,0 +1,142 @@
+# 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.30
+ 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 StoragemigrationApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def get_api_group(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_api_group(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req 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: V1APIGroup
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.get_api_group_with_http_info(**kwargs) # noqa: E501
+
+ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
+ """get_api_group # noqa: E501
+
+ get information of a group # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_api_group_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req 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(V1APIGroup, 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_group" % 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1APIGroup', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_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/storagemigration_v1alpha1_api.py b/contrib/python/kubernetes/kubernetes/client/api/storagemigration_v1alpha1_api.py
new file mode 100644
index 00000000000..3e3fd859658
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/api/storagemigration_v1alpha1_api.py
@@ -0,0 +1,1583 @@
+# 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.30
+ 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 StoragemigrationV1alpha1Api(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def create_storage_version_migration(self, body, **kwargs): # noqa: E501
+ """create_storage_version_migration # noqa: E501
+
+ create a StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_storage_version_migration(body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param V1alpha1StorageVersionMigration 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: V1alpha1StorageVersionMigration
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.create_storage_version_migration_with_http_info(body, **kwargs) # noqa: E501
+
+ def create_storage_version_migration_with_http_info(self, body, **kwargs): # noqa: E501
+ """create_storage_version_migration # noqa: E501
+
+ create a StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.create_storage_version_migration_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param V1alpha1StorageVersionMigration 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(V1alpha1StorageVersionMigration, 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_storage_version_migration" % 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_storage_version_migration`") # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations', 'POST',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1StorageVersionMigration', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_storage_version_migration(self, **kwargs): # noqa: E501
+ """delete_collection_storage_version_migration # noqa: E501
+
+ delete collection of StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_collection_storage_version_migration(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 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_storage_version_migration_with_http_info(**kwargs) # noqa: E501
+
+ def delete_collection_storage_version_migration_with_http_info(self, **kwargs): # noqa: E501
+ """delete_collection_storage_version_migration # noqa: E501
+
+ delete collection of StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_collection_storage_version_migration_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 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',
+ '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_storage_version_migration" % 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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations', '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_storage_version_migration(self, name, **kwargs): # noqa: E501
+ """delete_storage_version_migration # noqa: E501
+
+ delete a StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_storage_version_migration(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"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_storage_version_migration_with_http_info(name, **kwargs) # noqa: E501
+
+ def delete_storage_version_migration_with_http_info(self, name, **kwargs): # noqa: E501
+ """delete_storage_version_migration # noqa: E501
+
+ delete a StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.delete_storage_version_migration_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (required)
+ :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).
+ :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
+ :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
+ :param V1DeleteOptions body:
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ local_var_params = locals()
+
+ all_params = [
+ 'name',
+ 'pretty',
+ 'dry_run',
+ 'grace_period_seconds',
+ '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_storage_version_migration" % key
+ )
+ local_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_storage_version_migration`") # 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 '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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{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
+
+ 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/', '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_storage_version_migration(self, **kwargs): # noqa: E501
+ """list_storage_version_migration # noqa: E501
+
+ list or watch objects of kind StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_storage_version_migration(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: V1alpha1StorageVersionMigrationList
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.list_storage_version_migration_with_http_info(**kwargs) # noqa: E501
+
+ def list_storage_version_migration_with_http_info(self, **kwargs): # noqa: E501
+ """list_storage_version_migration # noqa: E501
+
+ list or watch objects of kind StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.list_storage_version_migration_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(V1alpha1StorageVersionMigrationList, 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_storage_version_migration" % 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/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1StorageVersionMigrationList', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_storage_version_migration(self, name, body, **kwargs): # noqa: E501
+ """patch_storage_version_migration # noqa: E501
+
+ partially update the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_storage_version_migration(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (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: V1alpha1StorageVersionMigration
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_storage_version_migration_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_storage_version_migration_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_storage_version_migration # noqa: E501
+
+ partially update the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_storage_version_migration_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (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(V1alpha1StorageVersionMigration, 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_storage_version_migration" % key
+ )
+ local_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_storage_version_migration`") # 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_storage_version_migration`") # 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']) # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1StorageVersionMigration', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_storage_version_migration_status(self, name, body, **kwargs): # noqa: E501
+ """patch_storage_version_migration_status # noqa: E501
+
+ partially update status of the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_storage_version_migration_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (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: V1alpha1StorageVersionMigration
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.patch_storage_version_migration_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def patch_storage_version_migration_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """patch_storage_version_migration_status # noqa: E501
+
+ partially update status of the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.patch_storage_version_migration_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 StorageVersionMigration (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(V1alpha1StorageVersionMigration, 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_storage_version_migration_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_storage_version_migration_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_storage_version_migration_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']) # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status', 'PATCH',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1StorageVersionMigration', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_storage_version_migration(self, name, **kwargs): # noqa: E501
+ """read_storage_version_migration # noqa: E501
+
+ read the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.read_storage_version_migration(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (required)
+ :param str pretty: If 'true', then 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: V1alpha1StorageVersionMigration
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_storage_version_migration_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_storage_version_migration_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_storage_version_migration # noqa: E501
+
+ read the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.read_storage_version_migration_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (required)
+ :param str pretty: If 'true', then 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(V1alpha1StorageVersionMigration, 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_storage_version_migration" % key
+ )
+ local_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_storage_version_migration`") # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1StorageVersionMigration', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_storage_version_migration_status(self, name, **kwargs): # noqa: E501
+ """read_storage_version_migration_status # noqa: E501
+
+ read status of the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.read_storage_version_migration_status(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (required)
+ :param str pretty: If 'true', then 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: V1alpha1StorageVersionMigration
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.read_storage_version_migration_status_with_http_info(name, **kwargs) # noqa: E501
+
+ def read_storage_version_migration_status_with_http_info(self, name, **kwargs): # noqa: E501
+ """read_storage_version_migration_status # noqa: E501
+
+ read status of the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.read_storage_version_migration_status_with_http_info(name, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (required)
+ :param str pretty: If 'true', then 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(V1alpha1StorageVersionMigration, 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_storage_version_migration_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_storage_version_migration_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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1StorageVersionMigration', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_storage_version_migration(self, name, body, **kwargs): # noqa: E501
+ """replace_storage_version_migration # noqa: E501
+
+ replace the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_storage_version_migration(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (required)
+ :param V1alpha1StorageVersionMigration 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: V1alpha1StorageVersionMigration
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_storage_version_migration_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_storage_version_migration_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_storage_version_migration # noqa: E501
+
+ replace the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_storage_version_migration_with_http_info(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (required)
+ :param V1alpha1StorageVersionMigration 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(V1alpha1StorageVersionMigration, 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_storage_version_migration" % key
+ )
+ local_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_storage_version_migration`") # 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_storage_version_migration`") # 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']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1StorageVersionMigration', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # 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_storage_version_migration_status(self, name, body, **kwargs): # noqa: E501
+ """replace_storage_version_migration_status # noqa: E501
+
+ replace status of the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_storage_version_migration_status(name, body, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool: execute request asynchronously
+ :param str name: name of the StorageVersionMigration (required)
+ :param V1alpha1StorageVersionMigration 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: V1alpha1StorageVersionMigration
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ return self.replace_storage_version_migration_status_with_http_info(name, body, **kwargs) # noqa: E501
+
+ def replace_storage_version_migration_status_with_http_info(self, name, body, **kwargs): # noqa: E501
+ """replace_storage_version_migration_status # noqa: E501
+
+ replace status of the specified StorageVersionMigration # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.replace_storage_version_migration_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 StorageVersionMigration (required)
+ :param V1alpha1StorageVersionMigration 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(V1alpha1StorageVersionMigration, 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_storage_version_migration_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_storage_version_migration_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_storage_version_migration_status`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'name' in local_var_params:
+ path_params['name'] = local_var_params['name'] # noqa: E501
+
+ query_params = []
+ if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501
+ query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501
+ if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501
+ query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501
+ if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501
+ query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501
+ if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501
+ query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in local_var_params:
+ body_params = local_var_params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['BearerToken'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='V1alpha1StorageVersionMigration', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=local_var_params.get('async_req'),
+ _return_http_data_only=local_var_params.get('_return_http_data_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/version_api.py b/contrib/python/kubernetes/kubernetes/client/api/version_api.py
index 72c61341e0f..3866ca7b881 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.29
+ The version of the OpenAPI document: release-1.30
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 e2dc840a9d3..0bff79e80ce 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.29
+ The version of the OpenAPI document: release-1.30
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 1b064937feb..0324e122aec 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.29
+ The version of the OpenAPI document: release-1.30
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/29.0.0/python'
+ self.user_agent = 'OpenAPI-Generator/30.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 6046bcb01be..e098b02b214 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -353,8 +353,8 @@ class Configuration(object):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
- "Version of the API: release-1.29\n"\
- "SDK Package Version: 29.0.0".\
+ "Version of the API: release-1.30\n"\
+ "SDK Package Version: 30.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 c7c152b577d..7274cbdf5d1 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.29
+ The version of the OpenAPI document: release-1.30
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 25b9bc80925..6632e67dbbd 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -44,7 +44,9 @@ 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_app_armor_profile import V1AppArmorProfile
from kubernetes.client.models.v1_attached_volume import V1AttachedVolume
+from kubernetes.client.models.v1_audit_annotation import V1AuditAnnotation
from kubernetes.client.models.v1_azure_disk_volume_source import V1AzureDiskVolumeSource
from kubernetes.client.models.v1_azure_file_persistent_volume_source import V1AzureFilePersistentVolumeSource
from kubernetes.client.models.v1_azure_file_volume_source import V1AzureFileVolumeSource
@@ -153,6 +155,7 @@ from kubernetes.client.models.v1_event_source import V1EventSource
from kubernetes.client.models.v1_eviction import V1Eviction
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
from kubernetes.client.models.v1_external_documentation import V1ExternalDocumentation
from kubernetes.client.models.v1_fc_volume_source import V1FCVolumeSource
from kubernetes.client.models.v1_flex_persistent_volume_source import V1FlexPersistentVolumeSource
@@ -230,11 +233,13 @@ from kubernetes.client.models.v1_local_subject_access_review import V1LocalSubje
from kubernetes.client.models.v1_local_volume_source import V1LocalVolumeSource
from kubernetes.client.models.v1_managed_fields_entry import V1ManagedFieldsEntry
from kubernetes.client.models.v1_match_condition import V1MatchCondition
+from kubernetes.client.models.v1_match_resources import V1MatchResources
from kubernetes.client.models.v1_modify_volume_status import V1ModifyVolumeStatus
from kubernetes.client.models.v1_mutating_webhook import V1MutatingWebhook
from kubernetes.client.models.v1_mutating_webhook_configuration import V1MutatingWebhookConfiguration
from kubernetes.client.models.v1_mutating_webhook_configuration_list import V1MutatingWebhookConfigurationList
from kubernetes.client.models.v1_nfs_volume_source import V1NFSVolumeSource
+from kubernetes.client.models.v1_named_rule_with_operations import V1NamedRuleWithOperations
from kubernetes.client.models.v1_namespace import V1Namespace
from kubernetes.client.models.v1_namespace_condition import V1NamespaceCondition
from kubernetes.client.models.v1_namespace_list import V1NamespaceList
@@ -255,6 +260,8 @@ from kubernetes.client.models.v1_node_config_source import V1NodeConfigSource
from kubernetes.client.models.v1_node_config_status import V1NodeConfigStatus
from kubernetes.client.models.v1_node_daemon_endpoints import V1NodeDaemonEndpoints
from kubernetes.client.models.v1_node_list import V1NodeList
+from kubernetes.client.models.v1_node_runtime_handler import V1NodeRuntimeHandler
+from kubernetes.client.models.v1_node_runtime_handler_features import V1NodeRuntimeHandlerFeatures
from kubernetes.client.models.v1_node_selector import V1NodeSelector
from kubernetes.client.models.v1_node_selector_requirement import V1NodeSelectorRequirement
from kubernetes.client.models.v1_node_selector_term import V1NodeSelectorTerm
@@ -269,6 +276,8 @@ from kubernetes.client.models.v1_object_meta import V1ObjectMeta
from kubernetes.client.models.v1_object_reference import V1ObjectReference
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
+from kubernetes.client.models.v1_param_ref import V1ParamRef
from kubernetes.client.models.v1_persistent_volume import V1PersistentVolume
from kubernetes.client.models.v1_persistent_volume_claim import V1PersistentVolumeClaim
from kubernetes.client.models.v1_persistent_volume_claim_condition import V1PersistentVolumeClaimCondition
@@ -378,6 +387,7 @@ from kubernetes.client.models.v1_secret_projection import V1SecretProjection
from kubernetes.client.models.v1_secret_reference import V1SecretReference
from kubernetes.client.models.v1_secret_volume_source import V1SecretVolumeSource
from kubernetes.client.models.v1_security_context import V1SecurityContext
+from kubernetes.client.models.v1_selectable_field import V1SelectableField
from kubernetes.client.models.v1_self_subject_access_review import V1SelfSubjectAccessReview
from kubernetes.client.models.v1_self_subject_access_review_spec import V1SelfSubjectAccessReviewSpec
from kubernetes.client.models.v1_self_subject_review import V1SelfSubjectReview
@@ -416,6 +426,8 @@ from kubernetes.client.models.v1_subject_access_review import V1SubjectAccessRev
from kubernetes.client.models.v1_subject_access_review_spec import V1SubjectAccessReviewSpec
from kubernetes.client.models.v1_subject_access_review_status import V1SubjectAccessReviewStatus
from kubernetes.client.models.v1_subject_rules_review_status import V1SubjectRulesReviewStatus
+from kubernetes.client.models.v1_success_policy import V1SuccessPolicy
+from kubernetes.client.models.v1_success_policy_rule import V1SuccessPolicyRule
from kubernetes.client.models.v1_sysctl import V1Sysctl
from kubernetes.client.models.v1_tcp_socket_action import V1TCPSocketAction
from kubernetes.client.models.v1_taint import V1Taint
@@ -428,15 +440,25 @@ from kubernetes.client.models.v1_toleration import V1Toleration
from kubernetes.client.models.v1_topology_selector_label_requirement import V1TopologySelectorLabelRequirement
from kubernetes.client.models.v1_topology_selector_term import V1TopologySelectorTerm
from kubernetes.client.models.v1_topology_spread_constraint import V1TopologySpreadConstraint
+from kubernetes.client.models.v1_type_checking import V1TypeChecking
from kubernetes.client.models.v1_typed_local_object_reference import V1TypedLocalObjectReference
from kubernetes.client.models.v1_typed_object_reference import V1TypedObjectReference
from kubernetes.client.models.v1_uncounted_terminated_pods import V1UncountedTerminatedPods
from kubernetes.client.models.v1_user_info import V1UserInfo
from kubernetes.client.models.v1_user_subject import V1UserSubject
+from kubernetes.client.models.v1_validating_admission_policy import V1ValidatingAdmissionPolicy
+from kubernetes.client.models.v1_validating_admission_policy_binding import V1ValidatingAdmissionPolicyBinding
+from kubernetes.client.models.v1_validating_admission_policy_binding_list import V1ValidatingAdmissionPolicyBindingList
+from kubernetes.client.models.v1_validating_admission_policy_binding_spec import V1ValidatingAdmissionPolicyBindingSpec
+from kubernetes.client.models.v1_validating_admission_policy_list import V1ValidatingAdmissionPolicyList
+from kubernetes.client.models.v1_validating_admission_policy_spec import V1ValidatingAdmissionPolicySpec
+from kubernetes.client.models.v1_validating_admission_policy_status import V1ValidatingAdmissionPolicyStatus
from kubernetes.client.models.v1_validating_webhook import V1ValidatingWebhook
from kubernetes.client.models.v1_validating_webhook_configuration import V1ValidatingWebhookConfiguration
from kubernetes.client.models.v1_validating_webhook_configuration_list import V1ValidatingWebhookConfigurationList
+from kubernetes.client.models.v1_validation import V1Validation
from kubernetes.client.models.v1_validation_rule import V1ValidationRule
+from kubernetes.client.models.v1_variable import V1Variable
from kubernetes.client.models.v1_volume import V1Volume
from kubernetes.client.models.v1_volume_attachment import V1VolumeAttachment
from kubernetes.client.models.v1_volume_attachment_list import V1VolumeAttachmentList
@@ -446,6 +468,7 @@ from kubernetes.client.models.v1_volume_attachment_status import V1VolumeAttachm
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
+from kubernetes.client.models.v1_volume_mount_status import V1VolumeMountStatus
from kubernetes.client.models.v1_volume_node_affinity import V1VolumeNodeAffinity
from kubernetes.client.models.v1_volume_node_resources import V1VolumeNodeResources
from kubernetes.client.models.v1_volume_projection import V1VolumeProjection
@@ -460,11 +483,13 @@ from kubernetes.client.models.v1alpha1_cluster_trust_bundle import V1alpha1Clust
from kubernetes.client.models.v1alpha1_cluster_trust_bundle_list import V1alpha1ClusterTrustBundleList
from kubernetes.client.models.v1alpha1_cluster_trust_bundle_spec import V1alpha1ClusterTrustBundleSpec
from kubernetes.client.models.v1alpha1_expression_warning import V1alpha1ExpressionWarning
+from kubernetes.client.models.v1alpha1_group_version_resource import V1alpha1GroupVersionResource
from kubernetes.client.models.v1alpha1_ip_address import V1alpha1IPAddress
from kubernetes.client.models.v1alpha1_ip_address_list import V1alpha1IPAddressList
from kubernetes.client.models.v1alpha1_ip_address_spec import V1alpha1IPAddressSpec
from kubernetes.client.models.v1alpha1_match_condition import V1alpha1MatchCondition
from kubernetes.client.models.v1alpha1_match_resources import V1alpha1MatchResources
+from kubernetes.client.models.v1alpha1_migration_condition import V1alpha1MigrationCondition
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
@@ -479,6 +504,10 @@ from kubernetes.client.models.v1alpha1_service_cidr_status import V1alpha1Servic
from kubernetes.client.models.v1alpha1_storage_version import V1alpha1StorageVersion
from kubernetes.client.models.v1alpha1_storage_version_condition import V1alpha1StorageVersionCondition
from kubernetes.client.models.v1alpha1_storage_version_list import V1alpha1StorageVersionList
+from kubernetes.client.models.v1alpha1_storage_version_migration import V1alpha1StorageVersionMigration
+from kubernetes.client.models.v1alpha1_storage_version_migration_list import V1alpha1StorageVersionMigrationList
+from kubernetes.client.models.v1alpha1_storage_version_migration_spec import V1alpha1StorageVersionMigrationSpec
+from kubernetes.client.models.v1alpha1_storage_version_migration_status import V1alpha1StorageVersionMigrationStatus
from kubernetes.client.models.v1alpha1_storage_version_status import V1alpha1StorageVersionStatus
from kubernetes.client.models.v1alpha1_type_checking import V1alpha1TypeChecking
from kubernetes.client.models.v1alpha1_validating_admission_policy import V1alpha1ValidatingAdmissionPolicy
@@ -493,6 +522,16 @@ from kubernetes.client.models.v1alpha1_variable import V1alpha1Variable
from kubernetes.client.models.v1alpha1_volume_attributes_class import V1alpha1VolumeAttributesClass
from kubernetes.client.models.v1alpha1_volume_attributes_class_list import V1alpha1VolumeAttributesClassList
from kubernetes.client.models.v1alpha2_allocation_result import V1alpha2AllocationResult
+from kubernetes.client.models.v1alpha2_driver_allocation_result import V1alpha2DriverAllocationResult
+from kubernetes.client.models.v1alpha2_driver_requests import V1alpha2DriverRequests
+from kubernetes.client.models.v1alpha2_named_resources_allocation_result import V1alpha2NamedResourcesAllocationResult
+from kubernetes.client.models.v1alpha2_named_resources_attribute import V1alpha2NamedResourcesAttribute
+from kubernetes.client.models.v1alpha2_named_resources_filter import V1alpha2NamedResourcesFilter
+from kubernetes.client.models.v1alpha2_named_resources_instance import V1alpha2NamedResourcesInstance
+from kubernetes.client.models.v1alpha2_named_resources_int_slice import V1alpha2NamedResourcesIntSlice
+from kubernetes.client.models.v1alpha2_named_resources_request import V1alpha2NamedResourcesRequest
+from kubernetes.client.models.v1alpha2_named_resources_resources import V1alpha2NamedResourcesResources
+from kubernetes.client.models.v1alpha2_named_resources_string_slice import V1alpha2NamedResourcesStringSlice
from kubernetes.client.models.v1alpha2_pod_scheduling_context import V1alpha2PodSchedulingContext
from kubernetes.client.models.v1alpha2_pod_scheduling_context_list import V1alpha2PodSchedulingContextList
from kubernetes.client.models.v1alpha2_pod_scheduling_context_spec import V1alpha2PodSchedulingContextSpec
@@ -500,6 +539,8 @@ from kubernetes.client.models.v1alpha2_pod_scheduling_context_status import V1al
from kubernetes.client.models.v1alpha2_resource_claim import V1alpha2ResourceClaim
from kubernetes.client.models.v1alpha2_resource_claim_consumer_reference import V1alpha2ResourceClaimConsumerReference
from kubernetes.client.models.v1alpha2_resource_claim_list import V1alpha2ResourceClaimList
+from kubernetes.client.models.v1alpha2_resource_claim_parameters import V1alpha2ResourceClaimParameters
+from kubernetes.client.models.v1alpha2_resource_claim_parameters_list import V1alpha2ResourceClaimParametersList
from kubernetes.client.models.v1alpha2_resource_claim_parameters_reference import V1alpha2ResourceClaimParametersReference
from kubernetes.client.models.v1alpha2_resource_claim_scheduling_status import V1alpha2ResourceClaimSchedulingStatus
from kubernetes.client.models.v1alpha2_resource_claim_spec import V1alpha2ResourceClaimSpec
@@ -509,8 +550,16 @@ from kubernetes.client.models.v1alpha2_resource_claim_template_list import V1alp
from kubernetes.client.models.v1alpha2_resource_claim_template_spec import V1alpha2ResourceClaimTemplateSpec
from kubernetes.client.models.v1alpha2_resource_class import V1alpha2ResourceClass
from kubernetes.client.models.v1alpha2_resource_class_list import V1alpha2ResourceClassList
+from kubernetes.client.models.v1alpha2_resource_class_parameters import V1alpha2ResourceClassParameters
+from kubernetes.client.models.v1alpha2_resource_class_parameters_list import V1alpha2ResourceClassParametersList
from kubernetes.client.models.v1alpha2_resource_class_parameters_reference import V1alpha2ResourceClassParametersReference
+from kubernetes.client.models.v1alpha2_resource_filter import V1alpha2ResourceFilter
from kubernetes.client.models.v1alpha2_resource_handle import V1alpha2ResourceHandle
+from kubernetes.client.models.v1alpha2_resource_request import V1alpha2ResourceRequest
+from kubernetes.client.models.v1alpha2_resource_slice import V1alpha2ResourceSlice
+from kubernetes.client.models.v1alpha2_resource_slice_list import V1alpha2ResourceSliceList
+from kubernetes.client.models.v1alpha2_structured_resource_handle import V1alpha2StructuredResourceHandle
+from kubernetes.client.models.v1alpha2_vendor_parameters import V1alpha2VendorParameters
from kubernetes.client.models.v1beta1_audit_annotation import V1beta1AuditAnnotation
from kubernetes.client.models.v1beta1_expression_warning import V1beta1ExpressionWarning
from kubernetes.client.models.v1beta1_match_condition import V1beta1MatchCondition
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 dbc68520d87..f20871308b1 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.29
+ The version of the OpenAPI document: release-1.30
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 5e70111decc..3584b083432 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.29
+ The version of the OpenAPI document: release-1.30
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 a54d012290c..c47ba335569 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.29
+ The version of the OpenAPI document: release-1.30
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 bd2e4b511d4..a893dc33f3a 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.29
+ The version of the OpenAPI document: release-1.30
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 c527a18242f..0567ba9c496 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.29
+ The version of the OpenAPI document: release-1.30
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 539030bc914..bcb64c932c3 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.29
+ The version of the OpenAPI document: release-1.30
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 77168b99850..976c851f3cb 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.29
+ The version of the OpenAPI document: release-1.30
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 481bb350a7f..ff48ef4ec31 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.29
+ The version of the OpenAPI document: release-1.30
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 d74cb8c6e87..1b61549afd6 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.29
+ The version of the OpenAPI document: release-1.30
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 b7c4477c2fb..f8475e89103 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 dcec15d3ac2..5b00b201183 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.29
+ The version of the OpenAPI document: release-1.30
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 333a85fc905..8c03e9ff232 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.29
+ The version of the OpenAPI document: release-1.30
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 b781fa9991c..1c4c3fbaa39 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.29
+ The version of the OpenAPI document: release-1.30
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 91b6adb0a77..2edab7a9f4d 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.29
+ The version of the OpenAPI document: release-1.30
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 613cb7caa5e..bc45fcbf7b3 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.29
+ The version of the OpenAPI document: release-1.30
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 b6dd0f7f118..870a0c08de8 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 34aab4674fa..366b26f78d7 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.29
+ The version of the OpenAPI document: release-1.30
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 857f5fdd664..11565e44e8d 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.29
+ The version of the OpenAPI document: release-1.30
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 e8f1bb30a38..cb071b03cd1 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 7e05ec26450..a0368bd83dd 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.29
+ The version of the OpenAPI document: release-1.30
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 c46f85be70c..9cdbff77fc8 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.29
+ The version of the OpenAPI document: release-1.30
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 9ebe8affb62..15e92b3e0b6 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.29
+ The version of the OpenAPI document: release-1.30
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 321f81f677a..80d1bba0b13 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.29
+ The version of the OpenAPI document: release-1.30
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 6307036243e..e53187e3d50 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.29
+ The version of the OpenAPI document: release-1.30
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 fc10aa02d28..aad9b59dc79 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.29
+ The version of the OpenAPI document: release-1.30
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 60f6d86c697..cd63214c011 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.29
+ The version of the OpenAPI document: release-1.30
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 fc96f0de0d9..1d29cf462f8 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.29
+ The version of the OpenAPI document: release-1.30
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 59915999ae5..0305937d03c 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.29
+ The version of the OpenAPI document: release-1.30
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 c29a452451d..15cce92ae6a 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..8d2321449bd
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_app_armor_profile.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1AppArmorProfile(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 = {
+ 'localhost_profile': 'str',
+ 'type': 'str'
+ }
+
+ attribute_map = {
+ 'localhost_profile': 'localhostProfile',
+ 'type': 'type'
+ }
+
+ def __init__(self, localhost_profile=None, type=None, local_vars_configuration=None): # noqa: E501
+ """V1AppArmorProfile - 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._localhost_profile = None
+ self._type = None
+ self.discriminator = None
+
+ if localhost_profile is not None:
+ self.localhost_profile = localhost_profile
+ self.type = type
+
+ @property
+ def localhost_profile(self):
+ """Gets the localhost_profile of this V1AppArmorProfile. # noqa: E501
+
+ localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\". # noqa: E501
+
+ :return: The localhost_profile of this V1AppArmorProfile. # noqa: E501
+ :rtype: str
+ """
+ return self._localhost_profile
+
+ @localhost_profile.setter
+ def localhost_profile(self, localhost_profile):
+ """Sets the localhost_profile of this V1AppArmorProfile.
+
+ localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\". # noqa: E501
+
+ :param localhost_profile: The localhost_profile of this V1AppArmorProfile. # noqa: E501
+ :type: str
+ """
+
+ self._localhost_profile = localhost_profile
+
+ @property
+ def type(self):
+ """Gets the type of this V1AppArmorProfile. # noqa: E501
+
+ type indicates which kind of AppArmor profile will be applied. Valid options are: Localhost - a profile pre-loaded on the node. RuntimeDefault - the container runtime's default profile. Unconfined - no AppArmor enforcement. # noqa: E501
+
+ :return: The type of this V1AppArmorProfile. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this V1AppArmorProfile.
+
+ type indicates which kind of AppArmor profile will be applied. Valid options are: Localhost - a profile pre-loaded on the node. RuntimeDefault - the container runtime's default profile. Unconfined - no AppArmor enforcement. # noqa: E501
+
+ :param type: The type of this V1AppArmorProfile. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
+ raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
+
+ self._type = 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, V1AppArmorProfile):
+ 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, V1AppArmorProfile):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 6df3f5f7654..4f19e2d0a17 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..bf56986ba24
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_audit_annotation.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1AuditAnnotation(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
+ """V1AuditAnnotation - 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 V1AuditAnnotation. # 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 V1AuditAnnotation. # noqa: E501
+ :rtype: str
+ """
+ return self._key
+
+ @key.setter
+ def key(self, key):
+ """Sets the key of this V1AuditAnnotation.
+
+ 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 V1AuditAnnotation. # 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 V1AuditAnnotation. # 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 V1AuditAnnotation. # noqa: E501
+ :rtype: str
+ """
+ return self._value_expression
+
+ @value_expression.setter
+ def value_expression(self, value_expression):
+ """Sets the value_expression of this V1AuditAnnotation.
+
+ 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 V1AuditAnnotation. # 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, V1AuditAnnotation):
+ 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, V1AuditAnnotation):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 ae86cb304a5..b5065feaa7b 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.29
+ The version of the OpenAPI document: release-1.30
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 8386ae93c6b..0c6faa09aab 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.29
+ The version of the OpenAPI document: release-1.30
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 ac79bc7c79f..648995c1f60 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.29
+ The version of the OpenAPI document: release-1.30
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 fe1408ef5aa..e99d6476ad4 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.29
+ The version of the OpenAPI document: release-1.30
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 28271b72c22..2db9a8c711f 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.29
+ The version of the OpenAPI document: release-1.30
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 8b82ba1f462..bc8c6258631 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.29
+ The version of the OpenAPI document: release-1.30
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 965a397b39c..3e6525d4508 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 dcad897aa5c..1b1c8263c3a 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.29
+ The version of the OpenAPI document: release-1.30
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 e3d8d6c4554..9861cb27b01 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.29
+ The version of the OpenAPI document: release-1.30
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 6a607972ded..ac8f0a2a6f7 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.29
+ The version of the OpenAPI document: release-1.30
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 943be0314c6..1b3cf992cf5 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.29
+ The version of the OpenAPI document: release-1.30
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 f6494f85ce6..bbe453848d4 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.29
+ The version of the OpenAPI document: release-1.30
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 e1849de8f99..bbaa3ca7786 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.29
+ The version of the OpenAPI document: release-1.30
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 f28910cd0cc..f1b6801554b 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.29
+ The version of the OpenAPI document: release-1.30
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 71a272d4f01..65eeb2fe19f 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.29
+ The version of the OpenAPI document: release-1.30
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 7be6737c50c..38cb3a59b28 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_claim_source.py b/contrib/python/kubernetes/kubernetes/client/models/v1_claim_source.py
index cfa7a14e96b..7c7c417766a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_claim_source.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_claim_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.29
+ The version of the OpenAPI document: release-1.30
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 b01c271af2e..5588c858d87 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.29
+ The version of the OpenAPI document: release-1.30
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 b9c22e18779..55d03ac3c2a 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.29
+ The version of the OpenAPI document: release-1.30
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 374d1840a46..11d91650955 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.29
+ The version of the OpenAPI document: release-1.30
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 04c398aa9a3..0e1c13f8e2d 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.29
+ The version of the OpenAPI document: release-1.30
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 c3788481b73..10107d34d92 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.29
+ The version of the OpenAPI document: release-1.30
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 9a32bc9c88a..3bd9e978cb2 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.29
+ The version of the OpenAPI document: release-1.30
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 21c5b38a904..701777cb2b3 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.29
+ The version of the OpenAPI document: release-1.30
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 9a404a28a30..511db22e5d5 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.29
+ The version of the OpenAPI document: release-1.30
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 7b2144fff0a..f1106a20c05 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.29
+ The version of the OpenAPI document: release-1.30
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 c4a6e2619a5..0bae1adba02 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.29
+ The version of the OpenAPI document: release-1.30
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 d4e88e18fe5..27c0aa1dbc4 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.29
+ The version of the OpenAPI document: release-1.30
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 c049f5047f3..c5167aa892f 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -61,7 +61,7 @@ class V1ConfigMapEnvSource(object):
def name(self):
"""Gets the name of this V1ConfigMapEnvSource. # noqa: E501
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:return: The name of this V1ConfigMapEnvSource. # noqa: E501
:rtype: str
@@ -72,7 +72,7 @@ class V1ConfigMapEnvSource(object):
def name(self, name):
"""Sets the name of this V1ConfigMapEnvSource.
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:param name: The name of this V1ConfigMapEnvSource. # noqa: E501
:type: str
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 94d9a33b25f..d3d8ae5524d 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -90,7 +90,7 @@ class V1ConfigMapKeySelector(object):
def name(self):
"""Gets the name of this V1ConfigMapKeySelector. # noqa: E501
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:return: The name of this V1ConfigMapKeySelector. # noqa: E501
:rtype: str
@@ -101,7 +101,7 @@ class V1ConfigMapKeySelector(object):
def name(self, name):
"""Sets the name of this V1ConfigMapKeySelector.
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:param name: The name of this V1ConfigMapKeySelector. # noqa: E501
:type: str
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 62854cce81e..1e9383f030f 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.29
+ The version of the OpenAPI document: release-1.30
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 32c61b985fd..ee58987fe29 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.29
+ The version of the OpenAPI document: release-1.30
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 07062441048..e77e88d4c23 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -89,7 +89,7 @@ class V1ConfigMapProjection(object):
def name(self):
"""Gets the name of this V1ConfigMapProjection. # noqa: E501
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:return: The name of this V1ConfigMapProjection. # noqa: E501
:rtype: str
@@ -100,7 +100,7 @@ class V1ConfigMapProjection(object):
def name(self, name):
"""Sets the name of this V1ConfigMapProjection.
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:param name: The name of this V1ConfigMapProjection. # noqa: E501
:type: str
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 1aa1724ff0f..6ea5ef96646 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -117,7 +117,7 @@ class V1ConfigMapVolumeSource(object):
def name(self):
"""Gets the name of this V1ConfigMapVolumeSource. # noqa: E501
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:return: The name of this V1ConfigMapVolumeSource. # noqa: E501
:rtype: str
@@ -128,7 +128,7 @@ class V1ConfigMapVolumeSource(object):
def name(self, name):
"""Sets the name of this V1ConfigMapVolumeSource.
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:param name: The name of this V1ConfigMapVolumeSource. # noqa: E501
:type: str
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_container.py b/contrib/python/kubernetes/kubernetes/client/models/v1_container.py
index c1ea9b17900..1e59307429a 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 b20d967095c..4651d82503c 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.29
+ The version of the OpenAPI document: release-1.30
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 2c2b9896379..7a72cb282a0 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.29
+ The version of the OpenAPI document: release-1.30
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 f17a147a0d2..bda0c7596a6 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 bc4c2017968..cc6c45b534b 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.29
+ The version of the OpenAPI document: release-1.30
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 6ffab8908df..d1b00f14e7a 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.29
+ The version of the OpenAPI document: release-1.30
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 11ff0ecf67a..7f7cd083850 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.29
+ The version of the OpenAPI document: release-1.30
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 79669db8f1e..84a3a643f38 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.29
+ The version of the OpenAPI document: release-1.30
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 9dd00f91d33..3e6654b3867 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -43,7 +43,8 @@ class V1ContainerStatus(object):
'resources': 'V1ResourceRequirements',
'restart_count': 'int',
'started': 'bool',
- 'state': 'V1ContainerState'
+ 'state': 'V1ContainerState',
+ 'volume_mounts': 'list[V1VolumeMountStatus]'
}
attribute_map = {
@@ -57,10 +58,11 @@ class V1ContainerStatus(object):
'resources': 'resources',
'restart_count': 'restartCount',
'started': 'started',
- 'state': 'state'
+ 'state': 'state',
+ 'volume_mounts': 'volumeMounts'
}
- def __init__(self, allocated_resources=None, container_id=None, image=None, image_id=None, last_state=None, name=None, ready=None, resources=None, restart_count=None, started=None, state=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, allocated_resources=None, container_id=None, image=None, image_id=None, last_state=None, name=None, ready=None, resources=None, restart_count=None, started=None, state=None, volume_mounts=None, local_vars_configuration=None): # noqa: E501
"""V1ContainerStatus - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -77,6 +79,7 @@ class V1ContainerStatus(object):
self._restart_count = None
self._started = None
self._state = None
+ self._volume_mounts = None
self.discriminator = None
if allocated_resources is not None:
@@ -96,6 +99,8 @@ class V1ContainerStatus(object):
self.started = started
if state is not None:
self.state = state
+ if volume_mounts is not None:
+ self.volume_mounts = volume_mounts
@property
def allocated_resources(self):
@@ -354,6 +359,29 @@ class V1ContainerStatus(object):
self._state = state
+ @property
+ def volume_mounts(self):
+ """Gets the volume_mounts of this V1ContainerStatus. # noqa: E501
+
+ Status of volume mounts. # noqa: E501
+
+ :return: The volume_mounts of this V1ContainerStatus. # noqa: E501
+ :rtype: list[V1VolumeMountStatus]
+ """
+ return self._volume_mounts
+
+ @volume_mounts.setter
+ def volume_mounts(self, volume_mounts):
+ """Sets the volume_mounts of this V1ContainerStatus.
+
+ Status of volume mounts. # noqa: E501
+
+ :param volume_mounts: The volume_mounts of this V1ContainerStatus. # noqa: E501
+ :type: list[V1VolumeMountStatus]
+ """
+
+ self._volume_mounts = volume_mounts
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
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 cec0fe9879d..f3e4376d2a6 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.29
+ The version of the OpenAPI document: release-1.30
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 58b05c3c10f..d7b79cafaa4 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 39db843ccef..36ae1613986 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.29
+ The version of the OpenAPI document: release-1.30
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 28843dcefa8..f378b159d3c 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.29
+ The version of the OpenAPI document: release-1.30
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 15cd0140074..8060eeef0a3 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.29
+ The version of the OpenAPI document: release-1.30
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 cb4f0841593..15679b2f55b 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.29
+ The version of the OpenAPI document: release-1.30
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 193c067ea69..b0c8790b06f 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.29
+ The version of the OpenAPI document: release-1.30
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 e4736ce9757..332db219d4d 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.29
+ The version of the OpenAPI document: release-1.30
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 ad1ae9c4a89..ac02518c86f 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.29
+ The version of the OpenAPI document: release-1.30
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 2cbd6724cea..a82171f240b 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -114,7 +114,7 @@ class V1CSIDriverSpec(object):
def fs_group_policy(self):
"""Gets the fs_group_policy of this V1CSIDriverSpec. # noqa: E501
- fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is immutable. Defaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce. # noqa: E501
+ fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field was immutable in Kubernetes < 1.29 and now is mutable. Defaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce. # noqa: E501
:return: The fs_group_policy of this V1CSIDriverSpec. # noqa: E501
:rtype: str
@@ -125,7 +125,7 @@ class V1CSIDriverSpec(object):
def fs_group_policy(self, fs_group_policy):
"""Sets the fs_group_policy of this V1CSIDriverSpec.
- fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is immutable. Defaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce. # noqa: E501
+ fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field was immutable in Kubernetes < 1.29 and now is mutable. Defaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce. # noqa: E501
:param fs_group_policy: The fs_group_policy of this V1CSIDriverSpec. # noqa: E501
:type: str
@@ -137,7 +137,7 @@ class V1CSIDriverSpec(object):
def pod_info_on_mount(self):
"""Gets the pod_info_on_mount of this V1CSIDriverSpec. # noqa: E501
- podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise \"false\" \"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. This field is immutable. # noqa: E501
+ podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise \"false\" \"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. This field was immutable in Kubernetes < 1.29 and now is mutable. # noqa: E501
:return: The pod_info_on_mount of this V1CSIDriverSpec. # noqa: E501
:rtype: bool
@@ -148,7 +148,7 @@ class V1CSIDriverSpec(object):
def pod_info_on_mount(self, pod_info_on_mount):
"""Sets the pod_info_on_mount of this V1CSIDriverSpec.
- podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise \"false\" \"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. This field is immutable. # noqa: E501
+ podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise \"false\" \"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. This field was immutable in Kubernetes < 1.29 and now is mutable. # noqa: E501
:param pod_info_on_mount: The pod_info_on_mount of this V1CSIDriverSpec. # noqa: E501
:type: bool
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 57f2e549bd5..402c8a82aea 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.29
+ The version of the OpenAPI document: release-1.30
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 dcf7f65eb26..8feee6baddc 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.29
+ The version of the OpenAPI document: release-1.30
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 fa94801d2fd..3e3bb6f6d97 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.29
+ The version of the OpenAPI document: release-1.30
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 d84ff7f88e7..84cb84ffae7 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.29
+ The version of the OpenAPI document: release-1.30
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 c3b0ecd4464..06164107380 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.29
+ The version of the OpenAPI document: release-1.30
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 e85f9801e95..b84558ac8ad 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.29
+ The version of the OpenAPI document: release-1.30
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 0ffd39c10db..ae9ecdfb22f 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.29
+ The version of the OpenAPI document: release-1.30
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 e9a9737d972..be3bc349974 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.29
+ The version of the OpenAPI document: release-1.30
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 c997cbaf37f..7bad30dabf3 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.29
+ The version of the OpenAPI document: release-1.30
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 21a3d85d643..e5f28be316e 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.29
+ The version of the OpenAPI document: release-1.30
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 1057a2dbc8a..33461ded34e 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.29
+ The version of the OpenAPI document: release-1.30
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 2cdeaa7b091..d926f4ec64f 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.29
+ The version of the OpenAPI document: release-1.30
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 7ddc2a8c296..f45ec3b4e39 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.29
+ The version of the OpenAPI document: release-1.30
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 ba1d51e53db..d8f30604b3e 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.29
+ The version of the OpenAPI document: release-1.30
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 103e10a2400..cf4a2e056fc 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.29
+ The version of the OpenAPI document: release-1.30
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 8a4266ff77d..fbc929a8fac 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.29
+ The version of the OpenAPI document: release-1.30
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 9241f85a7e0..9855eb41124 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -38,6 +38,7 @@ class V1CustomResourceDefinitionVersion(object):
'deprecation_warning': 'str',
'name': 'str',
'schema': 'V1CustomResourceValidation',
+ 'selectable_fields': 'list[V1SelectableField]',
'served': 'bool',
'storage': 'bool',
'subresources': 'V1CustomResourceSubresources'
@@ -49,12 +50,13 @@ class V1CustomResourceDefinitionVersion(object):
'deprecation_warning': 'deprecationWarning',
'name': 'name',
'schema': 'schema',
+ 'selectable_fields': 'selectableFields',
'served': 'served',
'storage': 'storage',
'subresources': 'subresources'
}
- def __init__(self, additional_printer_columns=None, deprecated=None, deprecation_warning=None, name=None, schema=None, served=None, storage=None, subresources=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, additional_printer_columns=None, deprecated=None, deprecation_warning=None, name=None, schema=None, selectable_fields=None, served=None, storage=None, subresources=None, local_vars_configuration=None): # noqa: E501
"""V1CustomResourceDefinitionVersion - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -65,6 +67,7 @@ class V1CustomResourceDefinitionVersion(object):
self._deprecation_warning = None
self._name = None
self._schema = None
+ self._selectable_fields = None
self._served = None
self._storage = None
self._subresources = None
@@ -79,6 +82,8 @@ class V1CustomResourceDefinitionVersion(object):
self.name = name
if schema is not None:
self.schema = schema
+ if selectable_fields is not None:
+ self.selectable_fields = selectable_fields
self.served = served
self.storage = storage
if subresources is not None:
@@ -200,6 +205,29 @@ class V1CustomResourceDefinitionVersion(object):
self._schema = schema
@property
+ def selectable_fields(self):
+ """Gets the selectable_fields of this V1CustomResourceDefinitionVersion. # noqa: E501
+
+ selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors # noqa: E501
+
+ :return: The selectable_fields of this V1CustomResourceDefinitionVersion. # noqa: E501
+ :rtype: list[V1SelectableField]
+ """
+ return self._selectable_fields
+
+ @selectable_fields.setter
+ def selectable_fields(self, selectable_fields):
+ """Sets the selectable_fields of this V1CustomResourceDefinitionVersion.
+
+ selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors # noqa: E501
+
+ :param selectable_fields: The selectable_fields of this V1CustomResourceDefinitionVersion. # noqa: E501
+ :type: list[V1SelectableField]
+ """
+
+ self._selectable_fields = selectable_fields
+
+ @property
def served(self):
"""Gets the served of this V1CustomResourceDefinitionVersion. # noqa: E501
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 586afbf78b1..f4052bce6ff 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.29
+ The version of the OpenAPI document: release-1.30
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 56d3d5c750e..12f7bb19ffd 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.29
+ The version of the OpenAPI document: release-1.30
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 61eb9d30869..784b97ef34e 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.29
+ The version of the OpenAPI document: release-1.30
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 15ab3abd8f1..c9f7c30e311 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.29
+ The version of the OpenAPI document: release-1.30
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 a1297b6ad0b..13720e38203 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.29
+ The version of the OpenAPI document: release-1.30
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 3b1524b7377..8a10cfec24f 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.29
+ The version of the OpenAPI document: release-1.30
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 c7c3e903ef0..492bad84861 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.29
+ The version of the OpenAPI document: release-1.30
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 66760824b20..4f921b12cf7 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.29
+ The version of the OpenAPI document: release-1.30
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 1e0526e0b4a..a206077a8e0 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.29
+ The version of the OpenAPI document: release-1.30
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 2469f82a9ee..65a68c25241 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.29
+ The version of the OpenAPI document: release-1.30
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 0d08fb72f4b..23f72b219e7 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.29
+ The version of the OpenAPI document: release-1.30
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 85974fbb345..4ad73897c5a 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.29
+ The version of the OpenAPI document: release-1.30
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 554721474dc..af732022b69 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.29
+ The version of the OpenAPI document: release-1.30
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 3bec2eb7ab5..84df854d2ea 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.29
+ The version of the OpenAPI document: release-1.30
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 3ddf49fc64c..b509d1be983 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.29
+ The version of the OpenAPI document: release-1.30
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 38c005104f9..46cb4ea4a06 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.29
+ The version of the OpenAPI document: release-1.30
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 75bc539084a..d9b8b3d4ecd 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 567f66d2908..ca5535c48e2 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.29
+ The version of the OpenAPI document: release-1.30
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 ffe991ee0af..5820141eb72 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.29
+ The version of the OpenAPI document: release-1.30
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 3d4adda9714..ae6ca09dde4 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.29
+ The version of the OpenAPI document: release-1.30
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 3cd9d22a2dc..6f44cfbf268 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.29
+ The version of the OpenAPI document: release-1.30
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 98fadd6ed0a..ae763b18af9 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.29
+ The version of the OpenAPI document: release-1.30
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 b0a12e4fd22..cbe22b60466 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.29
+ The version of the OpenAPI document: release-1.30
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 129600829ab..050a13c2cf3 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.29
+ The version of the OpenAPI document: release-1.30
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 35d8ff383e9..c133588fe3d 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.29
+ The version of the OpenAPI document: release-1.30
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 5ec228e843e..2788b119c7d 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.29
+ The version of the OpenAPI document: release-1.30
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 b48d9c035cc..70512ef218f 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.29
+ The version of the OpenAPI document: release-1.30
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 fd03107fbd9..8d0ecd3e4c3 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.29
+ The version of the OpenAPI document: release-1.30
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 1d2819bcfc3..8d60bae6cd4 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.29
+ The version of the OpenAPI document: release-1.30
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 250ac1afc60..1904a6133d3 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.29
+ The version of the OpenAPI document: release-1.30
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 d2bd221dea4..2c8f737eb06 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 bdc92d6e716..485ded3fe7d 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 3fe44e36cd9..e094ca1276f 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 ffdc9cdb4a4..1023b5eb4f9 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 159c30cc654..833ff28d67e 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.29
+ The version of the OpenAPI document: release-1.30
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 78726939e85..b854aacc973 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.29
+ The version of the OpenAPI document: release-1.30
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 adc6a167b30..592624cafdb 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 f88d5f6f924..5fe99d67564 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.29
+ The version of the OpenAPI document: release-1.30
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 c64f8e58a74..f4b2fcd47b4 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..56d4eac5f22
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_expression_warning.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ExpressionWarning(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
+ """V1ExpressionWarning - 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 V1ExpressionWarning. # 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 V1ExpressionWarning. # noqa: E501
+ :rtype: str
+ """
+ return self._field_ref
+
+ @field_ref.setter
+ def field_ref(self, field_ref):
+ """Sets the field_ref of this V1ExpressionWarning.
+
+ 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 V1ExpressionWarning. # 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 V1ExpressionWarning. # 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 V1ExpressionWarning. # noqa: E501
+ :rtype: str
+ """
+ return self._warning
+
+ @warning.setter
+ def warning(self, warning):
+ """Sets the warning of this V1ExpressionWarning.
+
+ 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 V1ExpressionWarning. # 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, V1ExpressionWarning):
+ 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, V1ExpressionWarning):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 7ed61c956f4..91fcd37368c 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.29
+ The version of the OpenAPI document: release-1.30
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 4c9670228d9..f704779f6cd 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 bb82eda4794..c73e712d479 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.29
+ The version of the OpenAPI document: release-1.30
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 6e0e69226e7..4956b63c61c 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.29
+ The version of the OpenAPI document: release-1.30
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 4198a38406c..b475d8d244e 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.29
+ The version of the OpenAPI document: release-1.30
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 f6f1c906fc3..58861965e16 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.29
+ The version of the OpenAPI document: release-1.30
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 c35cbf087fb..f10ec56723b 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.29
+ The version of the OpenAPI document: release-1.30
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 f0e8438a2e8..7e02fe549cf 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.29
+ The version of the OpenAPI document: release-1.30
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 0edec385802..5de0b10532d 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.29
+ The version of the OpenAPI document: release-1.30
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 5a7ed6c1a44..b4c1fefea9d 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.29
+ The version of the OpenAPI document: release-1.30
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 8f07a64261b..91bb9bc5c93 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.29
+ The version of the OpenAPI document: release-1.30
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 b41f6738b9d..50e0381a592 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.29
+ The version of the OpenAPI document: release-1.30
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 856d49329c4..6e1a7f9b79d 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.29
+ The version of the OpenAPI document: release-1.30
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 8a837d2f376..1c1fb3e7c47 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.29
+ The version of the OpenAPI document: release-1.30
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 4e0639210be..f41c430dfc2 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.29
+ The version of the OpenAPI document: release-1.30
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 963c01c684b..a3068b0f389 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 fba078a80ff..fa057526104 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.29
+ The version of the OpenAPI document: release-1.30
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 ee28173cc5c..f8bac03b159 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.29
+ The version of the OpenAPI document: release-1.30
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 e5d234b7e37..9cc81680abe 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.29
+ The version of the OpenAPI document: release-1.30
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 69c0da623b0..a754f638b61 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.29
+ The version of the OpenAPI document: release-1.30
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 fe3facc052c..279852c78ac 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.29
+ The version of the OpenAPI document: release-1.30
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 4a54b34c3ff..91760304965 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.29
+ The version of the OpenAPI document: release-1.30
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 3416c9b3403..afc3793e5fe 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.29
+ The version of the OpenAPI document: release-1.30
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 dd46a951dc8..4c4161a573f 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -54,8 +54,7 @@ class V1HostAlias(object):
if hostnames is not None:
self.hostnames = hostnames
- if ip is not None:
- self.ip = ip
+ self.ip = ip
@property
def hostnames(self):
@@ -100,6 +99,8 @@ class V1HostAlias(object):
:param ip: The ip of this V1HostAlias. # noqa: E501
:type: str
"""
+ if self.local_vars_configuration.client_side_validation and ip is None: # noqa: E501
+ raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501
self._ip = ip
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 4888d67aa22..068d4be2767 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.29
+ The version of the OpenAPI document: release-1.30
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 7bfffc0e0c8..79837e4b58c 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.29
+ The version of the OpenAPI document: release-1.30
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 218659ef516..b7405919ae1 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.29
+ The version of the OpenAPI document: release-1.30
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 9e72c528eb1..d4915ddfef6 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.29
+ The version of the OpenAPI document: release-1.30
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 75af47a490d..6a028a745a7 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.29
+ The version of the OpenAPI document: release-1.30
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 621ffd007ad..fa2f3ea38ac 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.29
+ The version of the OpenAPI document: release-1.30
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 f2b58da9c33..90577f76465 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.29
+ The version of the OpenAPI document: release-1.30
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 26d931ce733..afd29de8b8f 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.29
+ The version of the OpenAPI document: release-1.30
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 39f0a445a16..4a576f2a352 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.29
+ The version of the OpenAPI document: release-1.30
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 2f5a051ff7e..a16ea7394f3 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.29
+ The version of the OpenAPI document: release-1.30
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 0329480c142..ba2fb3c8989 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.29
+ The version of the OpenAPI document: release-1.30
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 989e02efc84..2b81c0c6bf5 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.29
+ The version of the OpenAPI document: release-1.30
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 6f394493dd8..eb46418bf92 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.29
+ The version of the OpenAPI document: release-1.30
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 c59ceaeb651..272e49ab11b 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.29
+ The version of the OpenAPI document: release-1.30
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 83a9ae77efe..03b6a46f73e 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.29
+ The version of the OpenAPI document: release-1.30
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 06bdba54a4a..40a1e05cf9e 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.29
+ The version of the OpenAPI document: release-1.30
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 0683c6835ac..4a98b6b9057 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.29
+ The version of the OpenAPI document: release-1.30
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 ed957342cff..baca7f1cbdd 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.29
+ The version of the OpenAPI document: release-1.30
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 790677e1a60..eb35a3c8608 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.29
+ The version of the OpenAPI document: release-1.30
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 5ba99548441..9c1c81de489 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.29
+ The version of the OpenAPI document: release-1.30
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 42d243ff687..1f42437b71a 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.29
+ The version of the OpenAPI document: release-1.30
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 82b595f272a..0a5416039e7 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.29
+ The version of the OpenAPI document: release-1.30
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 c3ebf2cd5a9..2dc156f51ee 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.29
+ The version of the OpenAPI document: release-1.30
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 3e5c2204503..6b45fa116aa 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.29
+ The version of the OpenAPI document: release-1.30
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 608cc1a6bf2..ce1574c9585 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.29
+ The version of the OpenAPI document: release-1.30
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 02682b43ec5..4ec4fdadb88 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.29
+ The version of the OpenAPI document: release-1.30
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 e774a063c48..823a9f2f199 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.29
+ The version of the OpenAPI document: release-1.30
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 1eb8eb7a1d6..913e7cd3e8e 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -38,12 +38,14 @@ class V1JobSpec(object):
'backoff_limit_per_index': 'int',
'completion_mode': 'str',
'completions': 'int',
+ 'managed_by': 'str',
'manual_selector': 'bool',
'max_failed_indexes': 'int',
'parallelism': 'int',
'pod_failure_policy': 'V1PodFailurePolicy',
'pod_replacement_policy': 'str',
'selector': 'V1LabelSelector',
+ 'success_policy': 'V1SuccessPolicy',
'suspend': 'bool',
'template': 'V1PodTemplateSpec',
'ttl_seconds_after_finished': 'int'
@@ -55,18 +57,20 @@ class V1JobSpec(object):
'backoff_limit_per_index': 'backoffLimitPerIndex',
'completion_mode': 'completionMode',
'completions': 'completions',
+ 'managed_by': 'managedBy',
'manual_selector': 'manualSelector',
'max_failed_indexes': 'maxFailedIndexes',
'parallelism': 'parallelism',
'pod_failure_policy': 'podFailurePolicy',
'pod_replacement_policy': 'podReplacementPolicy',
'selector': 'selector',
+ 'success_policy': 'successPolicy',
'suspend': 'suspend',
'template': 'template',
'ttl_seconds_after_finished': 'ttlSecondsAfterFinished'
}
- def __init__(self, active_deadline_seconds=None, backoff_limit=None, backoff_limit_per_index=None, completion_mode=None, completions=None, manual_selector=None, max_failed_indexes=None, parallelism=None, pod_failure_policy=None, pod_replacement_policy=None, selector=None, suspend=None, template=None, ttl_seconds_after_finished=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, active_deadline_seconds=None, backoff_limit=None, backoff_limit_per_index=None, completion_mode=None, completions=None, managed_by=None, manual_selector=None, max_failed_indexes=None, parallelism=None, pod_failure_policy=None, pod_replacement_policy=None, selector=None, success_policy=None, suspend=None, template=None, ttl_seconds_after_finished=None, local_vars_configuration=None): # noqa: E501
"""V1JobSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -77,12 +81,14 @@ class V1JobSpec(object):
self._backoff_limit_per_index = None
self._completion_mode = None
self._completions = None
+ self._managed_by = None
self._manual_selector = None
self._max_failed_indexes = None
self._parallelism = None
self._pod_failure_policy = None
self._pod_replacement_policy = None
self._selector = None
+ self._success_policy = None
self._suspend = None
self._template = None
self._ttl_seconds_after_finished = None
@@ -98,6 +104,8 @@ class V1JobSpec(object):
self.completion_mode = completion_mode
if completions is not None:
self.completions = completions
+ if managed_by is not None:
+ self.managed_by = managed_by
if manual_selector is not None:
self.manual_selector = manual_selector
if max_failed_indexes is not None:
@@ -110,6 +118,8 @@ class V1JobSpec(object):
self.pod_replacement_policy = pod_replacement_policy
if selector is not None:
self.selector = selector
+ if success_policy is not None:
+ self.success_policy = success_policy
if suspend is not None:
self.suspend = suspend
self.template = template
@@ -232,6 +242,29 @@ class V1JobSpec(object):
self._completions = completions
@property
+ def managed_by(self):
+ """Gets the managed_by of this V1JobSpec. # noqa: E501
+
+ ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 64 characters. This field is alpha-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (disabled by default). # noqa: E501
+
+ :return: The managed_by of this V1JobSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._managed_by
+
+ @managed_by.setter
+ def managed_by(self, managed_by):
+ """Sets the managed_by of this V1JobSpec.
+
+ ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 64 characters. This field is alpha-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (disabled by default). # noqa: E501
+
+ :param managed_by: The managed_by of this V1JobSpec. # noqa: E501
+ :type: str
+ """
+
+ self._managed_by = managed_by
+
+ @property
def manual_selector(self):
"""Gets the manual_selector of this V1JobSpec. # noqa: E501
@@ -366,6 +399,27 @@ class V1JobSpec(object):
self._selector = selector
@property
+ def success_policy(self):
+ """Gets the success_policy of this V1JobSpec. # noqa: E501
+
+
+ :return: The success_policy of this V1JobSpec. # noqa: E501
+ :rtype: V1SuccessPolicy
+ """
+ return self._success_policy
+
+ @success_policy.setter
+ def success_policy(self, success_policy):
+ """Sets the success_policy of this V1JobSpec.
+
+
+ :param success_policy: The success_policy of this V1JobSpec. # noqa: E501
+ :type: V1SuccessPolicy
+ """
+
+ self._success_policy = success_policy
+
+ @property
def suspend(self):
"""Gets the suspend of this V1JobSpec. # noqa: E501
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 4dd75badf64..75a29c67b5d 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -106,7 +106,7 @@ class V1JobStatus(object):
def active(self):
"""Gets the active of this V1JobStatus. # noqa: E501
- The number of pending and running pods. # noqa: E501
+ The number of pending and running pods which are not terminating (without a deletionTimestamp). The value is zero for finished jobs. # noqa: E501
:return: The active of this V1JobStatus. # noqa: E501
:rtype: int
@@ -117,7 +117,7 @@ class V1JobStatus(object):
def active(self, active):
"""Sets the active of this V1JobStatus.
- The number of pending and running pods. # noqa: E501
+ The number of pending and running pods which are not terminating (without a deletionTimestamp). The value is zero for finished jobs. # noqa: E501
:param active: The active of this V1JobStatus. # noqa: E501
:type: int
@@ -152,7 +152,7 @@ class V1JobStatus(object):
def completion_time(self):
"""Gets the completion_time of this V1JobStatus. # noqa: E501
- Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. # noqa: E501
+ Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is set when the job finishes successfully, and only then. The value cannot be updated or removed. The value indicates the same or later point in time as the startTime field. # noqa: E501
:return: The completion_time of this V1JobStatus. # noqa: E501
:rtype: datetime
@@ -163,7 +163,7 @@ class V1JobStatus(object):
def completion_time(self, completion_time):
"""Sets the completion_time of this V1JobStatus.
- Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. # noqa: E501
+ Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is set when the job finishes successfully, and only then. The value cannot be updated or removed. The value indicates the same or later point in time as the startTime field. # noqa: E501
:param completion_time: The completion_time of this V1JobStatus. # noqa: E501
:type: datetime
@@ -175,7 +175,7 @@ class V1JobStatus(object):
def conditions(self):
"""Gets the conditions of this V1JobStatus. # noqa: E501
- The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ # noqa: E501
+ The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. A job is considered finished when it is in a terminal condition, either \"Complete\" or \"Failed\". A Job cannot have both the \"Complete\" and \"Failed\" conditions. Additionally, it cannot be in the \"Complete\" and \"FailureTarget\" conditions. The \"Complete\", \"Failed\" and \"FailureTarget\" conditions cannot be disabled. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ # noqa: E501
:return: The conditions of this V1JobStatus. # noqa: E501
:rtype: list[V1JobCondition]
@@ -186,7 +186,7 @@ class V1JobStatus(object):
def conditions(self, conditions):
"""Sets the conditions of this V1JobStatus.
- The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ # noqa: E501
+ The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. A job is considered finished when it is in a terminal condition, either \"Complete\" or \"Failed\". A Job cannot have both the \"Complete\" and \"Failed\" conditions. Additionally, it cannot be in the \"Complete\" and \"FailureTarget\" conditions. The \"Complete\", \"Failed\" and \"FailureTarget\" conditions cannot be disabled. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ # noqa: E501
:param conditions: The conditions of this V1JobStatus. # noqa: E501
:type: list[V1JobCondition]
@@ -198,7 +198,7 @@ class V1JobStatus(object):
def failed(self):
"""Gets the failed of this V1JobStatus. # noqa: E501
- The number of pods which reached phase Failed. # noqa: E501
+ The number of pods which reached phase Failed. The value increases monotonically. # noqa: E501
:return: The failed of this V1JobStatus. # noqa: E501
:rtype: int
@@ -209,7 +209,7 @@ class V1JobStatus(object):
def failed(self, failed):
"""Sets the failed of this V1JobStatus.
- The number of pods which reached phase Failed. # noqa: E501
+ The number of pods which reached phase Failed. The value increases monotonically. # noqa: E501
:param failed: The failed of this V1JobStatus. # noqa: E501
:type: int
@@ -221,7 +221,7 @@ class V1JobStatus(object):
def failed_indexes(self):
"""Gets the failed_indexes of this V1JobStatus. # noqa: E501
- FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). # noqa: E501
+ FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". The set of failed indexes cannot overlap with the set of completed indexes. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). # noqa: E501
:return: The failed_indexes of this V1JobStatus. # noqa: E501
:rtype: str
@@ -232,7 +232,7 @@ class V1JobStatus(object):
def failed_indexes(self, failed_indexes):
"""Sets the failed_indexes of this V1JobStatus.
- FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). # noqa: E501
+ FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". The set of failed indexes cannot overlap with the set of completed indexes. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). # noqa: E501
:param failed_indexes: The failed_indexes of this V1JobStatus. # noqa: E501
:type: str
@@ -267,7 +267,7 @@ class V1JobStatus(object):
def start_time(self):
"""Gets the start_time of this V1JobStatus. # noqa: E501
- Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. # noqa: E501
+ Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. Once set, the field can only be removed when the job is suspended. The field cannot be modified while the job is unsuspended or finished. # noqa: E501
:return: The start_time of this V1JobStatus. # noqa: E501
:rtype: datetime
@@ -278,7 +278,7 @@ class V1JobStatus(object):
def start_time(self, start_time):
"""Sets the start_time of this V1JobStatus.
- Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. # noqa: E501
+ Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. Once set, the field can only be removed when the job is suspended. The field cannot be modified while the job is unsuspended or finished. # noqa: E501
:param start_time: The start_time of this V1JobStatus. # noqa: E501
:type: datetime
@@ -290,7 +290,7 @@ class V1JobStatus(object):
def succeeded(self):
"""Gets the succeeded of this V1JobStatus. # noqa: E501
- The number of pods which reached phase Succeeded. # noqa: E501
+ The number of pods which reached phase Succeeded. The value increases monotonically for a given spec. However, it may decrease in reaction to scale down of elastic indexed jobs. # noqa: E501
:return: The succeeded of this V1JobStatus. # noqa: E501
:rtype: int
@@ -301,7 +301,7 @@ class V1JobStatus(object):
def succeeded(self, succeeded):
"""Sets the succeeded of this V1JobStatus.
- The number of pods which reached phase Succeeded. # noqa: E501
+ The number of pods which reached phase Succeeded. The value increases monotonically for a given spec. However, it may decrease in reaction to scale down of elastic indexed jobs. # noqa: E501
:param succeeded: The succeeded of this V1JobStatus. # noqa: E501
:type: int
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 1010935d509..393fe10ad01 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.29
+ The version of the OpenAPI document: release-1.30
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 3028b4b5681..cfe81ffd73b 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.29
+ The version of the OpenAPI document: release-1.30
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 cd477d22a38..ed516aa6d4e 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.29
+ The version of the OpenAPI document: release-1.30
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 8bb5f471dbe..b45742253ab 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.29
+ The version of the OpenAPI document: release-1.30
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 b04d989eac6..aa26993687b 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.29
+ The version of the OpenAPI document: release-1.30
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 088a189c3b4..cf29f0ce34a 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.29
+ The version of the OpenAPI document: release-1.30
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 55cd5438901..3827cad1041 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.29
+ The version of the OpenAPI document: release-1.30
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 b46982d9867..ec56713807b 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.29
+ The version of the OpenAPI document: release-1.30
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 0605c0c3f81..2b1c30e27b3 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.29
+ The version of the OpenAPI document: release-1.30
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 aac897493b5..6e6c32939db 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.29
+ The version of the OpenAPI document: release-1.30
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 dc717ad9507..c1db0c109ec 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.29
+ The version of the OpenAPI document: release-1.30
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 b507b407848..d4151eebebc 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.29
+ The version of the OpenAPI document: release-1.30
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 09acb7f1197..c7a4e5b1334 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.29
+ The version of the OpenAPI document: release-1.30
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 f03c484dcf9..f48bc445b4a 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.29
+ The version of the OpenAPI document: release-1.30
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 1861a24b81a..baa9763a2f2 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.29
+ The version of the OpenAPI document: release-1.30
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 7720b1cdc3a..8e0f99a4ab8 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.29
+ The version of the OpenAPI document: release-1.30
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 cfab3ab59c5..379e612c7a8 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.29
+ The version of the OpenAPI document: release-1.30
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 5743d2132af..320541dff7b 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.29
+ The version of the OpenAPI document: release-1.30
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 c9b1c3a292d..f23f92130aa 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.29
+ The version of the OpenAPI document: release-1.30
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 b298fe70b0e..8a5821d9c49 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -56,7 +56,7 @@ class V1LocalObjectReference(object):
def name(self):
"""Gets the name of this V1LocalObjectReference. # noqa: E501
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:return: The name of this V1LocalObjectReference. # noqa: E501
:rtype: str
@@ -67,7 +67,7 @@ class V1LocalObjectReference(object):
def name(self, name):
"""Sets the name of this V1LocalObjectReference.
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:param name: The name of this V1LocalObjectReference. # noqa: E501
:type: str
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 5fdb9d4f776..42d03e0df88 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.29
+ The version of the OpenAPI document: release-1.30
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 d209d3d3767..3058d4eb369 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.29
+ The version of the OpenAPI document: release-1.30
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 1f2e636e0cb..5d9a3773d22 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.29
+ The version of the OpenAPI document: release-1.30
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 cd8a5971fac..c5de8fd027b 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..ebebd2f8b1b
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_match_resources.py
@@ -0,0 +1,230 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1MatchResources(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 = {
+ 'exclude_resource_rules': 'list[V1NamedRuleWithOperations]',
+ 'match_policy': 'str',
+ 'namespace_selector': 'V1LabelSelector',
+ 'object_selector': 'V1LabelSelector',
+ 'resource_rules': 'list[V1NamedRuleWithOperations]'
+ }
+
+ attribute_map = {
+ 'exclude_resource_rules': 'excludeResourceRules',
+ 'match_policy': 'matchPolicy',
+ 'namespace_selector': 'namespaceSelector',
+ 'object_selector': 'objectSelector',
+ 'resource_rules': 'resourceRules'
+ }
+
+ def __init__(self, exclude_resource_rules=None, match_policy=None, namespace_selector=None, object_selector=None, resource_rules=None, local_vars_configuration=None): # noqa: E501
+ """V1MatchResources - 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._exclude_resource_rules = None
+ self._match_policy = None
+ self._namespace_selector = None
+ self._object_selector = None
+ self._resource_rules = None
+ self.discriminator = None
+
+ if exclude_resource_rules is not None:
+ self.exclude_resource_rules = exclude_resource_rules
+ if match_policy is not None:
+ self.match_policy = match_policy
+ if namespace_selector is not None:
+ self.namespace_selector = namespace_selector
+ if object_selector is not None:
+ self.object_selector = object_selector
+ if resource_rules is not None:
+ self.resource_rules = resource_rules
+
+ @property
+ def exclude_resource_rules(self):
+ """Gets the exclude_resource_rules of this V1MatchResources. # noqa: E501
+
+ ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) # noqa: E501
+
+ :return: The exclude_resource_rules of this V1MatchResources. # noqa: E501
+ :rtype: list[V1NamedRuleWithOperations]
+ """
+ return self._exclude_resource_rules
+
+ @exclude_resource_rules.setter
+ def exclude_resource_rules(self, exclude_resource_rules):
+ """Sets the exclude_resource_rules of this V1MatchResources.
+
+ ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) # noqa: E501
+
+ :param exclude_resource_rules: The exclude_resource_rules of this V1MatchResources. # noqa: E501
+ :type: list[V1NamedRuleWithOperations]
+ """
+
+ self._exclude_resource_rules = exclude_resource_rules
+
+ @property
+ def match_policy(self):
+ """Gets the match_policy of this V1MatchResources. # noqa: E501
+
+ matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. Defaults to \"Equivalent\" # noqa: E501
+
+ :return: The match_policy of this V1MatchResources. # noqa: E501
+ :rtype: str
+ """
+ return self._match_policy
+
+ @match_policy.setter
+ def match_policy(self, match_policy):
+ """Sets the match_policy of this V1MatchResources.
+
+ matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. Defaults to \"Equivalent\" # noqa: E501
+
+ :param match_policy: The match_policy of this V1MatchResources. # noqa: E501
+ :type: str
+ """
+
+ self._match_policy = match_policy
+
+ @property
+ def namespace_selector(self):
+ """Gets the namespace_selector of this V1MatchResources. # noqa: E501
+
+
+ :return: The namespace_selector of this V1MatchResources. # noqa: E501
+ :rtype: V1LabelSelector
+ """
+ return self._namespace_selector
+
+ @namespace_selector.setter
+ def namespace_selector(self, namespace_selector):
+ """Sets the namespace_selector of this V1MatchResources.
+
+
+ :param namespace_selector: The namespace_selector of this V1MatchResources. # noqa: E501
+ :type: V1LabelSelector
+ """
+
+ self._namespace_selector = namespace_selector
+
+ @property
+ def object_selector(self):
+ """Gets the object_selector of this V1MatchResources. # noqa: E501
+
+
+ :return: The object_selector of this V1MatchResources. # noqa: E501
+ :rtype: V1LabelSelector
+ """
+ return self._object_selector
+
+ @object_selector.setter
+ def object_selector(self, object_selector):
+ """Sets the object_selector of this V1MatchResources.
+
+
+ :param object_selector: The object_selector of this V1MatchResources. # noqa: E501
+ :type: V1LabelSelector
+ """
+
+ self._object_selector = object_selector
+
+ @property
+ def resource_rules(self):
+ """Gets the resource_rules of this V1MatchResources. # noqa: E501
+
+ ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule. # noqa: E501
+
+ :return: The resource_rules of this V1MatchResources. # noqa: E501
+ :rtype: list[V1NamedRuleWithOperations]
+ """
+ return self._resource_rules
+
+ @resource_rules.setter
+ def resource_rules(self, resource_rules):
+ """Sets the resource_rules of this V1MatchResources.
+
+ ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule. # noqa: E501
+
+ :param resource_rules: The resource_rules of this V1MatchResources. # noqa: E501
+ :type: list[V1NamedRuleWithOperations]
+ """
+
+ self._resource_rules = resource_rules
+
+ 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, V1MatchResources):
+ 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, V1MatchResources):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 05eef2e6e81..485e85aff74 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.29
+ The version of the OpenAPI document: release-1.30
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 d7de24c4abe..9df5da06436 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -178,7 +178,7 @@ class V1MutatingWebhook(object):
def match_conditions(self):
"""Gets the match_conditions of this V1MutatingWebhook. # noqa: E501
- MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. 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. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. # noqa: E501
+ MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. 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. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped # noqa: E501
:return: The match_conditions of this V1MutatingWebhook. # noqa: E501
:rtype: list[V1MatchCondition]
@@ -189,7 +189,7 @@ class V1MutatingWebhook(object):
def match_conditions(self, match_conditions):
"""Sets the match_conditions of this V1MutatingWebhook.
- MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. 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. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. # noqa: E501
+ MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. 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. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped # noqa: E501
:param match_conditions: The match_conditions of this V1MutatingWebhook. # noqa: E501
:type: list[V1MatchCondition]
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 7776be69c78..37c0700515c 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.29
+ The version of the OpenAPI document: release-1.30
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 882bef910f3..390601063ad 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..cc88b476dbe
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_named_rule_with_operations.py
@@ -0,0 +1,262 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1NamedRuleWithOperations(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_groups': 'list[str]',
+ 'api_versions': 'list[str]',
+ 'operations': 'list[str]',
+ 'resource_names': 'list[str]',
+ 'resources': 'list[str]',
+ 'scope': 'str'
+ }
+
+ attribute_map = {
+ 'api_groups': 'apiGroups',
+ 'api_versions': 'apiVersions',
+ 'operations': 'operations',
+ 'resource_names': 'resourceNames',
+ 'resources': 'resources',
+ 'scope': 'scope'
+ }
+
+ def __init__(self, api_groups=None, api_versions=None, operations=None, resource_names=None, resources=None, scope=None, local_vars_configuration=None): # noqa: E501
+ """V1NamedRuleWithOperations - 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_groups = None
+ self._api_versions = None
+ self._operations = None
+ self._resource_names = None
+ self._resources = None
+ self._scope = None
+ self.discriminator = None
+
+ if api_groups is not None:
+ self.api_groups = api_groups
+ if api_versions is not None:
+ self.api_versions = api_versions
+ if operations is not None:
+ self.operations = operations
+ if resource_names is not None:
+ self.resource_names = resource_names
+ if resources is not None:
+ self.resources = resources
+ if scope is not None:
+ self.scope = scope
+
+ @property
+ def api_groups(self):
+ """Gets the api_groups of this V1NamedRuleWithOperations. # noqa: E501
+
+ APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. # noqa: E501
+
+ :return: The api_groups of this V1NamedRuleWithOperations. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._api_groups
+
+ @api_groups.setter
+ def api_groups(self, api_groups):
+ """Sets the api_groups of this V1NamedRuleWithOperations.
+
+ APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. # noqa: E501
+
+ :param api_groups: The api_groups of this V1NamedRuleWithOperations. # noqa: E501
+ :type: list[str]
+ """
+
+ self._api_groups = api_groups
+
+ @property
+ def api_versions(self):
+ """Gets the api_versions of this V1NamedRuleWithOperations. # noqa: E501
+
+ APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. # noqa: E501
+
+ :return: The api_versions of this V1NamedRuleWithOperations. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._api_versions
+
+ @api_versions.setter
+ def api_versions(self, api_versions):
+ """Sets the api_versions of this V1NamedRuleWithOperations.
+
+ APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. # noqa: E501
+
+ :param api_versions: The api_versions of this V1NamedRuleWithOperations. # noqa: E501
+ :type: list[str]
+ """
+
+ self._api_versions = api_versions
+
+ @property
+ def operations(self):
+ """Gets the operations of this V1NamedRuleWithOperations. # noqa: E501
+
+ Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. # noqa: E501
+
+ :return: The operations of this V1NamedRuleWithOperations. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._operations
+
+ @operations.setter
+ def operations(self, operations):
+ """Sets the operations of this V1NamedRuleWithOperations.
+
+ Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. # noqa: E501
+
+ :param operations: The operations of this V1NamedRuleWithOperations. # noqa: E501
+ :type: list[str]
+ """
+
+ self._operations = operations
+
+ @property
+ def resource_names(self):
+ """Gets the resource_names of this V1NamedRuleWithOperations. # noqa: E501
+
+ ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. # noqa: E501
+
+ :return: The resource_names of this V1NamedRuleWithOperations. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._resource_names
+
+ @resource_names.setter
+ def resource_names(self, resource_names):
+ """Sets the resource_names of this V1NamedRuleWithOperations.
+
+ ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. # noqa: E501
+
+ :param resource_names: The resource_names of this V1NamedRuleWithOperations. # noqa: E501
+ :type: list[str]
+ """
+
+ self._resource_names = resource_names
+
+ @property
+ def resources(self):
+ """Gets the resources of this V1NamedRuleWithOperations. # noqa: E501
+
+ Resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. Required. # noqa: E501
+
+ :return: The resources of this V1NamedRuleWithOperations. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._resources
+
+ @resources.setter
+ def resources(self, resources):
+ """Sets the resources of this V1NamedRuleWithOperations.
+
+ Resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. Required. # noqa: E501
+
+ :param resources: The resources of this V1NamedRuleWithOperations. # noqa: E501
+ :type: list[str]
+ """
+
+ self._resources = resources
+
+ @property
+ def scope(self):
+ """Gets the scope of this V1NamedRuleWithOperations. # noqa: E501
+
+ scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\". # noqa: E501
+
+ :return: The scope of this V1NamedRuleWithOperations. # noqa: E501
+ :rtype: str
+ """
+ return self._scope
+
+ @scope.setter
+ def scope(self, scope):
+ """Sets the scope of this V1NamedRuleWithOperations.
+
+ scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\". # noqa: E501
+
+ :param scope: The scope of this V1NamedRuleWithOperations. # noqa: E501
+ :type: str
+ """
+
+ self._scope = scope
+
+ 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, V1NamedRuleWithOperations):
+ 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, V1NamedRuleWithOperations):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_namespace.py b/contrib/python/kubernetes/kubernetes/client/models/v1_namespace.py
index 30acf160419..77e6a8b9db1 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.29
+ The version of the OpenAPI document: release-1.30
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 dba6a5c3ff3..3d662d47655 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.29
+ The version of the OpenAPI document: release-1.30
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 b58d88e016c..de7a3bc94ce 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.29
+ The version of the OpenAPI document: release-1.30
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 562f210b55c..6578cfa1ddc 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.29
+ The version of the OpenAPI document: release-1.30
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 63b0e23b0ee..87be6ebf4e2 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 3c209ec34a3..afd7b7a9f18 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.29
+ The version of the OpenAPI document: release-1.30
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 0159234b18f..dfad9445754 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.29
+ The version of the OpenAPI document: release-1.30
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 a15f6805b55..01cb646f5de 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.29
+ The version of the OpenAPI document: release-1.30
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 e15681dd95e..823640ab2a0 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.29
+ The version of the OpenAPI document: release-1.30
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 c6b6c0a9f07..6a5eb135e57 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.29
+ The version of the OpenAPI document: release-1.30
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 35ff1a8a29f..6057ab44ffd 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.29
+ The version of the OpenAPI document: release-1.30
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 ac9e640cf44..7a1433a2abc 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 874bc994549..109eef2b2c8 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.29
+ The version of the OpenAPI document: release-1.30
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 b9092d9dd55..89dc6fe04d0 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.29
+ The version of the OpenAPI document: release-1.30
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 264a09edadc..a7faf7ff20b 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.29
+ The version of the OpenAPI document: release-1.30
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 7d504806fee..8f79fa06f1a 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.29
+ The version of the OpenAPI document: release-1.30
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 5aa1a5307ab..093dd2a3474 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.29
+ The version of the OpenAPI document: release-1.30
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 2ed800cf479..5030c8ca17e 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.29
+ The version of the OpenAPI document: release-1.30
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 0411cbe38ff..fb41f2427be 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.29
+ The version of the OpenAPI document: release-1.30
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 b8712692f7d..447fbca5b37 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.29
+ The version of the OpenAPI document: release-1.30
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 050a561466b..b72b462ac61 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..28e329f1158
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler.py
@@ -0,0 +1,148 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1NodeRuntimeHandler(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 = {
+ 'features': 'V1NodeRuntimeHandlerFeatures',
+ 'name': 'str'
+ }
+
+ attribute_map = {
+ 'features': 'features',
+ 'name': 'name'
+ }
+
+ def __init__(self, features=None, name=None, local_vars_configuration=None): # noqa: E501
+ """V1NodeRuntimeHandler - 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._features = None
+ self._name = None
+ self.discriminator = None
+
+ if features is not None:
+ self.features = features
+ if name is not None:
+ self.name = name
+
+ @property
+ def features(self):
+ """Gets the features of this V1NodeRuntimeHandler. # noqa: E501
+
+
+ :return: The features of this V1NodeRuntimeHandler. # noqa: E501
+ :rtype: V1NodeRuntimeHandlerFeatures
+ """
+ return self._features
+
+ @features.setter
+ def features(self, features):
+ """Sets the features of this V1NodeRuntimeHandler.
+
+
+ :param features: The features of this V1NodeRuntimeHandler. # noqa: E501
+ :type: V1NodeRuntimeHandlerFeatures
+ """
+
+ self._features = features
+
+ @property
+ def name(self):
+ """Gets the name of this V1NodeRuntimeHandler. # noqa: E501
+
+ Runtime handler name. Empty for the default runtime handler. # noqa: E501
+
+ :return: The name of this V1NodeRuntimeHandler. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this V1NodeRuntimeHandler.
+
+ Runtime handler name. Empty for the default runtime handler. # noqa: E501
+
+ :param name: The name of this V1NodeRuntimeHandler. # noqa: E501
+ :type: str
+ """
+
+ 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, V1NodeRuntimeHandler):
+ 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, V1NodeRuntimeHandler):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..aa53ab751ea
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_node_runtime_handler_features.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1NodeRuntimeHandlerFeatures(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 = {
+ 'recursive_read_only_mounts': 'bool'
+ }
+
+ attribute_map = {
+ 'recursive_read_only_mounts': 'recursiveReadOnlyMounts'
+ }
+
+ def __init__(self, recursive_read_only_mounts=None, local_vars_configuration=None): # noqa: E501
+ """V1NodeRuntimeHandlerFeatures - 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._recursive_read_only_mounts = None
+ self.discriminator = None
+
+ if recursive_read_only_mounts is not None:
+ self.recursive_read_only_mounts = recursive_read_only_mounts
+
+ @property
+ def recursive_read_only_mounts(self):
+ """Gets the recursive_read_only_mounts of this V1NodeRuntimeHandlerFeatures. # noqa: E501
+
+ RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. # noqa: E501
+
+ :return: The recursive_read_only_mounts of this V1NodeRuntimeHandlerFeatures. # noqa: E501
+ :rtype: bool
+ """
+ return self._recursive_read_only_mounts
+
+ @recursive_read_only_mounts.setter
+ def recursive_read_only_mounts(self, recursive_read_only_mounts):
+ """Sets the recursive_read_only_mounts of this V1NodeRuntimeHandlerFeatures.
+
+ RecursiveReadOnlyMounts is set to true if the runtime handler supports RecursiveReadOnlyMounts. # noqa: E501
+
+ :param recursive_read_only_mounts: The recursive_read_only_mounts of this V1NodeRuntimeHandlerFeatures. # noqa: E501
+ :type: bool
+ """
+
+ self._recursive_read_only_mounts = recursive_read_only_mounts
+
+ 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, V1NodeRuntimeHandlerFeatures):
+ 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, V1NodeRuntimeHandlerFeatures):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 c3c0d70f269..6096929eeaa 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.29
+ The version of the OpenAPI document: release-1.30
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 5f5243e1dea..f32ab503e6b 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.29
+ The version of the OpenAPI document: release-1.30
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 b02d06efe3f..12b533de39e 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.29
+ The version of the OpenAPI document: release-1.30
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 03140dc9c6b..8e6530ab7b2 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.29
+ The version of the OpenAPI document: release-1.30
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 1c4331d19c3..9d53363f9a7 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -42,6 +42,7 @@ class V1NodeStatus(object):
'images': 'list[V1ContainerImage]',
'node_info': 'V1NodeSystemInfo',
'phase': 'str',
+ 'runtime_handlers': 'list[V1NodeRuntimeHandler]',
'volumes_attached': 'list[V1AttachedVolume]',
'volumes_in_use': 'list[str]'
}
@@ -56,11 +57,12 @@ class V1NodeStatus(object):
'images': 'images',
'node_info': 'nodeInfo',
'phase': 'phase',
+ 'runtime_handlers': 'runtimeHandlers',
'volumes_attached': 'volumesAttached',
'volumes_in_use': 'volumesInUse'
}
- def __init__(self, addresses=None, allocatable=None, capacity=None, conditions=None, config=None, daemon_endpoints=None, images=None, node_info=None, phase=None, volumes_attached=None, volumes_in_use=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, addresses=None, allocatable=None, capacity=None, conditions=None, config=None, daemon_endpoints=None, images=None, node_info=None, phase=None, runtime_handlers=None, volumes_attached=None, volumes_in_use=None, local_vars_configuration=None): # noqa: E501
"""V1NodeStatus - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -75,6 +77,7 @@ class V1NodeStatus(object):
self._images = None
self._node_info = None
self._phase = None
+ self._runtime_handlers = None
self._volumes_attached = None
self._volumes_in_use = None
self.discriminator = None
@@ -97,6 +100,8 @@ class V1NodeStatus(object):
self.node_info = node_info
if phase is not None:
self.phase = phase
+ if runtime_handlers is not None:
+ self.runtime_handlers = runtime_handlers
if volumes_attached is not None:
self.volumes_attached = volumes_attached
if volumes_in_use is not None:
@@ -304,6 +309,29 @@ class V1NodeStatus(object):
self._phase = phase
@property
+ def runtime_handlers(self):
+ """Gets the runtime_handlers of this V1NodeStatus. # noqa: E501
+
+ The available runtime handlers. # noqa: E501
+
+ :return: The runtime_handlers of this V1NodeStatus. # noqa: E501
+ :rtype: list[V1NodeRuntimeHandler]
+ """
+ return self._runtime_handlers
+
+ @runtime_handlers.setter
+ def runtime_handlers(self, runtime_handlers):
+ """Sets the runtime_handlers of this V1NodeStatus.
+
+ The available runtime handlers. # noqa: E501
+
+ :param runtime_handlers: The runtime_handlers of this V1NodeStatus. # noqa: E501
+ :type: list[V1NodeRuntimeHandler]
+ """
+
+ self._runtime_handlers = runtime_handlers
+
+ @property
def volumes_attached(self):
"""Gets the volumes_attached of this V1NodeStatus. # noqa: E501
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 2b17407ecac..ff3450032a2 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.29
+ The version of the OpenAPI document: release-1.30
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 6705b3fa93a..27bad2ab0e9 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.29
+ The version of the OpenAPI document: release-1.30
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 8eab63810d3..17a12fb358c 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.29
+ The version of the OpenAPI document: release-1.30
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 cd06eddc486..afefe7c3bbc 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.29
+ The version of the OpenAPI document: release-1.30
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 ba138a5724d..b10a82f0d8d 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.29
+ The version of the OpenAPI document: release-1.30
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 f0f085d5d72..110b73128ba 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.29
+ The version of the OpenAPI document: release-1.30
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 1baf7f6adcd..4a72b164dbc 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_overhead.py b/contrib/python/kubernetes/kubernetes/client/models/v1_overhead.py
index bb1bbd667a9..1e37f95be8d 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.29
+ The version of the OpenAPI document: release-1.30
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 bba5da9dd71..c04187358dc 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..59db35ad722
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_param_kind.py
@@ -0,0 +1,150 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ParamKind(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'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'kind': 'kind'
+ }
+
+ def __init__(self, api_version=None, kind=None, local_vars_configuration=None): # noqa: E501
+ """V1ParamKind - 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.discriminator = None
+
+ if api_version is not None:
+ self.api_version = api_version
+ if kind is not None:
+ self.kind = kind
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1ParamKind. # noqa: E501
+
+ APIVersion is the API group version the resources belong to. In format of \"group/version\". Required. # noqa: E501
+
+ :return: The api_version of this V1ParamKind. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1ParamKind.
+
+ APIVersion is the API group version the resources belong to. In format of \"group/version\". Required. # noqa: E501
+
+ :param api_version: The api_version of this V1ParamKind. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1ParamKind. # noqa: E501
+
+ Kind is the API kind the resources belong to. Required. # noqa: E501
+
+ :return: The kind of this V1ParamKind. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1ParamKind.
+
+ Kind is the API kind the resources belong to. Required. # noqa: E501
+
+ :param kind: The kind of this V1ParamKind. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ 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, V1ParamKind):
+ 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, V1ParamKind):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_param_ref.py b/contrib/python/kubernetes/kubernetes/client/models/v1_param_ref.py
new file mode 100644
index 00000000000..7b0ba456e37
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_param_ref.py
@@ -0,0 +1,204 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ParamRef(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 = {
+ 'name': 'str',
+ 'namespace': 'str',
+ 'parameter_not_found_action': 'str',
+ 'selector': 'V1LabelSelector'
+ }
+
+ attribute_map = {
+ 'name': 'name',
+ 'namespace': 'namespace',
+ 'parameter_not_found_action': 'parameterNotFoundAction',
+ 'selector': 'selector'
+ }
+
+ def __init__(self, name=None, namespace=None, parameter_not_found_action=None, selector=None, local_vars_configuration=None): # noqa: E501
+ """V1ParamRef - 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._name = None
+ self._namespace = None
+ self._parameter_not_found_action = None
+ self._selector = None
+ self.discriminator = None
+
+ if name is not None:
+ self.name = name
+ if namespace is not None:
+ self.namespace = namespace
+ if parameter_not_found_action is not None:
+ self.parameter_not_found_action = parameter_not_found_action
+ if selector is not None:
+ self.selector = selector
+
+ @property
+ def name(self):
+ """Gets the name of this V1ParamRef. # noqa: E501
+
+ name is the name of the resource being referenced. One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. # noqa: E501
+
+ :return: The name of this V1ParamRef. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this V1ParamRef.
+
+ name is the name of the resource being referenced. One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. # noqa: E501
+
+ :param name: The name of this V1ParamRef. # noqa: E501
+ :type: str
+ """
+
+ self._name = name
+
+ @property
+ def namespace(self):
+ """Gets the namespace of this V1ParamRef. # noqa: E501
+
+ namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. # noqa: E501
+
+ :return: The namespace of this V1ParamRef. # noqa: E501
+ :rtype: str
+ """
+ return self._namespace
+
+ @namespace.setter
+ def namespace(self, namespace):
+ """Sets the namespace of this V1ParamRef.
+
+ namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. # noqa: E501
+
+ :param namespace: The namespace of this V1ParamRef. # noqa: E501
+ :type: str
+ """
+
+ self._namespace = namespace
+
+ @property
+ def parameter_not_found_action(self):
+ """Gets the parameter_not_found_action of this V1ParamRef. # noqa: E501
+
+ `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Required # noqa: E501
+
+ :return: The parameter_not_found_action of this V1ParamRef. # noqa: E501
+ :rtype: str
+ """
+ return self._parameter_not_found_action
+
+ @parameter_not_found_action.setter
+ def parameter_not_found_action(self, parameter_not_found_action):
+ """Sets the parameter_not_found_action of this V1ParamRef.
+
+ `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Required # noqa: E501
+
+ :param parameter_not_found_action: The parameter_not_found_action of this V1ParamRef. # noqa: E501
+ :type: str
+ """
+
+ self._parameter_not_found_action = parameter_not_found_action
+
+ @property
+ def selector(self):
+ """Gets the selector of this V1ParamRef. # noqa: E501
+
+
+ :return: The selector of this V1ParamRef. # noqa: E501
+ :rtype: V1LabelSelector
+ """
+ return self._selector
+
+ @selector.setter
+ def selector(self, selector):
+ """Sets the selector of this V1ParamRef.
+
+
+ :param selector: The selector of this V1ParamRef. # noqa: E501
+ :type: V1LabelSelector
+ """
+
+ self._selector = selector
+
+ 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, V1ParamRef):
+ 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, V1ParamRef):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 e3a617b7dee..3381d609325 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.29
+ The version of the OpenAPI document: release-1.30
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 9cf3a8de42c..f8d533ce3cf 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.29
+ The version of the OpenAPI document: release-1.30
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 118f361221e..089935713ab 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -148,7 +148,7 @@ class V1PersistentVolumeClaimCondition(object):
def reason(self):
"""Gets the reason of this V1PersistentVolumeClaimCondition. # noqa: E501
- reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized. # noqa: E501
+ reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"Resizing\" that means the underlying persistent volume is being resized. # noqa: E501
:return: The reason of this V1PersistentVolumeClaimCondition. # noqa: E501
:rtype: str
@@ -159,7 +159,7 @@ class V1PersistentVolumeClaimCondition(object):
def reason(self, reason):
"""Sets the reason of this V1PersistentVolumeClaimCondition.
- reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized. # noqa: E501
+ reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"Resizing\" that means the underlying persistent volume is being resized. # noqa: E501
:param reason: The reason of this V1PersistentVolumeClaimCondition. # noqa: E501
:type: str
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 a96eb32bc5a..8c9962e1deb 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.29
+ The version of the OpenAPI document: release-1.30
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 aa421ae2ab0..5862e9661da 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.29
+ The version of the OpenAPI document: release-1.30
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/persistent-volumes#volumeattributesclass (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. # 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/ (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. # 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/persistent-volumes#volumeattributesclass (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. # 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/ (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. # 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 411a25f7a0c..cd69ad84f42 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -183,7 +183,7 @@ class V1PersistentVolumeClaimStatus(object):
def conditions(self):
"""Gets the conditions of this V1PersistentVolumeClaimStatus. # noqa: E501
- conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. # noqa: E501
+ conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'Resizing'. # noqa: E501
:return: The conditions of this V1PersistentVolumeClaimStatus. # noqa: E501
:rtype: list[V1PersistentVolumeClaimCondition]
@@ -194,7 +194,7 @@ class V1PersistentVolumeClaimStatus(object):
def conditions(self, conditions):
"""Sets the conditions of this V1PersistentVolumeClaimStatus.
- conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. # noqa: E501
+ conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'Resizing'. # noqa: E501
:param conditions: The conditions of this V1PersistentVolumeClaimStatus. # noqa: E501
:type: list[V1PersistentVolumeClaimCondition]
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 0a14d3b0433..067ade0e5e5 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.29
+ The version of the OpenAPI document: release-1.30
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 eaaa3119e54..a75546d1ae6 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.29
+ The version of the OpenAPI document: release-1.30
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 12574673b99..fd9b85844d9 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.29
+ The version of the OpenAPI document: release-1.30
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 7c5eb3c10ca..f4f1f61ebc7 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 abee2dc637a..6fa01b25982 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -71,7 +71,7 @@ class V1PersistentVolumeStatus(object):
def last_phase_transition_time(self):
"""Gets the last_phase_transition_time of this V1PersistentVolumeStatus. # noqa: E501
- lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature. # noqa: E501
+ lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is a beta field and requires the PersistentVolumeLastPhaseTransitionTime feature to be enabled (enabled by default). # noqa: E501
:return: The last_phase_transition_time of this V1PersistentVolumeStatus. # noqa: E501
:rtype: datetime
@@ -82,7 +82,7 @@ class V1PersistentVolumeStatus(object):
def last_phase_transition_time(self, last_phase_transition_time):
"""Sets the last_phase_transition_time of this V1PersistentVolumeStatus.
- lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature. # noqa: E501
+ lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is a beta field and requires the PersistentVolumeLastPhaseTransitionTime feature to be enabled (enabled by default). # noqa: E501
:param last_phase_transition_time: The last_phase_transition_time of this V1PersistentVolumeStatus. # noqa: E501
:type: datetime
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 5e851792992..0bc5f9642bf 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.29
+ The version of the OpenAPI document: release-1.30
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 effd4936b86..2c423550e08 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.29
+ The version of the OpenAPI document: release-1.30
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 fe3c182e553..3db9e24d6a0 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.29
+ The version of the OpenAPI document: release-1.30
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 79da650dc59..452af5580e3 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -101,7 +101,7 @@ class V1PodAffinityTerm(object):
def match_label_keys(self):
"""Gets the match_label_keys of this V1PodAffinityTerm. # noqa: E501
- MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. # noqa: E501
+ MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. # noqa: E501
:return: The match_label_keys of this V1PodAffinityTerm. # noqa: E501
:rtype: list[str]
@@ -112,7 +112,7 @@ class V1PodAffinityTerm(object):
def match_label_keys(self, match_label_keys):
"""Sets the match_label_keys of this V1PodAffinityTerm.
- MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. # noqa: E501
+ MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. # noqa: E501
:param match_label_keys: The match_label_keys of this V1PodAffinityTerm. # noqa: E501
:type: list[str]
@@ -124,7 +124,7 @@ class V1PodAffinityTerm(object):
def mismatch_label_keys(self):
"""Gets the mismatch_label_keys of this V1PodAffinityTerm. # noqa: E501
- MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. # noqa: E501
+ MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. # noqa: E501
:return: The mismatch_label_keys of this V1PodAffinityTerm. # noqa: E501
:rtype: list[str]
@@ -135,7 +135,7 @@ class V1PodAffinityTerm(object):
def mismatch_label_keys(self, mismatch_label_keys):
"""Sets the mismatch_label_keys of this V1PodAffinityTerm.
- MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. # noqa: E501
+ MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. # noqa: E501
:param mismatch_label_keys: The mismatch_label_keys of this V1PodAffinityTerm. # noqa: E501
:type: list[str]
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 cd9d23207b8..34c28e9b45a 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 f9db4ff9606..bc9e66e36e6 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.29
+ The version of the OpenAPI document: release-1.30
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 95b297330b6..cada267b147 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.29
+ The version of the OpenAPI document: release-1.30
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 e9fe270d844..a897def8f82 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.29
+ The version of the OpenAPI document: release-1.30
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 9a8f91f37ea..6d217008139 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.29
+ The version of the OpenAPI document: release-1.30
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 bfc42d3b001..8f110649112 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.29
+ The version of the OpenAPI document: release-1.30
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 740c1f2e9f3..be983b76294 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.29
+ The version of the OpenAPI document: release-1.30
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 2e515b74d9f..62ecade2112 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 4013bf93079..1cbcee5e4ac 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.29
+ The version of the OpenAPI document: release-1.30
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 0820c1b209d..b2c3d8f72bb 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.29
+ The version of the OpenAPI document: release-1.30
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 0edd6b987de..9a6d7f48fc7 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.29
+ The version of the OpenAPI document: release-1.30
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 d3bc7b3c4d9..e86031214c8 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.29
+ The version of the OpenAPI document: release-1.30
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 df0a3181508..b2dc676ffb5 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.29
+ The version of the OpenAPI document: release-1.30
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 bd759a6ab7c..7f0a29442d0 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.29
+ The version of the OpenAPI document: release-1.30
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 7628f7d7594..c1c5b04a097 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.29
+ The version of the OpenAPI document: release-1.30
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 d165fb8e1cb..d86c6eeacf4 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.29
+ The version of the OpenAPI document: release-1.30
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 7876d454d0a..7432e25147c 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.29
+ The version of the OpenAPI document: release-1.30
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 82c6d0d8c2c..b99edbbb7b8 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.29
+ The version of the OpenAPI document: release-1.30
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 797cb6c6b2e..32388c70a2b 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.29
+ The version of the OpenAPI document: release-1.30
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 5b6255a730a..77c2206c128 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -33,6 +33,7 @@ class V1PodSecurityContext(object):
and the value is json key in definition.
"""
openapi_types = {
+ 'app_armor_profile': 'V1AppArmorProfile',
'fs_group': 'int',
'fs_group_change_policy': 'str',
'run_as_group': 'int',
@@ -46,6 +47,7 @@ class V1PodSecurityContext(object):
}
attribute_map = {
+ 'app_armor_profile': 'appArmorProfile',
'fs_group': 'fsGroup',
'fs_group_change_policy': 'fsGroupChangePolicy',
'run_as_group': 'runAsGroup',
@@ -58,12 +60,13 @@ class V1PodSecurityContext(object):
'windows_options': 'windowsOptions'
}
- def __init__(self, fs_group=None, fs_group_change_policy=None, run_as_group=None, run_as_non_root=None, run_as_user=None, se_linux_options=None, seccomp_profile=None, supplemental_groups=None, sysctls=None, windows_options=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, app_armor_profile=None, fs_group=None, fs_group_change_policy=None, run_as_group=None, run_as_non_root=None, run_as_user=None, se_linux_options=None, seccomp_profile=None, supplemental_groups=None, sysctls=None, windows_options=None, local_vars_configuration=None): # noqa: E501
"""V1PodSecurityContext - 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._app_armor_profile = None
self._fs_group = None
self._fs_group_change_policy = None
self._run_as_group = None
@@ -76,6 +79,8 @@ class V1PodSecurityContext(object):
self._windows_options = None
self.discriminator = None
+ if app_armor_profile is not None:
+ self.app_armor_profile = app_armor_profile
if fs_group is not None:
self.fs_group = fs_group
if fs_group_change_policy is not None:
@@ -98,6 +103,27 @@ class V1PodSecurityContext(object):
self.windows_options = windows_options
@property
+ def app_armor_profile(self):
+ """Gets the app_armor_profile of this V1PodSecurityContext. # noqa: E501
+
+
+ :return: The app_armor_profile of this V1PodSecurityContext. # noqa: E501
+ :rtype: V1AppArmorProfile
+ """
+ return self._app_armor_profile
+
+ @app_armor_profile.setter
+ def app_armor_profile(self, app_armor_profile):
+ """Sets the app_armor_profile of this V1PodSecurityContext.
+
+
+ :param app_armor_profile: The app_armor_profile of this V1PodSecurityContext. # noqa: E501
+ :type: V1AppArmorProfile
+ """
+
+ self._app_armor_profile = app_armor_profile
+
+ @property
def fs_group(self):
"""Gets the fs_group of this V1PodSecurityContext. # noqa: E501
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 6ef77a60bac..4f77255e8f1 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -427,7 +427,7 @@ class V1PodSpec(object):
def host_aliases(self):
"""Gets the host_aliases of this V1PodSpec. # noqa: E501
- HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. # noqa: E501
+ HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. # noqa: E501
:return: The host_aliases of this V1PodSpec. # noqa: E501
:rtype: list[V1HostAlias]
@@ -438,7 +438,7 @@ class V1PodSpec(object):
def host_aliases(self, host_aliases):
"""Sets the host_aliases of this V1PodSpec.
- HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. # noqa: E501
+ HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. # noqa: E501
:param host_aliases: The host_aliases of this V1PodSpec. # noqa: E501
:type: list[V1HostAlias]
@@ -885,7 +885,7 @@ class V1PodSpec(object):
def scheduling_gates(self):
"""Gets the scheduling_gates of this V1PodSpec. # noqa: E501
- SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod. SchedulingGates can only be set at pod creation time, and be removed only afterwards. This is a beta feature enabled by the PodSchedulingReadiness feature gate. # noqa: E501
+ SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod. SchedulingGates can only be set at pod creation time, and be removed only afterwards. # noqa: E501
:return: The scheduling_gates of this V1PodSpec. # noqa: E501
:rtype: list[V1PodSchedulingGate]
@@ -896,7 +896,7 @@ class V1PodSpec(object):
def scheduling_gates(self, scheduling_gates):
"""Sets the scheduling_gates of this V1PodSpec.
- SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod. SchedulingGates can only be set at pod creation time, and be removed only afterwards. This is a beta feature enabled by the PodSchedulingReadiness feature gate. # noqa: E501
+ SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod. SchedulingGates can only be set at pod creation time, and be removed only afterwards. # noqa: E501
:param scheduling_gates: The scheduling_gates of this V1PodSpec. # noqa: E501
:type: list[V1PodSchedulingGate]
@@ -929,7 +929,7 @@ class V1PodSpec(object):
def service_account(self):
"""Gets the service_account of this V1PodSpec. # noqa: E501
- DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. # noqa: E501
+ DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. # noqa: E501
:return: The service_account of this V1PodSpec. # noqa: E501
:rtype: str
@@ -940,7 +940,7 @@ class V1PodSpec(object):
def service_account(self, service_account):
"""Sets the service_account of this V1PodSpec.
- DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. # noqa: E501
+ DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. # noqa: E501
:param service_account: The service_account of this V1PodSpec. # noqa: E501
:type: str
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 d0ab22c01c2..805fc539380 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 d7a80d8a533..6d9fa72b531 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.29
+ The version of the OpenAPI document: release-1.30
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 95e607d2d14..b338403d17f 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.29
+ The version of the OpenAPI document: release-1.30
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 8951c32f023..ec69a5152bc 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.29
+ The version of the OpenAPI document: release-1.30
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 14376079a5e..029b42d1302 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.29
+ The version of the OpenAPI document: release-1.30
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 d37c0eda053..b7a68cd7bd3 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.29
+ The version of the OpenAPI document: release-1.30
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 d446ff050e1..5a3a45d62be 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.29
+ The version of the OpenAPI document: release-1.30
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 3c6bdbc050d..4db88f41720 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.29
+ The version of the OpenAPI document: release-1.30
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 c95deeb93d6..a50e93661bc 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.29
+ The version of the OpenAPI document: release-1.30
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 c3f8a41649b..be5b0556f6b 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.29
+ The version of the OpenAPI document: release-1.30
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 17363072657..eef9cd573de 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.29
+ The version of the OpenAPI document: release-1.30
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 6afa42d5955..f9d05a104bd 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.29
+ The version of the OpenAPI document: release-1.30
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 4b364d3fb81..4e421856bbd 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.29
+ The version of the OpenAPI document: release-1.30
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 ad1692129f1..ec7bc91b15c 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.29
+ The version of the OpenAPI document: release-1.30
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 dbc096d0074..dea02392d60 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.29
+ The version of the OpenAPI document: release-1.30
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 7719385bdc1..dd7a8ffe7e5 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.29
+ The version of the OpenAPI document: release-1.30
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 1df4aa2a7fa..ef43858d79b 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.29
+ The version of the OpenAPI document: release-1.30
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 621fe2565e2..bab5cf806fa 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.29
+ The version of the OpenAPI document: release-1.30
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 1006b300205..f06de749409 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.29
+ The version of the OpenAPI document: release-1.30
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 e11f4da7435..cb144b422c0 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.29
+ The version of the OpenAPI document: release-1.30
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 4ae3453cedf..1c18f05aaa5 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.29
+ The version of the OpenAPI document: release-1.30
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 d9ce685ba7d..9b568f6d778 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.29
+ The version of the OpenAPI document: release-1.30
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 c4ee8e0e05b..1c61d1e3c04 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.29
+ The version of the OpenAPI document: release-1.30
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 991384a4e09..d0cbefed50c 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.29
+ The version of the OpenAPI document: release-1.30
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 344d5b71134..8955f011eb8 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.29
+ The version of the OpenAPI document: release-1.30
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 f5a7c719cfb..3206fb2ed16 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.29
+ The version of the OpenAPI document: release-1.30
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 8268d7f8d6c..274af7f0f5d 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.29
+ The version of the OpenAPI document: release-1.30
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 53ee28e973d..cd5a1c20d74 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.29
+ The version of the OpenAPI document: release-1.30
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 4ce2e5bf639..d8a9000c117 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.29
+ The version of the OpenAPI document: release-1.30
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 185b2912b58..1c06f9e8ea6 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.29
+ The version of the OpenAPI document: release-1.30
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 bc0aeba66ba..77c9509fe78 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.29
+ The version of the OpenAPI document: release-1.30
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 1a27e840ae8..9918ef0dc75 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.29
+ The version of the OpenAPI document: release-1.30
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 d5dd6ca706b..b2f15a41e75 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.29
+ The version of the OpenAPI document: release-1.30
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 f296b3a84d2..3135a4a2b23 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.29
+ The version of the OpenAPI document: release-1.30
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 b1debbe5f13..ff3991d1331 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.29
+ The version of the OpenAPI document: release-1.30
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/v1_resource_claim.py
index 390fec5e0d6..13a8340cf2d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1_resource_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 efb478a51c8..5eda2bbfa0a 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.29
+ The version of the OpenAPI document: release-1.30
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 e77774bdcc7..70d65ba7553 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 08af6f42c1e..42888a72415 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.29
+ The version of the OpenAPI document: release-1.30
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 60e2912fe0a..93307434cf5 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.29
+ The version of the OpenAPI document: release-1.30
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 9120219cdc4..299472f9207 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.29
+ The version of the OpenAPI document: release-1.30
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 fbaa5899268..1aba71813cc 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.29
+ The version of the OpenAPI document: release-1.30
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 dbe9960277a..be8c4d69f43 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 1f26b124201..ee7e77987de 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.29
+ The version of the OpenAPI document: release-1.30
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 ca8fe9bdc79..14e43f8c0f6 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.29
+ The version of the OpenAPI document: release-1.30
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 d99170db83c..c8293e4ea23 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.29
+ The version of the OpenAPI document: release-1.30
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 9842017cb57..9692c670f75 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.29
+ The version of the OpenAPI document: release-1.30
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 6c8ba7369e6..472abc1e9ff 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.29
+ The version of the OpenAPI document: release-1.30
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 499d03cb277..27cf729b2bf 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.29
+ The version of the OpenAPI document: release-1.30
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 87169a87203..4485a829bea 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 75f424cd701..7001ddea1b0 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.29
+ The version of the OpenAPI document: release-1.30
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 3d4a3abf78c..9ae301f5363 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.29
+ The version of the OpenAPI document: release-1.30
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 d3e2a6b57ce..8be8240ad70 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.29
+ The version of the OpenAPI document: release-1.30
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 1a7b885a83e..c68ee25c369 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.29
+ The version of the OpenAPI document: release-1.30
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 27208b53dee..2da1b46fb25 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.29
+ The version of the OpenAPI document: release-1.30
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 0e96a22ea96..002c7ab116e 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.29
+ The version of the OpenAPI document: release-1.30
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 2b0bbc85774..9f1da85958c 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.29
+ The version of the OpenAPI document: release-1.30
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 6d6ea77ffd6..cfb1795a196 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.29
+ The version of the OpenAPI document: release-1.30
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 63ad67b610e..44371c5fcd1 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.29
+ The version of the OpenAPI document: release-1.30
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 e4a2c49cd09..c85d88e5c9e 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.29
+ The version of the OpenAPI document: release-1.30
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 091bde29cc5..bfac734d76b 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.29
+ The version of the OpenAPI document: release-1.30
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 5643fb3d85b..d0e0bd468ef 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.29
+ The version of the OpenAPI document: release-1.30
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 6620a00b0e1..988ded3c881 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.29
+ The version of the OpenAPI document: release-1.30
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 71a97026fc9..890429d17a3 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.29
+ The version of the OpenAPI document: release-1.30
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 e35d6c2c5a8..f36fb6e5baa 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.29
+ The version of the OpenAPI document: release-1.30
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 2571fd66ee8..d351fd18693 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.29
+ The version of the OpenAPI document: release-1.30
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 567a85fc760..c52e1d4c8d8 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -61,7 +61,7 @@ class V1SecretEnvSource(object):
def name(self):
"""Gets the name of this V1SecretEnvSource. # noqa: E501
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:return: The name of this V1SecretEnvSource. # noqa: E501
:rtype: str
@@ -72,7 +72,7 @@ class V1SecretEnvSource(object):
def name(self, name):
"""Sets the name of this V1SecretEnvSource.
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:param name: The name of this V1SecretEnvSource. # noqa: E501
:type: str
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 31dea43ca54..a6cc3bd4376 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -90,7 +90,7 @@ class V1SecretKeySelector(object):
def name(self):
"""Gets the name of this V1SecretKeySelector. # noqa: E501
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:return: The name of this V1SecretKeySelector. # noqa: E501
:rtype: str
@@ -101,7 +101,7 @@ class V1SecretKeySelector(object):
def name(self, name):
"""Sets the name of this V1SecretKeySelector.
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:param name: The name of this V1SecretKeySelector. # noqa: E501
:type: str
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 d040033d3c1..8a679aeee8e 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.29
+ The version of the OpenAPI document: release-1.30
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 fdc68a66986..cd9f1119afc 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -89,7 +89,7 @@ class V1SecretProjection(object):
def name(self):
"""Gets the name of this V1SecretProjection. # noqa: E501
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:return: The name of this V1SecretProjection. # noqa: E501
:rtype: str
@@ -100,7 +100,7 @@ class V1SecretProjection(object):
def name(self, name):
"""Sets the name of this V1SecretProjection.
- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
+ Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501
:param name: The name of this V1SecretProjection. # noqa: E501
:type: str
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 29d5fedd9b5..d6d9a295091 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.29
+ The version of the OpenAPI document: release-1.30
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 08277163b39..90b57a479c3 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.29
+ The version of the OpenAPI document: release-1.30
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 87c32af99bd..b43d5ad5fb1 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -34,6 +34,7 @@ class V1SecurityContext(object):
"""
openapi_types = {
'allow_privilege_escalation': 'bool',
+ 'app_armor_profile': 'V1AppArmorProfile',
'capabilities': 'V1Capabilities',
'privileged': 'bool',
'proc_mount': 'str',
@@ -48,6 +49,7 @@ class V1SecurityContext(object):
attribute_map = {
'allow_privilege_escalation': 'allowPrivilegeEscalation',
+ 'app_armor_profile': 'appArmorProfile',
'capabilities': 'capabilities',
'privileged': 'privileged',
'proc_mount': 'procMount',
@@ -60,13 +62,14 @@ class V1SecurityContext(object):
'windows_options': 'windowsOptions'
}
- def __init__(self, allow_privilege_escalation=None, capabilities=None, privileged=None, proc_mount=None, read_only_root_filesystem=None, run_as_group=None, run_as_non_root=None, run_as_user=None, se_linux_options=None, seccomp_profile=None, windows_options=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, allow_privilege_escalation=None, app_armor_profile=None, capabilities=None, privileged=None, proc_mount=None, read_only_root_filesystem=None, run_as_group=None, run_as_non_root=None, run_as_user=None, se_linux_options=None, seccomp_profile=None, windows_options=None, local_vars_configuration=None): # noqa: E501
"""V1SecurityContext - 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._allow_privilege_escalation = None
+ self._app_armor_profile = None
self._capabilities = None
self._privileged = None
self._proc_mount = None
@@ -81,6 +84,8 @@ class V1SecurityContext(object):
if allow_privilege_escalation is not None:
self.allow_privilege_escalation = allow_privilege_escalation
+ if app_armor_profile is not None:
+ self.app_armor_profile = app_armor_profile
if capabilities is not None:
self.capabilities = capabilities
if privileged is not None:
@@ -126,6 +131,27 @@ class V1SecurityContext(object):
self._allow_privilege_escalation = allow_privilege_escalation
@property
+ def app_armor_profile(self):
+ """Gets the app_armor_profile of this V1SecurityContext. # noqa: E501
+
+
+ :return: The app_armor_profile of this V1SecurityContext. # noqa: E501
+ :rtype: V1AppArmorProfile
+ """
+ return self._app_armor_profile
+
+ @app_armor_profile.setter
+ def app_armor_profile(self, app_armor_profile):
+ """Sets the app_armor_profile of this V1SecurityContext.
+
+
+ :param app_armor_profile: The app_armor_profile of this V1SecurityContext. # noqa: E501
+ :type: V1AppArmorProfile
+ """
+
+ self._app_armor_profile = app_armor_profile
+
+ @property
def capabilities(self):
"""Gets the capabilities of this V1SecurityContext. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_selectable_field.py b/contrib/python/kubernetes/kubernetes/client/models/v1_selectable_field.py
new file mode 100644
index 00000000000..1dc3b6c5073
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_selectable_field.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1SelectableField(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 = {
+ 'json_path': 'str'
+ }
+
+ attribute_map = {
+ 'json_path': 'jsonPath'
+ }
+
+ def __init__(self, json_path=None, local_vars_configuration=None): # noqa: E501
+ """V1SelectableField - 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._json_path = None
+ self.discriminator = None
+
+ self.json_path = json_path
+
+ @property
+ def json_path(self):
+ """Gets the json_path of this V1SelectableField. # noqa: E501
+
+ jsonPath is a simple JSON path which is evaluated against each custom resource to produce a field selector value. Only JSON paths without the array notation are allowed. Must point to a field of type string, boolean or integer. Types with enum values and strings with formats are allowed. If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. Must not point to metdata fields. Required. # noqa: E501
+
+ :return: The json_path of this V1SelectableField. # noqa: E501
+ :rtype: str
+ """
+ return self._json_path
+
+ @json_path.setter
+ def json_path(self, json_path):
+ """Sets the json_path of this V1SelectableField.
+
+ jsonPath is a simple JSON path which is evaluated against each custom resource to produce a field selector value. Only JSON paths without the array notation are allowed. Must point to a field of type string, boolean or integer. Types with enum values and strings with formats are allowed. If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. Must not point to metdata fields. Required. # noqa: E501
+
+ :param json_path: The json_path of this V1SelectableField. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and json_path is None: # noqa: E501
+ raise ValueError("Invalid value for `json_path`, must not be `None`") # noqa: E501
+
+ self._json_path = json_path
+
+ 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, V1SelectableField):
+ 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, V1SelectableField):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 1624695738e..c0d6e1d6101 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.29
+ The version of the OpenAPI document: release-1.30
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 ff3dee48978..10594b1bbf1 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.29
+ The version of the OpenAPI document: release-1.30
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 bdbac65ab18..b2f9ac8e21f 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.29
+ The version of the OpenAPI document: release-1.30
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 279268d75f8..d9212317881 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.29
+ The version of the OpenAPI document: release-1.30
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 92c75c127fa..984b0ee8806 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.29
+ The version of the OpenAPI document: release-1.30
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 de4962bcdfb..bab621b58ae 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.29
+ The version of the OpenAPI document: release-1.30
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 d9b7f8010c7..f2e4e178a87 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.29
+ The version of the OpenAPI document: release-1.30
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 484b29bbab3..5552897f9dc 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.29
+ The version of the OpenAPI document: release-1.30
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 770405c0c06..720d99167aa 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.29
+ The version of the OpenAPI document: release-1.30
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 68b71c416d2..fba77fcd122 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.29
+ The version of the OpenAPI document: release-1.30
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 889f625e1ca..e41f2aef2e5 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.29
+ The version of the OpenAPI document: release-1.30
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 f6585555ba4..72c361b1f24 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.29
+ The version of the OpenAPI document: release-1.30
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 60af2d85057..a22a0c5c610 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.29
+ The version of the OpenAPI document: release-1.30
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 593e4d96683..5ef3a0498b7 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.29
+ The version of the OpenAPI document: release-1.30
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 e428d1fb33f..154048e1e30 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.29
+ The version of the OpenAPI document: release-1.30
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 fe1841ace3c..baa8b0cb09b 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -51,6 +51,7 @@ class V1ServiceSpec(object):
'selector': 'dict(str, str)',
'session_affinity': 'str',
'session_affinity_config': 'V1SessionAffinityConfig',
+ 'traffic_distribution': 'str',
'type': 'str'
}
@@ -73,10 +74,11 @@ class V1ServiceSpec(object):
'selector': 'selector',
'session_affinity': 'sessionAffinity',
'session_affinity_config': 'sessionAffinityConfig',
+ 'traffic_distribution': 'trafficDistribution',
'type': 'type'
}
- def __init__(self, allocate_load_balancer_node_ports=None, cluster_ip=None, cluster_i_ps=None, external_i_ps=None, external_name=None, external_traffic_policy=None, health_check_node_port=None, internal_traffic_policy=None, ip_families=None, ip_family_policy=None, load_balancer_class=None, load_balancer_ip=None, load_balancer_source_ranges=None, ports=None, publish_not_ready_addresses=None, selector=None, session_affinity=None, session_affinity_config=None, type=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, allocate_load_balancer_node_ports=None, cluster_ip=None, cluster_i_ps=None, external_i_ps=None, external_name=None, external_traffic_policy=None, health_check_node_port=None, internal_traffic_policy=None, ip_families=None, ip_family_policy=None, load_balancer_class=None, load_balancer_ip=None, load_balancer_source_ranges=None, ports=None, publish_not_ready_addresses=None, selector=None, session_affinity=None, session_affinity_config=None, traffic_distribution=None, type=None, local_vars_configuration=None): # noqa: E501
"""V1ServiceSpec - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -100,6 +102,7 @@ class V1ServiceSpec(object):
self._selector = None
self._session_affinity = None
self._session_affinity_config = None
+ self._traffic_distribution = None
self._type = None
self.discriminator = None
@@ -139,6 +142,8 @@ class V1ServiceSpec(object):
self.session_affinity = session_affinity
if session_affinity_config is not None:
self.session_affinity_config = session_affinity_config
+ if traffic_distribution is not None:
+ self.traffic_distribution = traffic_distribution
if type is not None:
self.type = type
@@ -555,6 +560,29 @@ class V1ServiceSpec(object):
self._session_affinity_config = session_affinity_config
@property
+ def traffic_distribution(self):
+ """Gets the traffic_distribution of this V1ServiceSpec. # noqa: E501
+
+ TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature. # noqa: E501
+
+ :return: The traffic_distribution of this V1ServiceSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._traffic_distribution
+
+ @traffic_distribution.setter
+ def traffic_distribution(self, traffic_distribution):
+ """Sets the traffic_distribution of this V1ServiceSpec.
+
+ TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature. # noqa: E501
+
+ :param traffic_distribution: The traffic_distribution of this V1ServiceSpec. # noqa: E501
+ :type: str
+ """
+
+ self._traffic_distribution = traffic_distribution
+
+ @property
def type(self):
"""Gets the type of this V1ServiceSpec. # noqa: E501
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 40b55be6e7e..3736bf52460 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.29
+ The version of the OpenAPI document: release-1.30
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 7c51852c9ca..665626ef202 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.29
+ The version of the OpenAPI document: release-1.30
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 e068f3da29e..2f699f9e581 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.29
+ The version of the OpenAPI document: release-1.30
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 bfedf0a8bdb..1931f1aba3b 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.29
+ The version of the OpenAPI document: release-1.30
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 21d2c89a771..612d00e81e3 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.29
+ The version of the OpenAPI document: release-1.30
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 596c4d434f1..d696d35b307 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.29
+ The version of the OpenAPI document: release-1.30
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 75dcd1eefff..e6fe4d448b1 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.29
+ The version of the OpenAPI document: release-1.30
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 28e93aa545c..a959f3acc1d 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.29
+ The version of the OpenAPI document: release-1.30
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 97c9b5b7d53..7adb7aa7ef6 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.29
+ The version of the OpenAPI document: release-1.30
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 cc9713b2508..85cfba8075e 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.29
+ The version of the OpenAPI document: release-1.30
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 7b6e6d0d39b..e0c195935d9 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.29
+ The version of the OpenAPI document: release-1.30
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 d1c7b6a5899..01b6e6291ff 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.29
+ The version of the OpenAPI document: release-1.30
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 c548fa0f5be..1497cc8d10f 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.29
+ The version of the OpenAPI document: release-1.30
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 e47f4ca390e..94c96e941a1 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.29
+ The version of the OpenAPI document: release-1.30
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 345a41908c1..b92c003815a 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.29
+ The version of the OpenAPI document: release-1.30
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 aa10ce09c54..880b668f393 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.29
+ The version of the OpenAPI document: release-1.30
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 f95b9663722..9c5c39b25c6 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.29
+ The version of the OpenAPI document: release-1.30
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 3ea37a49553..a9f7022278e 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.29
+ The version of the OpenAPI document: release-1.30
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 262fdbf2daf..01b44f809e4 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.29
+ The version of the OpenAPI document: release-1.30
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 fa6660de1e7..6434651c3e6 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.29
+ The version of the OpenAPI document: release-1.30
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 65deef8791f..ee7640c00de 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.29
+ The version of the OpenAPI document: release-1.30
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 b0d381811ac..356e994662f 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..d881e47102c
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1SuccessPolicy(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 = {
+ 'rules': 'list[V1SuccessPolicyRule]'
+ }
+
+ attribute_map = {
+ 'rules': 'rules'
+ }
+
+ def __init__(self, rules=None, local_vars_configuration=None): # noqa: E501
+ """V1SuccessPolicy - 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._rules = None
+ self.discriminator = None
+
+ self.rules = rules
+
+ @property
+ 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
+
+ :return: The rules of this V1SuccessPolicy. # noqa: E501
+ :rtype: list[V1SuccessPolicyRule]
+ """
+ return self._rules
+
+ @rules.setter
+ 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
+
+ :param rules: The rules of this V1SuccessPolicy. # noqa: E501
+ :type: list[V1SuccessPolicyRule]
+ """
+ if self.local_vars_configuration.client_side_validation and rules is None: # noqa: E501
+ raise ValueError("Invalid value for `rules`, must not be `None`") # noqa: E501
+
+ self._rules = rules
+
+ 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, V1SuccessPolicy):
+ 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, V1SuccessPolicy):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..6993426cb68
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_success_policy_rule.py
@@ -0,0 +1,150 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1SuccessPolicyRule(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 = {
+ 'succeeded_count': 'int',
+ 'succeeded_indexes': 'str'
+ }
+
+ attribute_map = {
+ 'succeeded_count': 'succeededCount',
+ 'succeeded_indexes': 'succeededIndexes'
+ }
+
+ def __init__(self, succeeded_count=None, succeeded_indexes=None, local_vars_configuration=None): # noqa: E501
+ """V1SuccessPolicyRule - 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._succeeded_count = None
+ self._succeeded_indexes = None
+ self.discriminator = None
+
+ if succeeded_count is not None:
+ self.succeeded_count = succeeded_count
+ if succeeded_indexes is not None:
+ self.succeeded_indexes = succeeded_indexes
+
+ @property
+ def succeeded_count(self):
+ """Gets the succeeded_count of this V1SuccessPolicyRule. # noqa: E501
+
+ succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is \"1-4\", succeededCount is \"3\", and completed indexes are \"1\", \"3\", and \"5\", the Job isn't declared as succeeded because only \"1\" and \"3\" indexes are considered in that rules. When this field is null, this doesn't default to any value and is never evaluated at any time. When specified it needs to be a positive integer. # noqa: E501
+
+ :return: The succeeded_count of this V1SuccessPolicyRule. # noqa: E501
+ :rtype: int
+ """
+ return self._succeeded_count
+
+ @succeeded_count.setter
+ def succeeded_count(self, succeeded_count):
+ """Sets the succeeded_count of this V1SuccessPolicyRule.
+
+ succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is \"1-4\", succeededCount is \"3\", and completed indexes are \"1\", \"3\", and \"5\", the Job isn't declared as succeeded because only \"1\" and \"3\" indexes are considered in that rules. When this field is null, this doesn't default to any value and is never evaluated at any time. When specified it needs to be a positive integer. # noqa: E501
+
+ :param succeeded_count: The succeeded_count of this V1SuccessPolicyRule. # noqa: E501
+ :type: int
+ """
+
+ self._succeeded_count = succeeded_count
+
+ @property
+ def succeeded_indexes(self):
+ """Gets the succeeded_indexes of this V1SuccessPolicyRule. # noqa: E501
+
+ succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. The list of indexes must be within 0 to \".spec.completions-1\" and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". When this field is null, this field doesn't default to any value and is never evaluated at any time. # noqa: E501
+
+ :return: The succeeded_indexes of this V1SuccessPolicyRule. # noqa: E501
+ :rtype: str
+ """
+ return self._succeeded_indexes
+
+ @succeeded_indexes.setter
+ def succeeded_indexes(self, succeeded_indexes):
+ """Sets the succeeded_indexes of this V1SuccessPolicyRule.
+
+ succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. The list of indexes must be within 0 to \".spec.completions-1\" and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". When this field is null, this field doesn't default to any value and is never evaluated at any time. # noqa: E501
+
+ :param succeeded_indexes: The succeeded_indexes of this V1SuccessPolicyRule. # noqa: E501
+ :type: str
+ """
+
+ self._succeeded_indexes = succeeded_indexes
+
+ 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, V1SuccessPolicyRule):
+ 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, V1SuccessPolicyRule):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_sysctl.py b/contrib/python/kubernetes/kubernetes/client/models/v1_sysctl.py
index dfb442693af..41f8892dff7 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.29
+ The version of the OpenAPI document: release-1.30
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 f20e4f9d17e..3900925a534 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 9bf6b7e9122..a6d901cc496 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.29
+ The version of the OpenAPI document: release-1.30
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 4a3d777ec09..82a425bee14 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.29
+ The version of the OpenAPI document: release-1.30
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 d1e7bf9e601..534c63ca47a 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.29
+ The version of the OpenAPI document: release-1.30
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 fe8300cf75e..d8e20789527 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.29
+ The version of the OpenAPI document: release-1.30
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 4a155152a71..44a9b1f0cec 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.29
+ The version of the OpenAPI document: release-1.30
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 6b8e5d69c0f..a3589302815 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.29
+ The version of the OpenAPI document: release-1.30
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 91c0be52a78..5e0735f6e2c 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.29
+ The version of the OpenAPI document: release-1.30
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 e0aa2af43c8..e3927a7b4f5 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.29
+ The version of the OpenAPI document: release-1.30
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 d2110482fb2..a7024827037 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.29
+ The version of the OpenAPI document: release-1.30
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 d3b6f6a8549..ecca5c23db2 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -157,7 +157,7 @@ class V1TopologySpreadConstraint(object):
def min_domains(self):
"""Gets the min_domains of this V1TopologySpreadConstraint. # noqa: E501
- MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so \"global minimum\" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default). # noqa: E501
+ MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so \"global minimum\" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. # noqa: E501
:return: The min_domains of this V1TopologySpreadConstraint. # noqa: E501
:rtype: int
@@ -168,7 +168,7 @@ class V1TopologySpreadConstraint(object):
def min_domains(self, min_domains):
"""Sets the min_domains of this V1TopologySpreadConstraint.
- MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so \"global minimum\" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default). # noqa: E501
+ MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so \"global minimum\" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. # noqa: E501
:param min_domains: The min_domains of this V1TopologySpreadConstraint. # noqa: E501
:type: int
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_type_checking.py b/contrib/python/kubernetes/kubernetes/client/models/v1_type_checking.py
new file mode 100644
index 00000000000..eff201f21c6
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_type_checking.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1TypeChecking(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_warnings': 'list[V1ExpressionWarning]'
+ }
+
+ attribute_map = {
+ 'expression_warnings': 'expressionWarnings'
+ }
+
+ def __init__(self, expression_warnings=None, local_vars_configuration=None): # noqa: E501
+ """V1TypeChecking - 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.discriminator = None
+
+ if expression_warnings is not None:
+ self.expression_warnings = expression_warnings
+
+ @property
+ def expression_warnings(self):
+ """Gets the expression_warnings of this V1TypeChecking. # noqa: E501
+
+ The type checking warnings for each expression. # noqa: E501
+
+ :return: The expression_warnings of this V1TypeChecking. # noqa: E501
+ :rtype: list[V1ExpressionWarning]
+ """
+ return self._expression_warnings
+
+ @expression_warnings.setter
+ def expression_warnings(self, expression_warnings):
+ """Sets the expression_warnings of this V1TypeChecking.
+
+ The type checking warnings for each expression. # noqa: E501
+
+ :param expression_warnings: The expression_warnings of this V1TypeChecking. # noqa: E501
+ :type: list[V1ExpressionWarning]
+ """
+
+ self._expression_warnings = expression_warnings
+
+ 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, V1TypeChecking):
+ 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, V1TypeChecking):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 9232fd10c93..bd3cf6b6d00 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.29
+ The version of the OpenAPI document: release-1.30
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 71849fa3c03..6bb85484011 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.29
+ The version of the OpenAPI document: release-1.30
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 a87874c6355..969533a7229 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.29
+ The version of the OpenAPI document: release-1.30
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 a886a901c43..5c3777161ac 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.29
+ The version of the OpenAPI document: release-1.30
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 ad2f1c945f0..5ce68fa2fd1 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..726e0ed1bc1
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy.py
@@ -0,0 +1,228 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ValidatingAdmissionPolicy(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': 'V1ValidatingAdmissionPolicySpec',
+ 'status': 'V1ValidatingAdmissionPolicyStatus'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'kind': 'kind',
+ 'metadata': 'metadata',
+ 'spec': 'spec',
+ 'status': 'status'
+ }
+
+ def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501
+ """V1ValidatingAdmissionPolicy - 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._status = 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
+ if status is not None:
+ self.status = status
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1ValidatingAdmissionPolicy. # 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 V1ValidatingAdmissionPolicy. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1ValidatingAdmissionPolicy.
+
+ 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 V1ValidatingAdmissionPolicy. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1ValidatingAdmissionPolicy. # 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 V1ValidatingAdmissionPolicy. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1ValidatingAdmissionPolicy.
+
+ 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 V1ValidatingAdmissionPolicy. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1ValidatingAdmissionPolicy. # noqa: E501
+
+
+ :return: The metadata of this V1ValidatingAdmissionPolicy. # noqa: E501
+ :rtype: V1ObjectMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1ValidatingAdmissionPolicy.
+
+
+ :param metadata: The metadata of this V1ValidatingAdmissionPolicy. # noqa: E501
+ :type: V1ObjectMeta
+ """
+
+ self._metadata = metadata
+
+ @property
+ def spec(self):
+ """Gets the spec of this V1ValidatingAdmissionPolicy. # noqa: E501
+
+
+ :return: The spec of this V1ValidatingAdmissionPolicy. # noqa: E501
+ :rtype: V1ValidatingAdmissionPolicySpec
+ """
+ return self._spec
+
+ @spec.setter
+ def spec(self, spec):
+ """Sets the spec of this V1ValidatingAdmissionPolicy.
+
+
+ :param spec: The spec of this V1ValidatingAdmissionPolicy. # noqa: E501
+ :type: V1ValidatingAdmissionPolicySpec
+ """
+
+ self._spec = spec
+
+ @property
+ def status(self):
+ """Gets the status of this V1ValidatingAdmissionPolicy. # noqa: E501
+
+
+ :return: The status of this V1ValidatingAdmissionPolicy. # noqa: E501
+ :rtype: V1ValidatingAdmissionPolicyStatus
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this V1ValidatingAdmissionPolicy.
+
+
+ :param status: The status of this V1ValidatingAdmissionPolicy. # noqa: E501
+ :type: V1ValidatingAdmissionPolicyStatus
+ """
+
+ self._status = status
+
+ 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, V1ValidatingAdmissionPolicy):
+ 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, V1ValidatingAdmissionPolicy):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..d575805ddd9
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ValidatingAdmissionPolicyBinding(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': 'V1ValidatingAdmissionPolicyBindingSpec'
+ }
+
+ 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
+ """V1ValidatingAdmissionPolicyBinding - 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 V1ValidatingAdmissionPolicyBinding. # 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 V1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1ValidatingAdmissionPolicyBinding.
+
+ 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 V1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1ValidatingAdmissionPolicyBinding. # 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 V1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1ValidatingAdmissionPolicyBinding.
+
+ 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 V1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1ValidatingAdmissionPolicyBinding. # noqa: E501
+
+
+ :return: The metadata of this V1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :rtype: V1ObjectMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1ValidatingAdmissionPolicyBinding.
+
+
+ :param metadata: The metadata of this V1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :type: V1ObjectMeta
+ """
+
+ self._metadata = metadata
+
+ @property
+ def spec(self):
+ """Gets the spec of this V1ValidatingAdmissionPolicyBinding. # noqa: E501
+
+
+ :return: The spec of this V1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :rtype: V1ValidatingAdmissionPolicyBindingSpec
+ """
+ return self._spec
+
+ @spec.setter
+ def spec(self, spec):
+ """Sets the spec of this V1ValidatingAdmissionPolicyBinding.
+
+
+ :param spec: The spec of this V1ValidatingAdmissionPolicyBinding. # noqa: E501
+ :type: V1ValidatingAdmissionPolicyBindingSpec
+ """
+
+ 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, V1ValidatingAdmissionPolicyBinding):
+ 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, V1ValidatingAdmissionPolicyBinding):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..6231c1dfbc1
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_list.py
@@ -0,0 +1,204 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ValidatingAdmissionPolicyBindingList(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[V1ValidatingAdmissionPolicyBinding]',
+ '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
+ """V1ValidatingAdmissionPolicyBindingList - 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
+ if items is not None:
+ 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 V1ValidatingAdmissionPolicyBindingList. # 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 V1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1ValidatingAdmissionPolicyBindingList.
+
+ 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 V1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def items(self):
+ """Gets the items of this V1ValidatingAdmissionPolicyBindingList. # noqa: E501
+
+ List of PolicyBinding. # noqa: E501
+
+ :return: The items of this V1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :rtype: list[V1ValidatingAdmissionPolicyBinding]
+ """
+ return self._items
+
+ @items.setter
+ def items(self, items):
+ """Sets the items of this V1ValidatingAdmissionPolicyBindingList.
+
+ List of PolicyBinding. # noqa: E501
+
+ :param items: The items of this V1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :type: list[V1ValidatingAdmissionPolicyBinding]
+ """
+
+ self._items = items
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1ValidatingAdmissionPolicyBindingList. # 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 V1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1ValidatingAdmissionPolicyBindingList.
+
+ 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 V1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1ValidatingAdmissionPolicyBindingList. # noqa: E501
+
+
+ :return: The metadata of this V1ValidatingAdmissionPolicyBindingList. # noqa: E501
+ :rtype: V1ListMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1ValidatingAdmissionPolicyBindingList.
+
+
+ :param metadata: The metadata of this V1ValidatingAdmissionPolicyBindingList. # 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, V1ValidatingAdmissionPolicyBindingList):
+ 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, V1ValidatingAdmissionPolicyBindingList):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..f4d2166d5f4
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_binding_spec.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ValidatingAdmissionPolicyBindingSpec(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': 'V1MatchResources',
+ 'param_ref': 'V1ParamRef',
+ '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
+ """V1ValidatingAdmissionPolicyBindingSpec - 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 V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
+
+
+ :return: The match_resources of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
+ :rtype: V1MatchResources
+ """
+ return self._match_resources
+
+ @match_resources.setter
+ def match_resources(self, match_resources):
+ """Sets the match_resources of this V1ValidatingAdmissionPolicyBindingSpec.
+
+
+ :param match_resources: The match_resources of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
+ :type: V1MatchResources
+ """
+
+ self._match_resources = match_resources
+
+ @property
+ def param_ref(self):
+ """Gets the param_ref of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
+
+
+ :return: The param_ref of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
+ :rtype: V1ParamRef
+ """
+ return self._param_ref
+
+ @param_ref.setter
+ def param_ref(self, param_ref):
+ """Sets the param_ref of this V1ValidatingAdmissionPolicyBindingSpec.
+
+
+ :param param_ref: The param_ref of this V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
+ :type: V1ParamRef
+ """
+
+ self._param_ref = param_ref
+
+ @property
+ def policy_name(self):
+ """Gets the policy_name of this V1ValidatingAdmissionPolicyBindingSpec. # 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 V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._policy_name
+
+ @policy_name.setter
+ def policy_name(self, policy_name):
+ """Sets the policy_name of this V1ValidatingAdmissionPolicyBindingSpec.
+
+ 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 V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
+ :type: str
+ """
+
+ self._policy_name = policy_name
+
+ @property
+ def validation_actions(self):
+ """Gets the validation_actions of this V1ValidatingAdmissionPolicyBindingSpec. # 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 V1ValidatingAdmissionPolicyBindingSpec. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._validation_actions
+
+ @validation_actions.setter
+ def validation_actions(self, validation_actions):
+ """Sets the validation_actions of this V1ValidatingAdmissionPolicyBindingSpec.
+
+ 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 V1ValidatingAdmissionPolicyBindingSpec. # 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, V1ValidatingAdmissionPolicyBindingSpec):
+ 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, V1ValidatingAdmissionPolicyBindingSpec):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..2ae1befa5a0
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_list.py
@@ -0,0 +1,204 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ValidatingAdmissionPolicyList(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[V1ValidatingAdmissionPolicy]',
+ '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
+ """V1ValidatingAdmissionPolicyList - 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
+ if items is not None:
+ 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 V1ValidatingAdmissionPolicyList. # 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 V1ValidatingAdmissionPolicyList. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1ValidatingAdmissionPolicyList.
+
+ 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 V1ValidatingAdmissionPolicyList. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def items(self):
+ """Gets the items of this V1ValidatingAdmissionPolicyList. # noqa: E501
+
+ List of ValidatingAdmissionPolicy. # noqa: E501
+
+ :return: The items of this V1ValidatingAdmissionPolicyList. # noqa: E501
+ :rtype: list[V1ValidatingAdmissionPolicy]
+ """
+ return self._items
+
+ @items.setter
+ def items(self, items):
+ """Sets the items of this V1ValidatingAdmissionPolicyList.
+
+ List of ValidatingAdmissionPolicy. # noqa: E501
+
+ :param items: The items of this V1ValidatingAdmissionPolicyList. # noqa: E501
+ :type: list[V1ValidatingAdmissionPolicy]
+ """
+
+ self._items = items
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1ValidatingAdmissionPolicyList. # 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 V1ValidatingAdmissionPolicyList. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1ValidatingAdmissionPolicyList.
+
+ 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 V1ValidatingAdmissionPolicyList. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1ValidatingAdmissionPolicyList. # noqa: E501
+
+
+ :return: The metadata of this V1ValidatingAdmissionPolicyList. # noqa: E501
+ :rtype: V1ListMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1ValidatingAdmissionPolicyList.
+
+
+ :param metadata: The metadata of this V1ValidatingAdmissionPolicyList. # 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, V1ValidatingAdmissionPolicyList):
+ 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, V1ValidatingAdmissionPolicyList):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..fa14740841b
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ValidatingAdmissionPolicySpec(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[V1AuditAnnotation]',
+ 'failure_policy': 'str',
+ 'match_conditions': 'list[V1MatchCondition]',
+ 'match_constraints': 'V1MatchResources',
+ 'param_kind': 'V1ParamKind',
+ 'validations': 'list[V1Validation]',
+ 'variables': 'list[V1Variable]'
+ }
+
+ 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
+ """V1ValidatingAdmissionPolicySpec - 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 V1ValidatingAdmissionPolicySpec. # 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :rtype: list[V1AuditAnnotation]
+ """
+ return self._audit_annotations
+
+ @audit_annotations.setter
+ def audit_annotations(self, audit_annotations):
+ """Sets the audit_annotations of this V1ValidatingAdmissionPolicySpec.
+
+ 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :type: list[V1AuditAnnotation]
+ """
+
+ self._audit_annotations = audit_annotations
+
+ @property
+ def failure_policy(self):
+ """Gets the failure_policy of this V1ValidatingAdmissionPolicySpec. # 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :rtype: str
+ """
+ return self._failure_policy
+
+ @failure_policy.setter
+ def failure_policy(self, failure_policy):
+ """Sets the failure_policy of this V1ValidatingAdmissionPolicySpec.
+
+ 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :type: str
+ """
+
+ self._failure_policy = failure_policy
+
+ @property
+ def match_conditions(self):
+ """Gets the match_conditions of this V1ValidatingAdmissionPolicySpec. # 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :rtype: list[V1MatchCondition]
+ """
+ return self._match_conditions
+
+ @match_conditions.setter
+ def match_conditions(self, match_conditions):
+ """Sets the match_conditions of this V1ValidatingAdmissionPolicySpec.
+
+ 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :type: list[V1MatchCondition]
+ """
+
+ self._match_conditions = match_conditions
+
+ @property
+ def match_constraints(self):
+ """Gets the match_constraints of this V1ValidatingAdmissionPolicySpec. # noqa: E501
+
+
+ :return: The match_constraints of this V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :rtype: V1MatchResources
+ """
+ return self._match_constraints
+
+ @match_constraints.setter
+ def match_constraints(self, match_constraints):
+ """Sets the match_constraints of this V1ValidatingAdmissionPolicySpec.
+
+
+ :param match_constraints: The match_constraints of this V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :type: V1MatchResources
+ """
+
+ self._match_constraints = match_constraints
+
+ @property
+ def param_kind(self):
+ """Gets the param_kind of this V1ValidatingAdmissionPolicySpec. # noqa: E501
+
+
+ :return: The param_kind of this V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :rtype: V1ParamKind
+ """
+ return self._param_kind
+
+ @param_kind.setter
+ def param_kind(self, param_kind):
+ """Sets the param_kind of this V1ValidatingAdmissionPolicySpec.
+
+
+ :param param_kind: The param_kind of this V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :type: V1ParamKind
+ """
+
+ self._param_kind = param_kind
+
+ @property
+ def validations(self):
+ """Gets the validations of this V1ValidatingAdmissionPolicySpec. # 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :rtype: list[V1Validation]
+ """
+ return self._validations
+
+ @validations.setter
+ def validations(self, validations):
+ """Sets the validations of this V1ValidatingAdmissionPolicySpec.
+
+ 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :type: list[V1Validation]
+ """
+
+ self._validations = validations
+
+ @property
+ def variables(self):
+ """Gets the variables of this V1ValidatingAdmissionPolicySpec. # 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :rtype: list[V1Variable]
+ """
+ return self._variables
+
+ @variables.setter
+ def variables(self, variables):
+ """Sets the variables of this V1ValidatingAdmissionPolicySpec.
+
+ 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 V1ValidatingAdmissionPolicySpec. # noqa: E501
+ :type: list[V1Variable]
+ """
+
+ 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, V1ValidatingAdmissionPolicySpec):
+ 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, V1ValidatingAdmissionPolicySpec):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..545aecc2060
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validating_admission_policy_status.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1ValidatingAdmissionPolicyStatus(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': 'V1TypeChecking'
+ }
+
+ 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
+ """V1ValidatingAdmissionPolicyStatus - 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 V1ValidatingAdmissionPolicyStatus. # noqa: E501
+
+ The conditions represent the latest available observations of a policy's current state. # noqa: E501
+
+ :return: The conditions of this V1ValidatingAdmissionPolicyStatus. # noqa: E501
+ :rtype: list[V1Condition]
+ """
+ return self._conditions
+
+ @conditions.setter
+ def conditions(self, conditions):
+ """Sets the conditions of this V1ValidatingAdmissionPolicyStatus.
+
+ The conditions represent the latest available observations of a policy's current state. # noqa: E501
+
+ :param conditions: The conditions of this V1ValidatingAdmissionPolicyStatus. # noqa: E501
+ :type: list[V1Condition]
+ """
+
+ self._conditions = conditions
+
+ @property
+ def observed_generation(self):
+ """Gets the observed_generation of this V1ValidatingAdmissionPolicyStatus. # noqa: E501
+
+ The generation observed by the controller. # noqa: E501
+
+ :return: The observed_generation of this V1ValidatingAdmissionPolicyStatus. # noqa: E501
+ :rtype: int
+ """
+ return self._observed_generation
+
+ @observed_generation.setter
+ def observed_generation(self, observed_generation):
+ """Sets the observed_generation of this V1ValidatingAdmissionPolicyStatus.
+
+ The generation observed by the controller. # noqa: E501
+
+ :param observed_generation: The observed_generation of this V1ValidatingAdmissionPolicyStatus. # noqa: E501
+ :type: int
+ """
+
+ self._observed_generation = observed_generation
+
+ @property
+ def type_checking(self):
+ """Gets the type_checking of this V1ValidatingAdmissionPolicyStatus. # noqa: E501
+
+
+ :return: The type_checking of this V1ValidatingAdmissionPolicyStatus. # noqa: E501
+ :rtype: V1TypeChecking
+ """
+ return self._type_checking
+
+ @type_checking.setter
+ def type_checking(self, type_checking):
+ """Sets the type_checking of this V1ValidatingAdmissionPolicyStatus.
+
+
+ :param type_checking: The type_checking of this V1ValidatingAdmissionPolicyStatus. # noqa: E501
+ :type: V1TypeChecking
+ """
+
+ 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, V1ValidatingAdmissionPolicyStatus):
+ 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, V1ValidatingAdmissionPolicyStatus):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 3f90213b641..57aef34f8cf 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -173,7 +173,7 @@ class V1ValidatingWebhook(object):
def match_conditions(self):
"""Gets the match_conditions of this V1ValidatingWebhook. # noqa: E501
- MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. 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. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. # noqa: E501
+ MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. 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. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped # noqa: E501
:return: The match_conditions of this V1ValidatingWebhook. # noqa: E501
:rtype: list[V1MatchCondition]
@@ -184,7 +184,7 @@ class V1ValidatingWebhook(object):
def match_conditions(self, match_conditions):
"""Sets the match_conditions of this V1ValidatingWebhook.
- MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. 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. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. # noqa: E501
+ MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. 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. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped # noqa: E501
:param match_conditions: The match_conditions of this V1ValidatingWebhook. # noqa: E501
:type: list[V1MatchCondition]
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 de7aca9fd3e..a7e303a466d 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.29
+ The version of the OpenAPI document: release-1.30
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 e87209a75bd..ca606dbb6c1 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..c367d285354
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_validation.py
@@ -0,0 +1,207 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1Validation(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
+ """V1Validation - 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 V1Validation. # 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 V1Validation. # noqa: E501
+ :rtype: str
+ """
+ return self._expression
+
+ @expression.setter
+ def expression(self, expression):
+ """Sets the expression of this V1Validation.
+
+ 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 V1Validation. # 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 V1Validation. # 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 V1Validation. # noqa: E501
+ :rtype: str
+ """
+ return self._message
+
+ @message.setter
+ def message(self, message):
+ """Sets the message of this V1Validation.
+
+ 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 V1Validation. # noqa: E501
+ :type: str
+ """
+
+ self._message = message
+
+ @property
+ def message_expression(self):
+ """Gets the message_expression of this V1Validation. # 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 V1Validation. # noqa: E501
+ :rtype: str
+ """
+ return self._message_expression
+
+ @message_expression.setter
+ def message_expression(self, message_expression):
+ """Sets the message_expression of this V1Validation.
+
+ 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 V1Validation. # noqa: E501
+ :type: str
+ """
+
+ self._message_expression = message_expression
+
+ @property
+ def reason(self):
+ """Gets the reason of this V1Validation. # 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 V1Validation. # noqa: E501
+ :rtype: str
+ """
+ return self._reason
+
+ @reason.setter
+ def reason(self, reason):
+ """Sets the reason of this V1Validation.
+
+ 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 V1Validation. # 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, V1Validation):
+ 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, V1Validation):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 e6159aa513f..ace270f75ab 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..ddae70f1ff7
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_variable.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1Variable(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',
+ 'name': 'str'
+ }
+
+ attribute_map = {
+ 'expression': 'expression',
+ 'name': 'name'
+ }
+
+ def __init__(self, expression=None, name=None, local_vars_configuration=None): # noqa: E501
+ """V1Variable - 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._name = None
+ self.discriminator = None
+
+ self.expression = expression
+ self.name = name
+
+ @property
+ def expression(self):
+ """Gets the expression of this V1Variable. # noqa: E501
+
+ Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. # noqa: E501
+
+ :return: The expression of this V1Variable. # noqa: E501
+ :rtype: str
+ """
+ return self._expression
+
+ @expression.setter
+ def expression(self, expression):
+ """Sets the expression of this V1Variable.
+
+ Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. # noqa: E501
+
+ :param expression: The expression of this V1Variable. # 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 name(self):
+ """Gets the name of this V1Variable. # noqa: E501
+
+ Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo` # noqa: E501
+
+ :return: The name of this V1Variable. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this V1Variable.
+
+ Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo` # noqa: E501
+
+ :param name: The name of this V1Variable. # 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, V1Variable):
+ 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, V1Variable):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1_volume.py b/contrib/python/kubernetes/kubernetes/client/models/v1_volume.py
index 26d344ccb2f..cd30827dde4 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.29
+ The version of the OpenAPI document: release-1.30
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 011f9760f5f..71b13981599 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.29
+ The version of the OpenAPI document: release-1.30
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 9d5a9c913ce..e65058c2693 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.29
+ The version of the OpenAPI document: release-1.30
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 c385580c675..48bc97480dd 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.29
+ The version of the OpenAPI document: release-1.30
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 ab833bdc8f6..81489ff2743 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.29
+ The version of the OpenAPI document: release-1.30
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 79a822a7980..65a461dc33b 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 9b107c9a948..467f01bdc7c 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.29
+ The version of the OpenAPI document: release-1.30
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 79df6603446..a47f84c4f32 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 40544883910..874ee4a9431 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -37,6 +37,7 @@ class V1VolumeMount(object):
'mount_propagation': 'str',
'name': 'str',
'read_only': 'bool',
+ 'recursive_read_only': 'str',
'sub_path': 'str',
'sub_path_expr': 'str'
}
@@ -46,11 +47,12 @@ class V1VolumeMount(object):
'mount_propagation': 'mountPropagation',
'name': 'name',
'read_only': 'readOnly',
+ 'recursive_read_only': 'recursiveReadOnly',
'sub_path': 'subPath',
'sub_path_expr': 'subPathExpr'
}
- def __init__(self, mount_path=None, mount_propagation=None, name=None, read_only=None, sub_path=None, sub_path_expr=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, mount_path=None, mount_propagation=None, name=None, read_only=None, recursive_read_only=None, sub_path=None, sub_path_expr=None, local_vars_configuration=None): # noqa: E501
"""V1VolumeMount - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -60,6 +62,7 @@ class V1VolumeMount(object):
self._mount_propagation = None
self._name = None
self._read_only = None
+ self._recursive_read_only = None
self._sub_path = None
self._sub_path_expr = None
self.discriminator = None
@@ -70,6 +73,8 @@ class V1VolumeMount(object):
self.name = name
if read_only is not None:
self.read_only = read_only
+ if recursive_read_only is not None:
+ self.recursive_read_only = recursive_read_only
if sub_path is not None:
self.sub_path = sub_path
if sub_path_expr is not None:
@@ -104,7 +109,7 @@ class V1VolumeMount(object):
def mount_propagation(self):
"""Gets the mount_propagation of this V1VolumeMount. # noqa: E501
- mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. # noqa: E501
+ mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified (which defaults to None). # noqa: E501
:return: The mount_propagation of this V1VolumeMount. # noqa: E501
:rtype: str
@@ -115,7 +120,7 @@ class V1VolumeMount(object):
def mount_propagation(self, mount_propagation):
"""Sets the mount_propagation of this V1VolumeMount.
- mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. # noqa: E501
+ mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified (which defaults to None). # noqa: E501
:param mount_propagation: The mount_propagation of this V1VolumeMount. # noqa: E501
:type: str
@@ -172,6 +177,29 @@ class V1VolumeMount(object):
self._read_only = read_only
@property
+ def recursive_read_only(self):
+ """Gets the recursive_read_only of this V1VolumeMount. # noqa: E501
+
+ RecursiveReadOnly specifies whether read-only mounts should be handled recursively. If ReadOnly is false, this field has no meaning and must be unspecified. If ReadOnly is true, and this field is set to Disabled, the mount is not made recursively read-only. If this field is set to IfPossible, the mount is made recursively read-only, if it is supported by the container runtime. If this field is set to Enabled, the mount is made recursively read-only if it is supported by the container runtime, otherwise the pod will not be started and an error will be generated to indicate the reason. If this field is set to IfPossible or Enabled, MountPropagation must be set to None (or be unspecified, which defaults to None). If this field is not specified, it is treated as an equivalent of Disabled. # noqa: E501
+
+ :return: The recursive_read_only of this V1VolumeMount. # noqa: E501
+ :rtype: str
+ """
+ return self._recursive_read_only
+
+ @recursive_read_only.setter
+ def recursive_read_only(self, recursive_read_only):
+ """Sets the recursive_read_only of this V1VolumeMount.
+
+ RecursiveReadOnly specifies whether read-only mounts should be handled recursively. If ReadOnly is false, this field has no meaning and must be unspecified. If ReadOnly is true, and this field is set to Disabled, the mount is not made recursively read-only. If this field is set to IfPossible, the mount is made recursively read-only, if it is supported by the container runtime. If this field is set to Enabled, the mount is made recursively read-only if it is supported by the container runtime, otherwise the pod will not be started and an error will be generated to indicate the reason. If this field is set to IfPossible or Enabled, MountPropagation must be set to None (or be unspecified, which defaults to None). If this field is not specified, it is treated as an equivalent of Disabled. # noqa: E501
+
+ :param recursive_read_only: The recursive_read_only of this V1VolumeMount. # noqa: E501
+ :type: str
+ """
+
+ self._recursive_read_only = recursive_read_only
+
+ @property
def sub_path(self):
"""Gets the sub_path of this V1VolumeMount. # noqa: E501
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
new file mode 100644
index 00000000000..46ad115e5db
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1_volume_mount_status.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1VolumeMountStatus(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 = {
+ 'mount_path': 'str',
+ 'name': 'str',
+ 'read_only': 'bool',
+ 'recursive_read_only': 'str'
+ }
+
+ attribute_map = {
+ 'mount_path': 'mountPath',
+ 'name': 'name',
+ 'read_only': 'readOnly',
+ 'recursive_read_only': 'recursiveReadOnly'
+ }
+
+ def __init__(self, mount_path=None, name=None, read_only=None, recursive_read_only=None, local_vars_configuration=None): # noqa: E501
+ """V1VolumeMountStatus - 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._mount_path = None
+ self._name = None
+ self._read_only = None
+ self._recursive_read_only = None
+ self.discriminator = None
+
+ self.mount_path = mount_path
+ self.name = name
+ if read_only is not None:
+ self.read_only = read_only
+ if recursive_read_only is not None:
+ self.recursive_read_only = recursive_read_only
+
+ @property
+ def mount_path(self):
+ """Gets the mount_path of this V1VolumeMountStatus. # noqa: E501
+
+ MountPath corresponds to the original VolumeMount. # noqa: E501
+
+ :return: The mount_path of this V1VolumeMountStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._mount_path
+
+ @mount_path.setter
+ def mount_path(self, mount_path):
+ """Sets the mount_path of this V1VolumeMountStatus.
+
+ MountPath corresponds to the original VolumeMount. # noqa: E501
+
+ :param mount_path: The mount_path of this V1VolumeMountStatus. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and mount_path is None: # noqa: E501
+ raise ValueError("Invalid value for `mount_path`, must not be `None`") # noqa: E501
+
+ self._mount_path = mount_path
+
+ @property
+ def name(self):
+ """Gets the name of this V1VolumeMountStatus. # noqa: E501
+
+ Name corresponds to the name of the original VolumeMount. # noqa: E501
+
+ :return: The name of this V1VolumeMountStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this V1VolumeMountStatus.
+
+ Name corresponds to the name of the original VolumeMount. # noqa: E501
+
+ :param name: The name of this V1VolumeMountStatus. # 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 read_only(self):
+ """Gets the read_only of this V1VolumeMountStatus. # noqa: E501
+
+ ReadOnly corresponds to the original VolumeMount. # noqa: E501
+
+ :return: The read_only of this V1VolumeMountStatus. # noqa: E501
+ :rtype: bool
+ """
+ return self._read_only
+
+ @read_only.setter
+ def read_only(self, read_only):
+ """Sets the read_only of this V1VolumeMountStatus.
+
+ ReadOnly corresponds to the original VolumeMount. # noqa: E501
+
+ :param read_only: The read_only of this V1VolumeMountStatus. # noqa: E501
+ :type: bool
+ """
+
+ self._read_only = read_only
+
+ @property
+ def recursive_read_only(self):
+ """Gets the recursive_read_only of this V1VolumeMountStatus. # noqa: E501
+
+ RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, depending on the mount result. # noqa: E501
+
+ :return: The recursive_read_only of this V1VolumeMountStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._recursive_read_only
+
+ @recursive_read_only.setter
+ def recursive_read_only(self, recursive_read_only):
+ """Sets the recursive_read_only of this V1VolumeMountStatus.
+
+ RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, depending on the mount result. # noqa: E501
+
+ :param recursive_read_only: The recursive_read_only of this V1VolumeMountStatus. # noqa: E501
+ :type: str
+ """
+
+ self._recursive_read_only = recursive_read_only
+
+ 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, V1VolumeMountStatus):
+ 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, V1VolumeMountStatus):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 612918c6915..bf6cf55e6ac 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.29
+ The version of the OpenAPI document: release-1.30
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 35cb5452286..7283c1cf5a6 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.29
+ The version of the OpenAPI document: release-1.30
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 db16e9eaa94..053ad38997c 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 2104320b64f..4e8ca586891 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.29
+ The version of the OpenAPI document: release-1.30
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 bf38f7b5225..2a16eb8e1d5 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.29
+ The version of the OpenAPI document: release-1.30
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 9e8ef6dc0db..df8fce44923 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.29
+ The version of the OpenAPI document: release-1.30
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 1bb563a38ed..4bd15c91a0b 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.29
+ The version of the OpenAPI document: release-1.30
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 d0172458752..ac26f7baac5 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.29
+ The version of the OpenAPI document: release-1.30
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 bc26934e51a..43f1d41ad41 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_audit_annotation.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_audit_annotation.py
index ea9e7d1b1dc..a71e4ce654e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_audit_annotation.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
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 efac3f4b598..4a85bf1c5e2 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.29
+ The version of the OpenAPI document: release-1.30
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 b0ab25d4f8e..b7b3face6c3 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.29
+ The version of the OpenAPI document: release-1.30
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 01f856a0ab6..f4b55137c52 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_expression_warning.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_expression_warning.py
index 3e99e1deb7c..f3846b040ec 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_expression_warning.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..6429c33057a
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_group_version_resource.py
@@ -0,0 +1,178 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha1GroupVersionResource(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 = {
+ 'group': 'str',
+ 'resource': 'str',
+ 'version': 'str'
+ }
+
+ attribute_map = {
+ 'group': 'group',
+ 'resource': 'resource',
+ 'version': 'version'
+ }
+
+ def __init__(self, group=None, resource=None, version=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha1GroupVersionResource - 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._group = None
+ self._resource = None
+ self._version = None
+ self.discriminator = None
+
+ if group is not None:
+ self.group = group
+ if resource is not None:
+ self.resource = resource
+ if version is not None:
+ self.version = version
+
+ @property
+ def group(self):
+ """Gets the group of this V1alpha1GroupVersionResource. # noqa: E501
+
+ The name of the group. # noqa: E501
+
+ :return: The group of this V1alpha1GroupVersionResource. # noqa: E501
+ :rtype: str
+ """
+ return self._group
+
+ @group.setter
+ def group(self, group):
+ """Sets the group of this V1alpha1GroupVersionResource.
+
+ The name of the group. # noqa: E501
+
+ :param group: The group of this V1alpha1GroupVersionResource. # noqa: E501
+ :type: str
+ """
+
+ self._group = group
+
+ @property
+ def resource(self):
+ """Gets the resource of this V1alpha1GroupVersionResource. # noqa: E501
+
+ The name of the resource. # noqa: E501
+
+ :return: The resource of this V1alpha1GroupVersionResource. # noqa: E501
+ :rtype: str
+ """
+ return self._resource
+
+ @resource.setter
+ def resource(self, resource):
+ """Sets the resource of this V1alpha1GroupVersionResource.
+
+ The name of the resource. # noqa: E501
+
+ :param resource: The resource of this V1alpha1GroupVersionResource. # noqa: E501
+ :type: str
+ """
+
+ self._resource = resource
+
+ @property
+ def version(self):
+ """Gets the version of this V1alpha1GroupVersionResource. # noqa: E501
+
+ The name of the version. # noqa: E501
+
+ :return: The version of this V1alpha1GroupVersionResource. # noqa: E501
+ :rtype: str
+ """
+ return self._version
+
+ @version.setter
+ def version(self, version):
+ """Sets the version of this V1alpha1GroupVersionResource.
+
+ The name of the version. # noqa: E501
+
+ :param version: The version of this V1alpha1GroupVersionResource. # noqa: E501
+ :type: str
+ """
+
+ self._version = version
+
+ 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, V1alpha1GroupVersionResource):
+ 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, V1alpha1GroupVersionResource):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address.py
index 8314d1a0ecd..f7aca23efab 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address_list.py
index 21bcfc24177..aa5c5d44754 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address_spec.py
index d8ad6b46965..920e24e29e8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_ip_address_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -49,8 +49,7 @@ class V1alpha1IPAddressSpec(object):
self._parent_ref = None
self.discriminator = None
- if parent_ref is not None:
- self.parent_ref = parent_ref
+ self.parent_ref = parent_ref
@property
def parent_ref(self):
@@ -70,6 +69,8 @@ class V1alpha1IPAddressSpec(object):
:param parent_ref: The parent_ref of this V1alpha1IPAddressSpec. # noqa: E501
:type: V1alpha1ParentReference
"""
+ if self.local_vars_configuration.client_side_validation and parent_ref is None: # noqa: E501
+ raise ValueError("Invalid value for `parent_ref`, must not be `None`") # noqa: E501
self._parent_ref = parent_ref
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 07197a17c00..6a8a9a48a8d 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.29
+ The version of the OpenAPI document: release-1.30
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 55f00c7342b..fd8d9161907 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..2070113d73c
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_migration_condition.py
@@ -0,0 +1,236 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha1MigrationCondition(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 = {
+ 'last_update_time': 'datetime',
+ 'message': 'str',
+ 'reason': 'str',
+ 'status': 'str',
+ 'type': 'str'
+ }
+
+ attribute_map = {
+ 'last_update_time': 'lastUpdateTime',
+ 'message': 'message',
+ 'reason': 'reason',
+ 'status': 'status',
+ 'type': 'type'
+ }
+
+ def __init__(self, last_update_time=None, message=None, reason=None, status=None, type=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha1MigrationCondition - 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._last_update_time = None
+ self._message = None
+ self._reason = None
+ self._status = None
+ self._type = None
+ self.discriminator = None
+
+ if last_update_time is not None:
+ self.last_update_time = last_update_time
+ if message is not None:
+ self.message = message
+ if reason is not None:
+ self.reason = reason
+ self.status = status
+ self.type = type
+
+ @property
+ def last_update_time(self):
+ """Gets the last_update_time of this V1alpha1MigrationCondition. # noqa: E501
+
+ The last time this condition was updated. # noqa: E501
+
+ :return: The last_update_time of this V1alpha1MigrationCondition. # noqa: E501
+ :rtype: datetime
+ """
+ return self._last_update_time
+
+ @last_update_time.setter
+ def last_update_time(self, last_update_time):
+ """Sets the last_update_time of this V1alpha1MigrationCondition.
+
+ The last time this condition was updated. # noqa: E501
+
+ :param last_update_time: The last_update_time of this V1alpha1MigrationCondition. # noqa: E501
+ :type: datetime
+ """
+
+ self._last_update_time = last_update_time
+
+ @property
+ def message(self):
+ """Gets the message of this V1alpha1MigrationCondition. # noqa: E501
+
+ A human readable message indicating details about the transition. # noqa: E501
+
+ :return: The message of this V1alpha1MigrationCondition. # noqa: E501
+ :rtype: str
+ """
+ return self._message
+
+ @message.setter
+ def message(self, message):
+ """Sets the message of this V1alpha1MigrationCondition.
+
+ A human readable message indicating details about the transition. # noqa: E501
+
+ :param message: The message of this V1alpha1MigrationCondition. # noqa: E501
+ :type: str
+ """
+
+ self._message = message
+
+ @property
+ def reason(self):
+ """Gets the reason of this V1alpha1MigrationCondition. # noqa: E501
+
+ The reason for the condition's last transition. # noqa: E501
+
+ :return: The reason of this V1alpha1MigrationCondition. # noqa: E501
+ :rtype: str
+ """
+ return self._reason
+
+ @reason.setter
+ def reason(self, reason):
+ """Sets the reason of this V1alpha1MigrationCondition.
+
+ The reason for the condition's last transition. # noqa: E501
+
+ :param reason: The reason of this V1alpha1MigrationCondition. # noqa: E501
+ :type: str
+ """
+
+ self._reason = reason
+
+ @property
+ def status(self):
+ """Gets the status of this V1alpha1MigrationCondition. # noqa: E501
+
+ Status of the condition, one of True, False, Unknown. # noqa: E501
+
+ :return: The status of this V1alpha1MigrationCondition. # noqa: E501
+ :rtype: str
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this V1alpha1MigrationCondition.
+
+ Status of the condition, one of True, False, Unknown. # noqa: E501
+
+ :param status: The status of this V1alpha1MigrationCondition. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501
+ raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
+
+ self._status = status
+
+ @property
+ def type(self):
+ """Gets the type of this V1alpha1MigrationCondition. # noqa: E501
+
+ Type of the condition. # noqa: E501
+
+ :return: The type of this V1alpha1MigrationCondition. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this V1alpha1MigrationCondition.
+
+ Type of the condition. # noqa: E501
+
+ :param type: The type of this V1alpha1MigrationCondition. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
+ raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
+
+ self._type = 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, V1alpha1MigrationCondition):
+ 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, V1alpha1MigrationCondition):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 5de7ab42805..2e4fe7773f5 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.29
+ The version of the OpenAPI document: release-1.30
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 56abb9db007..b4e6247b780 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.29
+ The version of the OpenAPI document: release-1.30
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 1e3291b770b..a69e2d0a6e1 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_parent_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_parent_reference.py
index 41c8948465a..4ccb9d5e7f7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_parent_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -60,12 +60,10 @@ class V1alpha1ParentReference(object):
if group is not None:
self.group = group
- if name is not None:
- self.name = name
+ self.name = name
if namespace is not None:
self.namespace = namespace
- if resource is not None:
- self.resource = resource
+ self.resource = resource
@property
def group(self):
@@ -110,6 +108,8 @@ class V1alpha1ParentReference(object):
:param name: The name of this V1alpha1ParentReference. # 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
@@ -156,6 +156,8 @@ class V1alpha1ParentReference(object):
:param resource: The resource of this V1alpha1ParentReference. # noqa: E501
:type: str
"""
+ if self.local_vars_configuration.client_side_validation and resource is None: # noqa: E501
+ raise ValueError("Invalid value for `resource`, must not be `None`") # noqa: E501
self._resource = resource
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_self_subject_review.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_self_subject_review.py
index 30af777dd96..f6998707bda 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_self_subject_review.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_self_subject_review_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_self_subject_review_status.py
index d606a921fb3..25c16c292ec 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_self_subject_review_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 75d0181b414..1122de387d9 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr.py
index 90d66ea4df5..632090a41a4 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_list.py
index 9f4b0bfbd79..c52129a6783 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_spec.py
index ca559c6a7b6..0c7f4c702e6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_status.py
index d42e49d83d9..bd31f5a6ba0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_service_cidr_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
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 ae1053216a7..a6f181a654a 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.29
+ The version of the OpenAPI document: release-1.30
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 b19eec752af..968158b79db 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -66,8 +66,7 @@ class V1alpha1StorageVersionCondition(object):
if last_transition_time is not None:
self.last_transition_time = last_transition_time
- if message is not None:
- self.message = message
+ self.message = message
if observed_generation is not None:
self.observed_generation = observed_generation
self.reason = reason
@@ -117,6 +116,8 @@ class V1alpha1StorageVersionCondition(object):
:param message: The message of this V1alpha1StorageVersionCondition. # noqa: E501
:type: str
"""
+ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501
+ raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501
self._message = message
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 eaf39bc0213..474e627feef 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.29
+ The version of the OpenAPI document: release-1.30
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
new file mode 100644
index 00000000000..82c461d2b4e
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration.py
@@ -0,0 +1,228 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha1StorageVersionMigration(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': 'V1alpha1StorageVersionMigrationSpec',
+ 'status': 'V1alpha1StorageVersionMigrationStatus'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'kind': 'kind',
+ 'metadata': 'metadata',
+ 'spec': 'spec',
+ 'status': 'status'
+ }
+
+ def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha1StorageVersionMigration - 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._status = 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
+ if status is not None:
+ self.status = status
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1alpha1StorageVersionMigration. # 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 V1alpha1StorageVersionMigration. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1alpha1StorageVersionMigration.
+
+ 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 V1alpha1StorageVersionMigration. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1alpha1StorageVersionMigration. # 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 V1alpha1StorageVersionMigration. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1alpha1StorageVersionMigration.
+
+ 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 V1alpha1StorageVersionMigration. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1alpha1StorageVersionMigration. # noqa: E501
+
+
+ :return: The metadata of this V1alpha1StorageVersionMigration. # noqa: E501
+ :rtype: V1ObjectMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1alpha1StorageVersionMigration.
+
+
+ :param metadata: The metadata of this V1alpha1StorageVersionMigration. # noqa: E501
+ :type: V1ObjectMeta
+ """
+
+ self._metadata = metadata
+
+ @property
+ def spec(self):
+ """Gets the spec of this V1alpha1StorageVersionMigration. # noqa: E501
+
+
+ :return: The spec of this V1alpha1StorageVersionMigration. # noqa: E501
+ :rtype: V1alpha1StorageVersionMigrationSpec
+ """
+ return self._spec
+
+ @spec.setter
+ def spec(self, spec):
+ """Sets the spec of this V1alpha1StorageVersionMigration.
+
+
+ :param spec: The spec of this V1alpha1StorageVersionMigration. # noqa: E501
+ :type: V1alpha1StorageVersionMigrationSpec
+ """
+
+ self._spec = spec
+
+ @property
+ def status(self):
+ """Gets the status of this V1alpha1StorageVersionMigration. # noqa: E501
+
+
+ :return: The status of this V1alpha1StorageVersionMigration. # noqa: E501
+ :rtype: V1alpha1StorageVersionMigrationStatus
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this V1alpha1StorageVersionMigration.
+
+
+ :param status: The status of this V1alpha1StorageVersionMigration. # noqa: E501
+ :type: V1alpha1StorageVersionMigrationStatus
+ """
+
+ self._status = status
+
+ 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, V1alpha1StorageVersionMigration):
+ 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, V1alpha1StorageVersionMigration):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..b936bbae427
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha1StorageVersionMigrationList(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[V1alpha1StorageVersionMigration]',
+ '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
+ """V1alpha1StorageVersionMigrationList - 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 V1alpha1StorageVersionMigrationList. # 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 V1alpha1StorageVersionMigrationList. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1alpha1StorageVersionMigrationList.
+
+ 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 V1alpha1StorageVersionMigrationList. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def items(self):
+ """Gets the items of this V1alpha1StorageVersionMigrationList. # noqa: E501
+
+ Items is the list of StorageVersionMigration # noqa: E501
+
+ :return: The items of this V1alpha1StorageVersionMigrationList. # noqa: E501
+ :rtype: list[V1alpha1StorageVersionMigration]
+ """
+ return self._items
+
+ @items.setter
+ def items(self, items):
+ """Sets the items of this V1alpha1StorageVersionMigrationList.
+
+ Items is the list of StorageVersionMigration # noqa: E501
+
+ :param items: The items of this V1alpha1StorageVersionMigrationList. # noqa: E501
+ :type: list[V1alpha1StorageVersionMigration]
+ """
+ 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 V1alpha1StorageVersionMigrationList. # 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 V1alpha1StorageVersionMigrationList. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1alpha1StorageVersionMigrationList.
+
+ 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 V1alpha1StorageVersionMigrationList. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1alpha1StorageVersionMigrationList. # noqa: E501
+
+
+ :return: The metadata of this V1alpha1StorageVersionMigrationList. # noqa: E501
+ :rtype: V1ListMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1alpha1StorageVersionMigrationList.
+
+
+ :param metadata: The metadata of this V1alpha1StorageVersionMigrationList. # 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, V1alpha1StorageVersionMigrationList):
+ 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, V1alpha1StorageVersionMigrationList):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..9bb0668136f
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_spec.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha1StorageVersionMigrationSpec(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 = {
+ 'continue_token': 'str',
+ 'resource': 'V1alpha1GroupVersionResource'
+ }
+
+ attribute_map = {
+ 'continue_token': 'continueToken',
+ 'resource': 'resource'
+ }
+
+ def __init__(self, continue_token=None, resource=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha1StorageVersionMigrationSpec - 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._continue_token = None
+ self._resource = None
+ self.discriminator = None
+
+ if continue_token is not None:
+ self.continue_token = continue_token
+ self.resource = resource
+
+ @property
+ def continue_token(self):
+ """Gets the continue_token of this V1alpha1StorageVersionMigrationSpec. # noqa: E501
+
+ The token used in the list options to get the next chunk of objects to migrate. When the .status.conditions indicates the migration is \"Running\", users can use this token to check the progress of the migration. # noqa: E501
+
+ :return: The continue_token of this V1alpha1StorageVersionMigrationSpec. # noqa: E501
+ :rtype: str
+ """
+ return self._continue_token
+
+ @continue_token.setter
+ def continue_token(self, continue_token):
+ """Sets the continue_token of this V1alpha1StorageVersionMigrationSpec.
+
+ The token used in the list options to get the next chunk of objects to migrate. When the .status.conditions indicates the migration is \"Running\", users can use this token to check the progress of the migration. # noqa: E501
+
+ :param continue_token: The continue_token of this V1alpha1StorageVersionMigrationSpec. # noqa: E501
+ :type: str
+ """
+
+ self._continue_token = continue_token
+
+ @property
+ def resource(self):
+ """Gets the resource of this V1alpha1StorageVersionMigrationSpec. # noqa: E501
+
+
+ :return: The resource of this V1alpha1StorageVersionMigrationSpec. # noqa: E501
+ :rtype: V1alpha1GroupVersionResource
+ """
+ return self._resource
+
+ @resource.setter
+ def resource(self, resource):
+ """Sets the resource of this V1alpha1StorageVersionMigrationSpec.
+
+
+ :param resource: The resource of this V1alpha1StorageVersionMigrationSpec. # noqa: E501
+ :type: V1alpha1GroupVersionResource
+ """
+ if self.local_vars_configuration.client_side_validation and resource is None: # noqa: E501
+ raise ValueError("Invalid value for `resource`, must not be `None`") # noqa: E501
+
+ self._resource = resource
+
+ 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, V1alpha1StorageVersionMigrationSpec):
+ 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, V1alpha1StorageVersionMigrationSpec):
+ return True
+
+ return self.to_dict() != other.to_dict()
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
new file mode 100644
index 00000000000..310513094b4
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_storage_version_migration_status.py
@@ -0,0 +1,150 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha1StorageVersionMigrationStatus(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[V1alpha1MigrationCondition]',
+ 'resource_version': 'str'
+ }
+
+ attribute_map = {
+ 'conditions': 'conditions',
+ 'resource_version': 'resourceVersion'
+ }
+
+ def __init__(self, conditions=None, resource_version=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha1StorageVersionMigrationStatus - 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._resource_version = None
+ self.discriminator = None
+
+ if conditions is not None:
+ self.conditions = conditions
+ if resource_version is not None:
+ self.resource_version = resource_version
+
+ @property
+ def conditions(self):
+ """Gets the conditions of this V1alpha1StorageVersionMigrationStatus. # noqa: E501
+
+ The latest available observations of the migration's current state. # noqa: E501
+
+ :return: The conditions of this V1alpha1StorageVersionMigrationStatus. # noqa: E501
+ :rtype: list[V1alpha1MigrationCondition]
+ """
+ return self._conditions
+
+ @conditions.setter
+ def conditions(self, conditions):
+ """Sets the conditions of this V1alpha1StorageVersionMigrationStatus.
+
+ The latest available observations of the migration's current state. # noqa: E501
+
+ :param conditions: The conditions of this V1alpha1StorageVersionMigrationStatus. # noqa: E501
+ :type: list[V1alpha1MigrationCondition]
+ """
+
+ self._conditions = conditions
+
+ @property
+ def resource_version(self):
+ """Gets the resource_version of this V1alpha1StorageVersionMigrationStatus. # noqa: E501
+
+ ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource. # noqa: E501
+
+ :return: The resource_version of this V1alpha1StorageVersionMigrationStatus. # noqa: E501
+ :rtype: str
+ """
+ return self._resource_version
+
+ @resource_version.setter
+ def resource_version(self, resource_version):
+ """Sets the resource_version of this V1alpha1StorageVersionMigrationStatus.
+
+ ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource. # noqa: E501
+
+ :param resource_version: The resource_version of this V1alpha1StorageVersionMigrationStatus. # noqa: E501
+ :type: str
+ """
+
+ self._resource_version = resource_version
+
+ 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, V1alpha1StorageVersionMigrationStatus):
+ 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, V1alpha1StorageVersionMigrationStatus):
+ return True
+
+ return self.to_dict() != other.to_dict()
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 2ab300aadec..1508cc5cab6 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_type_checking.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_type_checking.py
index cc5568b5a10..7668819b30a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_type_checking.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy.py
index 92cbf2e105e..a53a7685141 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding.py
index 39ee81e9c66..d97e1b0154f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding_list.py
index 7dfe70af818..cc3f1b2dfe8 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding_spec.py
index 36f465f1b13..15b777e1b7e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_binding_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_list.py
index caad2430706..a7901a0c42b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_spec.py
index 8587f68a217..182c8538878 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_status.py
index 66f3054cc19..1705c252d1a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validating_admission_policy_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validation.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validation.py
index 8501d26af28..493fcfa8f83 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_validation.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha1_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.29
+ The version of the OpenAPI document: release-1.30
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 d22d9471607..2bd5b7a56b7 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.29
+ The version of the OpenAPI document: release-1.30
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 d3ebdc44e92..8cf54e0d4f3 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.29
+ The version of the OpenAPI document: release-1.30
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 48a022a6855..3088933efc1 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_allocation_result.py
index 405d8eb240f..4be9a639f87 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_allocation_result.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_driver_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_driver_allocation_result.py
new file mode 100644
index 00000000000..9db8c8b4ba3
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_driver_allocation_result.py
@@ -0,0 +1,148 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2DriverAllocationResult(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 = {
+ 'named_resources': 'V1alpha2NamedResourcesAllocationResult',
+ 'vendor_request_parameters': 'object'
+ }
+
+ attribute_map = {
+ 'named_resources': 'namedResources',
+ 'vendor_request_parameters': 'vendorRequestParameters'
+ }
+
+ def __init__(self, named_resources=None, vendor_request_parameters=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2DriverAllocationResult - 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._named_resources = None
+ self._vendor_request_parameters = None
+ self.discriminator = None
+
+ if named_resources is not None:
+ self.named_resources = named_resources
+ if vendor_request_parameters is not None:
+ self.vendor_request_parameters = vendor_request_parameters
+
+ @property
+ def named_resources(self):
+ """Gets the named_resources of this V1alpha2DriverAllocationResult. # noqa: E501
+
+
+ :return: The named_resources of this V1alpha2DriverAllocationResult. # noqa: E501
+ :rtype: V1alpha2NamedResourcesAllocationResult
+ """
+ return self._named_resources
+
+ @named_resources.setter
+ def named_resources(self, named_resources):
+ """Sets the named_resources of this V1alpha2DriverAllocationResult.
+
+
+ :param named_resources: The named_resources of this V1alpha2DriverAllocationResult. # noqa: E501
+ :type: V1alpha2NamedResourcesAllocationResult
+ """
+
+ self._named_resources = named_resources
+
+ @property
+ def vendor_request_parameters(self):
+ """Gets the vendor_request_parameters of this V1alpha2DriverAllocationResult. # noqa: E501
+
+ VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated. # noqa: E501
+
+ :return: The vendor_request_parameters of this V1alpha2DriverAllocationResult. # noqa: E501
+ :rtype: object
+ """
+ return self._vendor_request_parameters
+
+ @vendor_request_parameters.setter
+ def vendor_request_parameters(self, vendor_request_parameters):
+ """Sets the vendor_request_parameters of this V1alpha2DriverAllocationResult.
+
+ VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated. # noqa: E501
+
+ :param vendor_request_parameters: The vendor_request_parameters of this V1alpha2DriverAllocationResult. # noqa: E501
+ :type: object
+ """
+
+ self._vendor_request_parameters = vendor_request_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, V1alpha2DriverAllocationResult):
+ 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, V1alpha2DriverAllocationResult):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_driver_requests.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_driver_requests.py
new file mode 100644
index 00000000000..f6ee724b4b0
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_driver_requests.py
@@ -0,0 +1,178 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2DriverRequests(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 = {
+ 'driver_name': 'str',
+ 'requests': 'list[V1alpha2ResourceRequest]',
+ 'vendor_parameters': 'object'
+ }
+
+ attribute_map = {
+ 'driver_name': 'driverName',
+ 'requests': 'requests',
+ 'vendor_parameters': 'vendorParameters'
+ }
+
+ def __init__(self, driver_name=None, requests=None, vendor_parameters=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2DriverRequests - 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._driver_name = None
+ self._requests = None
+ self._vendor_parameters = None
+ self.discriminator = None
+
+ if driver_name is not None:
+ self.driver_name = driver_name
+ if requests is not None:
+ self.requests = requests
+ if vendor_parameters is not None:
+ self.vendor_parameters = vendor_parameters
+
+ @property
+ def driver_name(self):
+ """Gets the driver_name of this V1alpha2DriverRequests. # noqa: E501
+
+ DriverName is the name used by the DRA driver kubelet plugin. # noqa: E501
+
+ :return: The driver_name of this V1alpha2DriverRequests. # noqa: E501
+ :rtype: str
+ """
+ return self._driver_name
+
+ @driver_name.setter
+ def driver_name(self, driver_name):
+ """Sets the driver_name of this V1alpha2DriverRequests.
+
+ DriverName is the name used by the DRA driver kubelet plugin. # noqa: E501
+
+ :param driver_name: The driver_name of this V1alpha2DriverRequests. # noqa: E501
+ :type: str
+ """
+
+ self._driver_name = driver_name
+
+ @property
+ def requests(self):
+ """Gets the requests of this V1alpha2DriverRequests. # noqa: E501
+
+ Requests describes all resources that are needed from the driver. # noqa: E501
+
+ :return: The requests of this V1alpha2DriverRequests. # noqa: E501
+ :rtype: list[V1alpha2ResourceRequest]
+ """
+ return self._requests
+
+ @requests.setter
+ def requests(self, requests):
+ """Sets the requests of this V1alpha2DriverRequests.
+
+ Requests describes all resources that are needed from the driver. # noqa: E501
+
+ :param requests: The requests of this V1alpha2DriverRequests. # noqa: E501
+ :type: list[V1alpha2ResourceRequest]
+ """
+
+ self._requests = requests
+
+ @property
+ def vendor_parameters(self):
+ """Gets the vendor_parameters of this V1alpha2DriverRequests. # noqa: E501
+
+ VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim. # noqa: E501
+
+ :return: The vendor_parameters of this V1alpha2DriverRequests. # noqa: E501
+ :rtype: object
+ """
+ return self._vendor_parameters
+
+ @vendor_parameters.setter
+ def vendor_parameters(self, vendor_parameters):
+ """Sets the vendor_parameters of this V1alpha2DriverRequests.
+
+ VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim. # noqa: E501
+
+ :param vendor_parameters: The vendor_parameters of this V1alpha2DriverRequests. # noqa: E501
+ :type: object
+ """
+
+ self._vendor_parameters = vendor_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, V1alpha2DriverRequests):
+ 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, V1alpha2DriverRequests):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_allocation_result.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_allocation_result.py
new file mode 100644
index 00000000000..ec5b2d8904b
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_allocation_result.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2NamedResourcesAllocationResult(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 = {
+ 'name': 'str'
+ }
+
+ attribute_map = {
+ 'name': 'name'
+ }
+
+ def __init__(self, name=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2NamedResourcesAllocationResult - 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._name = None
+ self.discriminator = None
+
+ self.name = name
+
+ @property
+ def name(self):
+ """Gets the name of this V1alpha2NamedResourcesAllocationResult. # noqa: E501
+
+ Name is the name of the selected resource instance. # noqa: E501
+
+ :return: The name of this V1alpha2NamedResourcesAllocationResult. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this V1alpha2NamedResourcesAllocationResult.
+
+ Name is the name of the selected resource instance. # noqa: E501
+
+ :param name: The name of this V1alpha2NamedResourcesAllocationResult. # 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, V1alpha2NamedResourcesAllocationResult):
+ 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, V1alpha2NamedResourcesAllocationResult):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_attribute.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_attribute.py
new file mode 100644
index 00000000000..b13b16f151b
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_attribute.py
@@ -0,0 +1,315 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2NamedResourcesAttribute(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 = {
+ 'bool': 'bool',
+ 'int': 'int',
+ 'int_slice': 'V1alpha2NamedResourcesIntSlice',
+ 'name': 'str',
+ 'quantity': 'str',
+ 'string': 'str',
+ 'string_slice': 'V1alpha2NamedResourcesStringSlice',
+ 'version': 'str'
+ }
+
+ attribute_map = {
+ 'bool': 'bool',
+ 'int': 'int',
+ 'int_slice': 'intSlice',
+ 'name': 'name',
+ 'quantity': 'quantity',
+ 'string': 'string',
+ 'string_slice': 'stringSlice',
+ 'version': 'version'
+ }
+
+ def __init__(self, bool=None, int=None, int_slice=None, name=None, quantity=None, string=None, string_slice=None, version=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2NamedResourcesAttribute - 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._bool = None
+ self._int = None
+ self._int_slice = None
+ self._name = None
+ self._quantity = None
+ self._string = None
+ self._string_slice = None
+ self._version = None
+ self.discriminator = None
+
+ if bool is not None:
+ self.bool = bool
+ if int is not None:
+ self.int = int
+ if int_slice is not None:
+ self.int_slice = int_slice
+ self.name = name
+ if quantity is not None:
+ self.quantity = quantity
+ if string is not None:
+ self.string = string
+ if string_slice is not None:
+ self.string_slice = string_slice
+ if version is not None:
+ self.version = version
+
+ @property
+ def bool(self):
+ """Gets the bool of this V1alpha2NamedResourcesAttribute. # noqa: E501
+
+ BoolValue is a true/false value. # noqa: E501
+
+ :return: The bool of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :rtype: bool
+ """
+ return self._bool
+
+ @bool.setter
+ def bool(self, bool):
+ """Sets the bool of this V1alpha2NamedResourcesAttribute.
+
+ BoolValue is a true/false value. # noqa: E501
+
+ :param bool: The bool of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :type: bool
+ """
+
+ self._bool = bool
+
+ @property
+ def int(self):
+ """Gets the int of this V1alpha2NamedResourcesAttribute. # noqa: E501
+
+ IntValue is a 64-bit integer. # noqa: E501
+
+ :return: The int of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :rtype: int
+ """
+ return self._int
+
+ @int.setter
+ def int(self, int):
+ """Sets the int of this V1alpha2NamedResourcesAttribute.
+
+ IntValue is a 64-bit integer. # noqa: E501
+
+ :param int: The int of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :type: int
+ """
+
+ self._int = int
+
+ @property
+ def int_slice(self):
+ """Gets the int_slice of this V1alpha2NamedResourcesAttribute. # noqa: E501
+
+
+ :return: The int_slice of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :rtype: V1alpha2NamedResourcesIntSlice
+ """
+ return self._int_slice
+
+ @int_slice.setter
+ def int_slice(self, int_slice):
+ """Sets the int_slice of this V1alpha2NamedResourcesAttribute.
+
+
+ :param int_slice: The int_slice of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :type: V1alpha2NamedResourcesIntSlice
+ """
+
+ self._int_slice = int_slice
+
+ @property
+ def name(self):
+ """Gets the name of this V1alpha2NamedResourcesAttribute. # noqa: E501
+
+ Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain. # noqa: E501
+
+ :return: The name of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this V1alpha2NamedResourcesAttribute.
+
+ Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain. # noqa: E501
+
+ :param name: The name of this V1alpha2NamedResourcesAttribute. # 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 quantity(self):
+ """Gets the quantity of this V1alpha2NamedResourcesAttribute. # noqa: E501
+
+ QuantityValue is a quantity. # noqa: E501
+
+ :return: The quantity of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :rtype: str
+ """
+ return self._quantity
+
+ @quantity.setter
+ def quantity(self, quantity):
+ """Sets the quantity of this V1alpha2NamedResourcesAttribute.
+
+ QuantityValue is a quantity. # noqa: E501
+
+ :param quantity: The quantity of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :type: str
+ """
+
+ self._quantity = quantity
+
+ @property
+ def string(self):
+ """Gets the string of this V1alpha2NamedResourcesAttribute. # noqa: E501
+
+ StringValue is a string. # noqa: E501
+
+ :return: The string of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :rtype: str
+ """
+ return self._string
+
+ @string.setter
+ def string(self, string):
+ """Sets the string of this V1alpha2NamedResourcesAttribute.
+
+ StringValue is a string. # noqa: E501
+
+ :param string: The string of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :type: str
+ """
+
+ self._string = string
+
+ @property
+ def string_slice(self):
+ """Gets the string_slice of this V1alpha2NamedResourcesAttribute. # noqa: E501
+
+
+ :return: The string_slice of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :rtype: V1alpha2NamedResourcesStringSlice
+ """
+ return self._string_slice
+
+ @string_slice.setter
+ def string_slice(self, string_slice):
+ """Sets the string_slice of this V1alpha2NamedResourcesAttribute.
+
+
+ :param string_slice: The string_slice of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :type: V1alpha2NamedResourcesStringSlice
+ """
+
+ self._string_slice = string_slice
+
+ @property
+ def version(self):
+ """Gets the version of this V1alpha2NamedResourcesAttribute. # noqa: E501
+
+ VersionValue is a semantic version according to semver.org spec 2.0.0. # noqa: E501
+
+ :return: The version of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :rtype: str
+ """
+ return self._version
+
+ @version.setter
+ def version(self, version):
+ """Sets the version of this V1alpha2NamedResourcesAttribute.
+
+ VersionValue is a semantic version according to semver.org spec 2.0.0. # noqa: E501
+
+ :param version: The version of this V1alpha2NamedResourcesAttribute. # noqa: E501
+ :type: str
+ """
+
+ self._version = version
+
+ 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, V1alpha2NamedResourcesAttribute):
+ 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, V1alpha2NamedResourcesAttribute):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_filter.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_filter.py
new file mode 100644
index 00000000000..8645d15efae
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_filter.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2NamedResourcesFilter(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 = {
+ 'selector': 'str'
+ }
+
+ attribute_map = {
+ 'selector': 'selector'
+ }
+
+ def __init__(self, selector=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2NamedResourcesFilter - 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._selector = None
+ self.discriminator = None
+
+ self.selector = selector
+
+ @property
+ def selector(self):
+ """Gets the selector of this V1alpha2NamedResourcesFilter. # noqa: E501
+
+ Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/ In addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example: attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) && attributes.stringslice[\"b\"].isSorted() # noqa: E501
+
+ :return: The selector of this V1alpha2NamedResourcesFilter. # noqa: E501
+ :rtype: str
+ """
+ return self._selector
+
+ @selector.setter
+ def selector(self, selector):
+ """Sets the selector of this V1alpha2NamedResourcesFilter.
+
+ Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/ In addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example: attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) && attributes.stringslice[\"b\"].isSorted() # noqa: E501
+
+ :param selector: The selector of this V1alpha2NamedResourcesFilter. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and selector is None: # noqa: E501
+ raise ValueError("Invalid value for `selector`, must not be `None`") # noqa: E501
+
+ self._selector = selector
+
+ 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, V1alpha2NamedResourcesFilter):
+ 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, V1alpha2NamedResourcesFilter):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_instance.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_instance.py
new file mode 100644
index 00000000000..0bdde4d1646
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_instance.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2NamedResourcesInstance(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 = {
+ 'attributes': 'list[V1alpha2NamedResourcesAttribute]',
+ 'name': 'str'
+ }
+
+ attribute_map = {
+ 'attributes': 'attributes',
+ 'name': 'name'
+ }
+
+ def __init__(self, attributes=None, name=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2NamedResourcesInstance - 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._attributes = None
+ self._name = None
+ self.discriminator = None
+
+ if attributes is not None:
+ self.attributes = attributes
+ self.name = name
+
+ @property
+ def attributes(self):
+ """Gets the attributes of this V1alpha2NamedResourcesInstance. # noqa: E501
+
+ Attributes defines the attributes of this resource instance. The name of each attribute must be unique. # noqa: E501
+
+ :return: The attributes of this V1alpha2NamedResourcesInstance. # noqa: E501
+ :rtype: list[V1alpha2NamedResourcesAttribute]
+ """
+ return self._attributes
+
+ @attributes.setter
+ def attributes(self, attributes):
+ """Sets the attributes of this V1alpha2NamedResourcesInstance.
+
+ Attributes defines the attributes of this resource instance. The name of each attribute must be unique. # noqa: E501
+
+ :param attributes: The attributes of this V1alpha2NamedResourcesInstance. # noqa: E501
+ :type: list[V1alpha2NamedResourcesAttribute]
+ """
+
+ self._attributes = attributes
+
+ @property
+ def name(self):
+ """Gets the name of this V1alpha2NamedResourcesInstance. # noqa: E501
+
+ Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain. # noqa: E501
+
+ :return: The name of this V1alpha2NamedResourcesInstance. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this V1alpha2NamedResourcesInstance.
+
+ Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain. # noqa: E501
+
+ :param name: The name of this V1alpha2NamedResourcesInstance. # 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, V1alpha2NamedResourcesInstance):
+ 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, V1alpha2NamedResourcesInstance):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_int_slice.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_int_slice.py
new file mode 100644
index 00000000000..57ccfe96801
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_int_slice.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2NamedResourcesIntSlice(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 = {
+ 'ints': 'list[int]'
+ }
+
+ attribute_map = {
+ 'ints': 'ints'
+ }
+
+ def __init__(self, ints=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2NamedResourcesIntSlice - 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._ints = None
+ self.discriminator = None
+
+ self.ints = ints
+
+ @property
+ def ints(self):
+ """Gets the ints of this V1alpha2NamedResourcesIntSlice. # noqa: E501
+
+ Ints is the slice of 64-bit integers. # noqa: E501
+
+ :return: The ints of this V1alpha2NamedResourcesIntSlice. # noqa: E501
+ :rtype: list[int]
+ """
+ return self._ints
+
+ @ints.setter
+ def ints(self, ints):
+ """Sets the ints of this V1alpha2NamedResourcesIntSlice.
+
+ Ints is the slice of 64-bit integers. # noqa: E501
+
+ :param ints: The ints of this V1alpha2NamedResourcesIntSlice. # noqa: E501
+ :type: list[int]
+ """
+ if self.local_vars_configuration.client_side_validation and ints is None: # noqa: E501
+ raise ValueError("Invalid value for `ints`, must not be `None`") # noqa: E501
+
+ self._ints = ints
+
+ 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, V1alpha2NamedResourcesIntSlice):
+ 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, V1alpha2NamedResourcesIntSlice):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_request.py
new file mode 100644
index 00000000000..5fae29a9fe8
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_request.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2NamedResourcesRequest(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 = {
+ 'selector': 'str'
+ }
+
+ attribute_map = {
+ 'selector': 'selector'
+ }
+
+ def __init__(self, selector=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2NamedResourcesRequest - 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._selector = None
+ self.discriminator = None
+
+ self.selector = selector
+
+ @property
+ def selector(self):
+ """Gets the selector of this V1alpha2NamedResourcesRequest. # noqa: E501
+
+ Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/ In addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example: attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) && attributes.stringslice[\"b\"].isSorted() # noqa: E501
+
+ :return: The selector of this V1alpha2NamedResourcesRequest. # noqa: E501
+ :rtype: str
+ """
+ return self._selector
+
+ @selector.setter
+ def selector(self, selector):
+ """Sets the selector of this V1alpha2NamedResourcesRequest.
+
+ Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/ In addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example: attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) && attributes.stringslice[\"b\"].isSorted() # noqa: E501
+
+ :param selector: The selector of this V1alpha2NamedResourcesRequest. # noqa: E501
+ :type: str
+ """
+ if self.local_vars_configuration.client_side_validation and selector is None: # noqa: E501
+ raise ValueError("Invalid value for `selector`, must not be `None`") # noqa: E501
+
+ self._selector = selector
+
+ 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, V1alpha2NamedResourcesRequest):
+ 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, V1alpha2NamedResourcesRequest):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_resources.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_resources.py
new file mode 100644
index 00000000000..2d2b7cdebb7
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_resources.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2NamedResourcesResources(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 = {
+ 'instances': 'list[V1alpha2NamedResourcesInstance]'
+ }
+
+ attribute_map = {
+ 'instances': 'instances'
+ }
+
+ def __init__(self, instances=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2NamedResourcesResources - 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._instances = None
+ self.discriminator = None
+
+ self.instances = instances
+
+ @property
+ def instances(self):
+ """Gets the instances of this V1alpha2NamedResourcesResources. # noqa: E501
+
+ The list of all individual resources instances currently available. # noqa: E501
+
+ :return: The instances of this V1alpha2NamedResourcesResources. # noqa: E501
+ :rtype: list[V1alpha2NamedResourcesInstance]
+ """
+ return self._instances
+
+ @instances.setter
+ def instances(self, instances):
+ """Sets the instances of this V1alpha2NamedResourcesResources.
+
+ The list of all individual resources instances currently available. # noqa: E501
+
+ :param instances: The instances of this V1alpha2NamedResourcesResources. # noqa: E501
+ :type: list[V1alpha2NamedResourcesInstance]
+ """
+ if self.local_vars_configuration.client_side_validation and instances is None: # noqa: E501
+ raise ValueError("Invalid value for `instances`, must not be `None`") # noqa: E501
+
+ self._instances = instances
+
+ 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, V1alpha2NamedResourcesResources):
+ 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, V1alpha2NamedResourcesResources):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_string_slice.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_string_slice.py
new file mode 100644
index 00000000000..a2bb34fe37f
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_named_resources_string_slice.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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2NamedResourcesStringSlice(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 = {
+ 'strings': 'list[str]'
+ }
+
+ attribute_map = {
+ 'strings': 'strings'
+ }
+
+ def __init__(self, strings=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2NamedResourcesStringSlice - 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._strings = None
+ self.discriminator = None
+
+ self.strings = strings
+
+ @property
+ def strings(self):
+ """Gets the strings of this V1alpha2NamedResourcesStringSlice. # noqa: E501
+
+ Strings is the slice of strings. # noqa: E501
+
+ :return: The strings of this V1alpha2NamedResourcesStringSlice. # noqa: E501
+ :rtype: list[str]
+ """
+ return self._strings
+
+ @strings.setter
+ def strings(self, strings):
+ """Sets the strings of this V1alpha2NamedResourcesStringSlice.
+
+ Strings is the slice of strings. # noqa: E501
+
+ :param strings: The strings of this V1alpha2NamedResourcesStringSlice. # noqa: E501
+ :type: list[str]
+ """
+ if self.local_vars_configuration.client_side_validation and strings is None: # noqa: E501
+ raise ValueError("Invalid value for `strings`, must not be `None`") # noqa: E501
+
+ self._strings = strings
+
+ 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, V1alpha2NamedResourcesStringSlice):
+ 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, V1alpha2NamedResourcesStringSlice):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context.py
index 19ecd6c2357..3a3110311d0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_list.py
index 6da1c60f578..547fca7905a 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_spec.py
index 51a63351956..eb0ffc75e0d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_status.py
index 8499f982ed4..f1ba64820aa 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_pod_scheduling_context_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim.py
index 6e10db64950..fd7b6ac585f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_consumer_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_consumer_reference.py
index a8af6af0f1c..35b1257bcc5 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_consumer_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_list.py
index 0eec3dfe362..af67f77b3fb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters.py
new file mode 100644
index 00000000000..de334a4ece7
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters.py
@@ -0,0 +1,258 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2ResourceClaimParameters(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_requests': 'list[V1alpha2DriverRequests]',
+ 'generated_from': 'V1alpha2ResourceClaimParametersReference',
+ 'kind': 'str',
+ 'metadata': 'V1ObjectMeta',
+ 'shareable': 'bool'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'driver_requests': 'driverRequests',
+ 'generated_from': 'generatedFrom',
+ 'kind': 'kind',
+ 'metadata': 'metadata',
+ 'shareable': 'shareable'
+ }
+
+ def __init__(self, api_version=None, driver_requests=None, generated_from=None, kind=None, metadata=None, shareable=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2ResourceClaimParameters - 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_requests = None
+ self._generated_from = None
+ self._kind = None
+ self._metadata = None
+ self._shareable = None
+ self.discriminator = None
+
+ if api_version is not None:
+ self.api_version = api_version
+ if driver_requests is not None:
+ self.driver_requests = driver_requests
+ if generated_from is not None:
+ self.generated_from = generated_from
+ if kind is not None:
+ self.kind = kind
+ if metadata is not None:
+ self.metadata = metadata
+ if shareable is not None:
+ self.shareable = shareable
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1alpha2ResourceClaimParameters. # 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 V1alpha2ResourceClaimParameters. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1alpha2ResourceClaimParameters.
+
+ 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 V1alpha2ResourceClaimParameters. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def driver_requests(self):
+ """Gets the driver_requests of this V1alpha2ResourceClaimParameters. # noqa: E501
+
+ DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests. May be empty, in which case the claim can always be allocated. # noqa: E501
+
+ :return: The driver_requests of this V1alpha2ResourceClaimParameters. # noqa: E501
+ :rtype: list[V1alpha2DriverRequests]
+ """
+ return self._driver_requests
+
+ @driver_requests.setter
+ def driver_requests(self, driver_requests):
+ """Sets the driver_requests of this V1alpha2ResourceClaimParameters.
+
+ DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests. May be empty, in which case the claim can always be allocated. # noqa: E501
+
+ :param driver_requests: The driver_requests of this V1alpha2ResourceClaimParameters. # noqa: E501
+ :type: list[V1alpha2DriverRequests]
+ """
+
+ self._driver_requests = driver_requests
+
+ @property
+ def generated_from(self):
+ """Gets the generated_from of this V1alpha2ResourceClaimParameters. # noqa: E501
+
+
+ :return: The generated_from of this V1alpha2ResourceClaimParameters. # noqa: E501
+ :rtype: V1alpha2ResourceClaimParametersReference
+ """
+ return self._generated_from
+
+ @generated_from.setter
+ def generated_from(self, generated_from):
+ """Sets the generated_from of this V1alpha2ResourceClaimParameters.
+
+
+ :param generated_from: The generated_from of this V1alpha2ResourceClaimParameters. # noqa: E501
+ :type: V1alpha2ResourceClaimParametersReference
+ """
+
+ self._generated_from = generated_from
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1alpha2ResourceClaimParameters. # 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 V1alpha2ResourceClaimParameters. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1alpha2ResourceClaimParameters.
+
+ 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 V1alpha2ResourceClaimParameters. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1alpha2ResourceClaimParameters. # noqa: E501
+
+
+ :return: The metadata of this V1alpha2ResourceClaimParameters. # noqa: E501
+ :rtype: V1ObjectMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1alpha2ResourceClaimParameters.
+
+
+ :param metadata: The metadata of this V1alpha2ResourceClaimParameters. # noqa: E501
+ :type: V1ObjectMeta
+ """
+
+ self._metadata = metadata
+
+ @property
+ def shareable(self):
+ """Gets the shareable of this V1alpha2ResourceClaimParameters. # noqa: E501
+
+ Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time. # noqa: E501
+
+ :return: The shareable of this V1alpha2ResourceClaimParameters. # noqa: E501
+ :rtype: bool
+ """
+ return self._shareable
+
+ @shareable.setter
+ def shareable(self, shareable):
+ """Sets the shareable of this V1alpha2ResourceClaimParameters.
+
+ Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time. # noqa: E501
+
+ :param shareable: The shareable of this V1alpha2ResourceClaimParameters. # noqa: E501
+ :type: bool
+ """
+
+ self._shareable = shareable
+
+ 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, V1alpha2ResourceClaimParameters):
+ 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, V1alpha2ResourceClaimParameters):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters_list.py
new file mode 100644
index 00000000000..5321190dddb
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters_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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2ResourceClaimParametersList(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[V1alpha2ResourceClaimParameters]',
+ '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
+ """V1alpha2ResourceClaimParametersList - 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 V1alpha2ResourceClaimParametersList. # 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 V1alpha2ResourceClaimParametersList. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1alpha2ResourceClaimParametersList.
+
+ 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 V1alpha2ResourceClaimParametersList. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def items(self):
+ """Gets the items of this V1alpha2ResourceClaimParametersList. # noqa: E501
+
+ Items is the list of node resource capacity objects. # noqa: E501
+
+ :return: The items of this V1alpha2ResourceClaimParametersList. # noqa: E501
+ :rtype: list[V1alpha2ResourceClaimParameters]
+ """
+ return self._items
+
+ @items.setter
+ def items(self, items):
+ """Sets the items of this V1alpha2ResourceClaimParametersList.
+
+ Items is the list of node resource capacity objects. # noqa: E501
+
+ :param items: The items of this V1alpha2ResourceClaimParametersList. # noqa: E501
+ :type: list[V1alpha2ResourceClaimParameters]
+ """
+ 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 V1alpha2ResourceClaimParametersList. # 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 V1alpha2ResourceClaimParametersList. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1alpha2ResourceClaimParametersList.
+
+ 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 V1alpha2ResourceClaimParametersList. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1alpha2ResourceClaimParametersList. # noqa: E501
+
+
+ :return: The metadata of this V1alpha2ResourceClaimParametersList. # noqa: E501
+ :rtype: V1ListMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1alpha2ResourceClaimParametersList.
+
+
+ :param metadata: The metadata of this V1alpha2ResourceClaimParametersList. # 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, V1alpha2ResourceClaimParametersList):
+ 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, V1alpha2ResourceClaimParametersList):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters_reference.py
index 76705fa76c9..13bb6948b7c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_parameters_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_scheduling_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_scheduling_status.py
index 0e21529e4af..52ab2d426b0 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_scheduling_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_scheduling_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_spec.py
index ccbf6f02f4e..8bfb2104506 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_status.py
index 451991bf5b5..624405c61c6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template.py
index 7f4a52e97c9..de6d86cdacc 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template_list.py
index 3e9aa2c2d06..30615b4815b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template_spec.py
index a731221a929..c3b26fcd5fa 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_claim_template_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class.py
index 12b822f0fc7..0f9d3e0534c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -38,6 +38,7 @@ class V1alpha2ResourceClass(object):
'kind': 'str',
'metadata': 'V1ObjectMeta',
'parameters_ref': 'V1alpha2ResourceClassParametersReference',
+ 'structured_parameters': 'bool',
'suitable_nodes': 'V1NodeSelector'
}
@@ -47,10 +48,11 @@ class V1alpha2ResourceClass(object):
'kind': 'kind',
'metadata': 'metadata',
'parameters_ref': 'parametersRef',
+ 'structured_parameters': 'structuredParameters',
'suitable_nodes': 'suitableNodes'
}
- def __init__(self, api_version=None, driver_name=None, kind=None, metadata=None, parameters_ref=None, suitable_nodes=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, api_version=None, driver_name=None, kind=None, metadata=None, parameters_ref=None, structured_parameters=None, suitable_nodes=None, local_vars_configuration=None): # noqa: E501
"""V1alpha2ResourceClass - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -61,6 +63,7 @@ class V1alpha2ResourceClass(object):
self._kind = None
self._metadata = None
self._parameters_ref = None
+ self._structured_parameters = None
self._suitable_nodes = None
self.discriminator = None
@@ -73,6 +76,8 @@ class V1alpha2ResourceClass(object):
self.metadata = metadata
if parameters_ref is not None:
self.parameters_ref = parameters_ref
+ if structured_parameters is not None:
+ self.structured_parameters = structured_parameters
if suitable_nodes is not None:
self.suitable_nodes = suitable_nodes
@@ -190,6 +195,29 @@ class V1alpha2ResourceClass(object):
self._parameters_ref = parameters_ref
@property
+ def structured_parameters(self):
+ """Gets the structured_parameters of this V1alpha2ResourceClass. # noqa: E501
+
+ If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true. # noqa: E501
+
+ :return: The structured_parameters of this V1alpha2ResourceClass. # noqa: E501
+ :rtype: bool
+ """
+ return self._structured_parameters
+
+ @structured_parameters.setter
+ def structured_parameters(self, structured_parameters):
+ """Sets the structured_parameters of this V1alpha2ResourceClass.
+
+ If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true. # noqa: E501
+
+ :param structured_parameters: The structured_parameters of this V1alpha2ResourceClass. # noqa: E501
+ :type: bool
+ """
+
+ self._structured_parameters = structured_parameters
+
+ @property
def suitable_nodes(self):
"""Gets the suitable_nodes of this V1alpha2ResourceClass. # noqa: E501
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_list.py
index 1bc29a6337c..3ee6ff008a7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters.py
new file mode 100644
index 00000000000..3b3843f506e
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters.py
@@ -0,0 +1,258 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2ResourceClassParameters(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',
+ 'filters': 'list[V1alpha2ResourceFilter]',
+ 'generated_from': 'V1alpha2ResourceClassParametersReference',
+ 'kind': 'str',
+ 'metadata': 'V1ObjectMeta',
+ 'vendor_parameters': 'list[V1alpha2VendorParameters]'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'filters': 'filters',
+ 'generated_from': 'generatedFrom',
+ 'kind': 'kind',
+ 'metadata': 'metadata',
+ 'vendor_parameters': 'vendorParameters'
+ }
+
+ def __init__(self, api_version=None, filters=None, generated_from=None, kind=None, metadata=None, vendor_parameters=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2ResourceClassParameters - 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._filters = None
+ self._generated_from = None
+ self._kind = None
+ self._metadata = None
+ self._vendor_parameters = None
+ self.discriminator = None
+
+ if api_version is not None:
+ self.api_version = api_version
+ if filters is not None:
+ self.filters = filters
+ if generated_from is not None:
+ self.generated_from = generated_from
+ if kind is not None:
+ self.kind = kind
+ if metadata is not None:
+ self.metadata = metadata
+ if vendor_parameters is not None:
+ self.vendor_parameters = vendor_parameters
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1alpha2ResourceClassParameters. # 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 V1alpha2ResourceClassParameters. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1alpha2ResourceClassParameters.
+
+ 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 V1alpha2ResourceClassParameters. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def filters(self):
+ """Gets the filters of this V1alpha2ResourceClassParameters. # noqa: E501
+
+ Filters describes additional contraints that must be met when using the class. # noqa: E501
+
+ :return: The filters of this V1alpha2ResourceClassParameters. # noqa: E501
+ :rtype: list[V1alpha2ResourceFilter]
+ """
+ return self._filters
+
+ @filters.setter
+ def filters(self, filters):
+ """Sets the filters of this V1alpha2ResourceClassParameters.
+
+ Filters describes additional contraints that must be met when using the class. # noqa: E501
+
+ :param filters: The filters of this V1alpha2ResourceClassParameters. # noqa: E501
+ :type: list[V1alpha2ResourceFilter]
+ """
+
+ self._filters = filters
+
+ @property
+ def generated_from(self):
+ """Gets the generated_from of this V1alpha2ResourceClassParameters. # noqa: E501
+
+
+ :return: The generated_from of this V1alpha2ResourceClassParameters. # noqa: E501
+ :rtype: V1alpha2ResourceClassParametersReference
+ """
+ return self._generated_from
+
+ @generated_from.setter
+ def generated_from(self, generated_from):
+ """Sets the generated_from of this V1alpha2ResourceClassParameters.
+
+
+ :param generated_from: The generated_from of this V1alpha2ResourceClassParameters. # noqa: E501
+ :type: V1alpha2ResourceClassParametersReference
+ """
+
+ self._generated_from = generated_from
+
+ @property
+ def kind(self):
+ """Gets the kind of this V1alpha2ResourceClassParameters. # 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 V1alpha2ResourceClassParameters. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1alpha2ResourceClassParameters.
+
+ 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 V1alpha2ResourceClassParameters. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1alpha2ResourceClassParameters. # noqa: E501
+
+
+ :return: The metadata of this V1alpha2ResourceClassParameters. # noqa: E501
+ :rtype: V1ObjectMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1alpha2ResourceClassParameters.
+
+
+ :param metadata: The metadata of this V1alpha2ResourceClassParameters. # noqa: E501
+ :type: V1ObjectMeta
+ """
+
+ self._metadata = metadata
+
+ @property
+ def vendor_parameters(self):
+ """Gets the vendor_parameters of this V1alpha2ResourceClassParameters. # noqa: E501
+
+ VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver. # noqa: E501
+
+ :return: The vendor_parameters of this V1alpha2ResourceClassParameters. # noqa: E501
+ :rtype: list[V1alpha2VendorParameters]
+ """
+ return self._vendor_parameters
+
+ @vendor_parameters.setter
+ def vendor_parameters(self, vendor_parameters):
+ """Sets the vendor_parameters of this V1alpha2ResourceClassParameters.
+
+ VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver. # noqa: E501
+
+ :param vendor_parameters: The vendor_parameters of this V1alpha2ResourceClassParameters. # noqa: E501
+ :type: list[V1alpha2VendorParameters]
+ """
+
+ self._vendor_parameters = vendor_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, V1alpha2ResourceClassParameters):
+ 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, V1alpha2ResourceClassParameters):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters_list.py
new file mode 100644
index 00000000000..4030c51e78c
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters_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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2ResourceClassParametersList(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[V1alpha2ResourceClassParameters]',
+ '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
+ """V1alpha2ResourceClassParametersList - 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 V1alpha2ResourceClassParametersList. # 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 V1alpha2ResourceClassParametersList. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1alpha2ResourceClassParametersList.
+
+ 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 V1alpha2ResourceClassParametersList. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def items(self):
+ """Gets the items of this V1alpha2ResourceClassParametersList. # noqa: E501
+
+ Items is the list of node resource capacity objects. # noqa: E501
+
+ :return: The items of this V1alpha2ResourceClassParametersList. # noqa: E501
+ :rtype: list[V1alpha2ResourceClassParameters]
+ """
+ return self._items
+
+ @items.setter
+ def items(self, items):
+ """Sets the items of this V1alpha2ResourceClassParametersList.
+
+ Items is the list of node resource capacity objects. # noqa: E501
+
+ :param items: The items of this V1alpha2ResourceClassParametersList. # noqa: E501
+ :type: list[V1alpha2ResourceClassParameters]
+ """
+ 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 V1alpha2ResourceClassParametersList. # 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 V1alpha2ResourceClassParametersList. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1alpha2ResourceClassParametersList.
+
+ 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 V1alpha2ResourceClassParametersList. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1alpha2ResourceClassParametersList. # noqa: E501
+
+
+ :return: The metadata of this V1alpha2ResourceClassParametersList. # noqa: E501
+ :rtype: V1ListMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1alpha2ResourceClassParametersList.
+
+
+ :param metadata: The metadata of this V1alpha2ResourceClassParametersList. # 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, V1alpha2ResourceClassParametersList):
+ 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, V1alpha2ResourceClassParametersList):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters_reference.py
index bf8943a1154..c5d193c2486 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_class_parameters_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_filter.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_filter.py
new file mode 100644
index 00000000000..fae4ca545fd
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_filter.py
@@ -0,0 +1,148 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2ResourceFilter(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 = {
+ 'driver_name': 'str',
+ 'named_resources': 'V1alpha2NamedResourcesFilter'
+ }
+
+ attribute_map = {
+ 'driver_name': 'driverName',
+ 'named_resources': 'namedResources'
+ }
+
+ def __init__(self, driver_name=None, named_resources=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2ResourceFilter - 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._driver_name = None
+ self._named_resources = None
+ self.discriminator = None
+
+ if driver_name is not None:
+ self.driver_name = driver_name
+ if named_resources is not None:
+ self.named_resources = named_resources
+
+ @property
+ def driver_name(self):
+ """Gets the driver_name of this V1alpha2ResourceFilter. # noqa: E501
+
+ DriverName is the name used by the DRA driver kubelet plugin. # noqa: E501
+
+ :return: The driver_name of this V1alpha2ResourceFilter. # noqa: E501
+ :rtype: str
+ """
+ return self._driver_name
+
+ @driver_name.setter
+ def driver_name(self, driver_name):
+ """Sets the driver_name of this V1alpha2ResourceFilter.
+
+ DriverName is the name used by the DRA driver kubelet plugin. # noqa: E501
+
+ :param driver_name: The driver_name of this V1alpha2ResourceFilter. # noqa: E501
+ :type: str
+ """
+
+ self._driver_name = driver_name
+
+ @property
+ def named_resources(self):
+ """Gets the named_resources of this V1alpha2ResourceFilter. # noqa: E501
+
+
+ :return: The named_resources of this V1alpha2ResourceFilter. # noqa: E501
+ :rtype: V1alpha2NamedResourcesFilter
+ """
+ return self._named_resources
+
+ @named_resources.setter
+ def named_resources(self, named_resources):
+ """Sets the named_resources of this V1alpha2ResourceFilter.
+
+
+ :param named_resources: The named_resources of this V1alpha2ResourceFilter. # noqa: E501
+ :type: V1alpha2NamedResourcesFilter
+ """
+
+ self._named_resources = named_resources
+
+ 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, V1alpha2ResourceFilter):
+ 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, V1alpha2ResourceFilter):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_handle.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_handle.py
index 68fdb7b6ad2..bbb343c40cf 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_handle.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_handle.py
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
@@ -34,15 +34,17 @@ class V1alpha2ResourceHandle(object):
"""
openapi_types = {
'data': 'str',
- 'driver_name': 'str'
+ 'driver_name': 'str',
+ 'structured_data': 'V1alpha2StructuredResourceHandle'
}
attribute_map = {
'data': 'data',
- 'driver_name': 'driverName'
+ 'driver_name': 'driverName',
+ 'structured_data': 'structuredData'
}
- def __init__(self, data=None, driver_name=None, local_vars_configuration=None): # noqa: E501
+ def __init__(self, data=None, driver_name=None, structured_data=None, local_vars_configuration=None): # noqa: E501
"""V1alpha2ResourceHandle - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -50,12 +52,15 @@ class V1alpha2ResourceHandle(object):
self._data = None
self._driver_name = None
+ self._structured_data = None
self.discriminator = None
if data is not None:
self.data = data
if driver_name is not None:
self.driver_name = driver_name
+ if structured_data is not None:
+ self.structured_data = structured_data
@property
def data(self):
@@ -103,6 +108,27 @@ class V1alpha2ResourceHandle(object):
self._driver_name = driver_name
+ @property
+ def structured_data(self):
+ """Gets the structured_data of this V1alpha2ResourceHandle. # noqa: E501
+
+
+ :return: The structured_data of this V1alpha2ResourceHandle. # noqa: E501
+ :rtype: V1alpha2StructuredResourceHandle
+ """
+ return self._structured_data
+
+ @structured_data.setter
+ def structured_data(self, structured_data):
+ """Sets the structured_data of this V1alpha2ResourceHandle.
+
+
+ :param structured_data: The structured_data of this V1alpha2ResourceHandle. # noqa: E501
+ :type: V1alpha2StructuredResourceHandle
+ """
+
+ self._structured_data = structured_data
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_request.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_request.py
new file mode 100644
index 00000000000..d701fa1145b
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_request.py
@@ -0,0 +1,148 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2ResourceRequest(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 = {
+ 'named_resources': 'V1alpha2NamedResourcesRequest',
+ 'vendor_parameters': 'object'
+ }
+
+ attribute_map = {
+ 'named_resources': 'namedResources',
+ 'vendor_parameters': 'vendorParameters'
+ }
+
+ def __init__(self, named_resources=None, vendor_parameters=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2ResourceRequest - 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._named_resources = None
+ self._vendor_parameters = None
+ self.discriminator = None
+
+ if named_resources is not None:
+ self.named_resources = named_resources
+ if vendor_parameters is not None:
+ self.vendor_parameters = vendor_parameters
+
+ @property
+ def named_resources(self):
+ """Gets the named_resources of this V1alpha2ResourceRequest. # noqa: E501
+
+
+ :return: The named_resources of this V1alpha2ResourceRequest. # noqa: E501
+ :rtype: V1alpha2NamedResourcesRequest
+ """
+ return self._named_resources
+
+ @named_resources.setter
+ def named_resources(self, named_resources):
+ """Sets the named_resources of this V1alpha2ResourceRequest.
+
+
+ :param named_resources: The named_resources of this V1alpha2ResourceRequest. # noqa: E501
+ :type: V1alpha2NamedResourcesRequest
+ """
+
+ self._named_resources = named_resources
+
+ @property
+ def vendor_parameters(self):
+ """Gets the vendor_parameters of this V1alpha2ResourceRequest. # noqa: E501
+
+ VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim. # noqa: E501
+
+ :return: The vendor_parameters of this V1alpha2ResourceRequest. # noqa: E501
+ :rtype: object
+ """
+ return self._vendor_parameters
+
+ @vendor_parameters.setter
+ def vendor_parameters(self, vendor_parameters):
+ """Sets the vendor_parameters of this V1alpha2ResourceRequest.
+
+ VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim. # noqa: E501
+
+ :param vendor_parameters: The vendor_parameters of this V1alpha2ResourceRequest. # noqa: E501
+ :type: object
+ """
+
+ self._vendor_parameters = vendor_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, V1alpha2ResourceRequest):
+ 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, V1alpha2ResourceRequest):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_slice.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_slice.py
new file mode 100644
index 00000000000..ba8a23999fb
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_slice.py
@@ -0,0 +1,259 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2ResourceSlice(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',
+ 'named_resources': 'V1alpha2NamedResourcesResources',
+ 'node_name': 'str'
+ }
+
+ attribute_map = {
+ 'api_version': 'apiVersion',
+ 'driver_name': 'driverName',
+ 'kind': 'kind',
+ 'metadata': 'metadata',
+ 'named_resources': 'namedResources',
+ 'node_name': 'nodeName'
+ }
+
+ def __init__(self, api_version=None, driver_name=None, kind=None, metadata=None, named_resources=None, node_name=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2ResourceSlice - 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._named_resources = None
+ self._node_name = 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 named_resources is not None:
+ self.named_resources = named_resources
+ if node_name is not None:
+ self.node_name = node_name
+
+ @property
+ def api_version(self):
+ """Gets the api_version of this V1alpha2ResourceSlice. # 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 V1alpha2ResourceSlice. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1alpha2ResourceSlice.
+
+ 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 V1alpha2ResourceSlice. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def driver_name(self):
+ """Gets the driver_name of this V1alpha2ResourceSlice. # noqa: E501
+
+ DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name. # noqa: E501
+
+ :return: The driver_name of this V1alpha2ResourceSlice. # noqa: E501
+ :rtype: str
+ """
+ return self._driver_name
+
+ @driver_name.setter
+ def driver_name(self, driver_name):
+ """Sets the driver_name of this V1alpha2ResourceSlice.
+
+ DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name. # noqa: E501
+
+ :param driver_name: The driver_name of this V1alpha2ResourceSlice. # 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 V1alpha2ResourceSlice. # 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 V1alpha2ResourceSlice. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1alpha2ResourceSlice.
+
+ 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 V1alpha2ResourceSlice. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1alpha2ResourceSlice. # noqa: E501
+
+
+ :return: The metadata of this V1alpha2ResourceSlice. # noqa: E501
+ :rtype: V1ObjectMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1alpha2ResourceSlice.
+
+
+ :param metadata: The metadata of this V1alpha2ResourceSlice. # noqa: E501
+ :type: V1ObjectMeta
+ """
+
+ self._metadata = metadata
+
+ @property
+ def named_resources(self):
+ """Gets the named_resources of this V1alpha2ResourceSlice. # noqa: E501
+
+
+ :return: The named_resources of this V1alpha2ResourceSlice. # noqa: E501
+ :rtype: V1alpha2NamedResourcesResources
+ """
+ return self._named_resources
+
+ @named_resources.setter
+ def named_resources(self, named_resources):
+ """Sets the named_resources of this V1alpha2ResourceSlice.
+
+
+ :param named_resources: The named_resources of this V1alpha2ResourceSlice. # noqa: E501
+ :type: V1alpha2NamedResourcesResources
+ """
+
+ self._named_resources = named_resources
+
+ @property
+ def node_name(self):
+ """Gets the node_name of this V1alpha2ResourceSlice. # noqa: E501
+
+ NodeName identifies the node which provides the resources if they are local to a node. A field selector can be used to list only ResourceSlice objects with a certain node name. # noqa: E501
+
+ :return: The node_name of this V1alpha2ResourceSlice. # noqa: E501
+ :rtype: str
+ """
+ return self._node_name
+
+ @node_name.setter
+ def node_name(self, node_name):
+ """Sets the node_name of this V1alpha2ResourceSlice.
+
+ NodeName identifies the node which provides the resources if they are local to a node. A field selector can be used to list only ResourceSlice objects with a certain node name. # noqa: E501
+
+ :param node_name: The node_name of this V1alpha2ResourceSlice. # noqa: E501
+ :type: str
+ """
+
+ self._node_name = node_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, V1alpha2ResourceSlice):
+ 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, V1alpha2ResourceSlice):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_slice_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_slice_list.py
new file mode 100644
index 00000000000..05a784496fe
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_resource_slice_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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2ResourceSliceList(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[V1alpha2ResourceSlice]',
+ '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
+ """V1alpha2ResourceSliceList - 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 V1alpha2ResourceSliceList. # 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 V1alpha2ResourceSliceList. # noqa: E501
+ :rtype: str
+ """
+ return self._api_version
+
+ @api_version.setter
+ def api_version(self, api_version):
+ """Sets the api_version of this V1alpha2ResourceSliceList.
+
+ 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 V1alpha2ResourceSliceList. # noqa: E501
+ :type: str
+ """
+
+ self._api_version = api_version
+
+ @property
+ def items(self):
+ """Gets the items of this V1alpha2ResourceSliceList. # noqa: E501
+
+ Items is the list of node resource capacity objects. # noqa: E501
+
+ :return: The items of this V1alpha2ResourceSliceList. # noqa: E501
+ :rtype: list[V1alpha2ResourceSlice]
+ """
+ return self._items
+
+ @items.setter
+ def items(self, items):
+ """Sets the items of this V1alpha2ResourceSliceList.
+
+ Items is the list of node resource capacity objects. # noqa: E501
+
+ :param items: The items of this V1alpha2ResourceSliceList. # noqa: E501
+ :type: list[V1alpha2ResourceSlice]
+ """
+ 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 V1alpha2ResourceSliceList. # 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 V1alpha2ResourceSliceList. # noqa: E501
+ :rtype: str
+ """
+ return self._kind
+
+ @kind.setter
+ def kind(self, kind):
+ """Sets the kind of this V1alpha2ResourceSliceList.
+
+ 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 V1alpha2ResourceSliceList. # noqa: E501
+ :type: str
+ """
+
+ self._kind = kind
+
+ @property
+ def metadata(self):
+ """Gets the metadata of this V1alpha2ResourceSliceList. # noqa: E501
+
+
+ :return: The metadata of this V1alpha2ResourceSliceList. # noqa: E501
+ :rtype: V1ListMeta
+ """
+ return self._metadata
+
+ @metadata.setter
+ def metadata(self, metadata):
+ """Sets the metadata of this V1alpha2ResourceSliceList.
+
+
+ :param metadata: The metadata of this V1alpha2ResourceSliceList. # 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, V1alpha2ResourceSliceList):
+ 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, V1alpha2ResourceSliceList):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_structured_resource_handle.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_structured_resource_handle.py
new file mode 100644
index 00000000000..ffaa506c4a0
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_structured_resource_handle.py
@@ -0,0 +1,207 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2StructuredResourceHandle(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 = {
+ 'node_name': 'str',
+ 'results': 'list[V1alpha2DriverAllocationResult]',
+ 'vendor_claim_parameters': 'object',
+ 'vendor_class_parameters': 'object'
+ }
+
+ attribute_map = {
+ 'node_name': 'nodeName',
+ 'results': 'results',
+ 'vendor_claim_parameters': 'vendorClaimParameters',
+ 'vendor_class_parameters': 'vendorClassParameters'
+ }
+
+ def __init__(self, node_name=None, results=None, vendor_claim_parameters=None, vendor_class_parameters=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2StructuredResourceHandle - 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._node_name = None
+ self._results = None
+ self._vendor_claim_parameters = None
+ self._vendor_class_parameters = None
+ self.discriminator = None
+
+ if node_name is not None:
+ self.node_name = node_name
+ self.results = results
+ if vendor_claim_parameters is not None:
+ self.vendor_claim_parameters = vendor_claim_parameters
+ if vendor_class_parameters is not None:
+ self.vendor_class_parameters = vendor_class_parameters
+
+ @property
+ def node_name(self):
+ """Gets the node_name of this V1alpha2StructuredResourceHandle. # noqa: E501
+
+ NodeName is the name of the node providing the necessary resources if the resources are local to a node. # noqa: E501
+
+ :return: The node_name of this V1alpha2StructuredResourceHandle. # noqa: E501
+ :rtype: str
+ """
+ return self._node_name
+
+ @node_name.setter
+ def node_name(self, node_name):
+ """Sets the node_name of this V1alpha2StructuredResourceHandle.
+
+ NodeName is the name of the node providing the necessary resources if the resources are local to a node. # noqa: E501
+
+ :param node_name: The node_name of this V1alpha2StructuredResourceHandle. # noqa: E501
+ :type: str
+ """
+
+ self._node_name = node_name
+
+ @property
+ def results(self):
+ """Gets the results of this V1alpha2StructuredResourceHandle. # noqa: E501
+
+ Results lists all allocated driver resources. # noqa: E501
+
+ :return: The results of this V1alpha2StructuredResourceHandle. # noqa: E501
+ :rtype: list[V1alpha2DriverAllocationResult]
+ """
+ return self._results
+
+ @results.setter
+ def results(self, results):
+ """Sets the results of this V1alpha2StructuredResourceHandle.
+
+ Results lists all allocated driver resources. # noqa: E501
+
+ :param results: The results of this V1alpha2StructuredResourceHandle. # noqa: E501
+ :type: list[V1alpha2DriverAllocationResult]
+ """
+ if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501
+ raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501
+
+ self._results = results
+
+ @property
+ def vendor_claim_parameters(self):
+ """Gets the vendor_claim_parameters of this V1alpha2StructuredResourceHandle. # noqa: E501
+
+ VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated. # noqa: E501
+
+ :return: The vendor_claim_parameters of this V1alpha2StructuredResourceHandle. # noqa: E501
+ :rtype: object
+ """
+ return self._vendor_claim_parameters
+
+ @vendor_claim_parameters.setter
+ def vendor_claim_parameters(self, vendor_claim_parameters):
+ """Sets the vendor_claim_parameters of this V1alpha2StructuredResourceHandle.
+
+ VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated. # noqa: E501
+
+ :param vendor_claim_parameters: The vendor_claim_parameters of this V1alpha2StructuredResourceHandle. # noqa: E501
+ :type: object
+ """
+
+ self._vendor_claim_parameters = vendor_claim_parameters
+
+ @property
+ def vendor_class_parameters(self):
+ """Gets the vendor_class_parameters of this V1alpha2StructuredResourceHandle. # noqa: E501
+
+ VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated. # noqa: E501
+
+ :return: The vendor_class_parameters of this V1alpha2StructuredResourceHandle. # noqa: E501
+ :rtype: object
+ """
+ return self._vendor_class_parameters
+
+ @vendor_class_parameters.setter
+ def vendor_class_parameters(self, vendor_class_parameters):
+ """Sets the vendor_class_parameters of this V1alpha2StructuredResourceHandle.
+
+ VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated. # noqa: E501
+
+ :param vendor_class_parameters: The vendor_class_parameters of this V1alpha2StructuredResourceHandle. # noqa: E501
+ :type: object
+ """
+
+ self._vendor_class_parameters = vendor_class_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, V1alpha2StructuredResourceHandle):
+ 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, V1alpha2StructuredResourceHandle):
+ return True
+
+ return self.to_dict() != other.to_dict()
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_vendor_parameters.py b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_vendor_parameters.py
new file mode 100644
index 00000000000..b0bd91fe2ae
--- /dev/null
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1alpha2_vendor_parameters.py
@@ -0,0 +1,150 @@
+# 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.30
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+from kubernetes.client.configuration import Configuration
+
+
+class V1alpha2VendorParameters(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 = {
+ 'driver_name': 'str',
+ 'parameters': 'object'
+ }
+
+ attribute_map = {
+ 'driver_name': 'driverName',
+ 'parameters': 'parameters'
+ }
+
+ def __init__(self, driver_name=None, parameters=None, local_vars_configuration=None): # noqa: E501
+ """V1alpha2VendorParameters - 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._driver_name = None
+ self._parameters = None
+ self.discriminator = None
+
+ if driver_name is not None:
+ self.driver_name = driver_name
+ if parameters is not None:
+ self.parameters = parameters
+
+ @property
+ def driver_name(self):
+ """Gets the driver_name of this V1alpha2VendorParameters. # noqa: E501
+
+ DriverName is the name used by the DRA driver kubelet plugin. # noqa: E501
+
+ :return: The driver_name of this V1alpha2VendorParameters. # noqa: E501
+ :rtype: str
+ """
+ return self._driver_name
+
+ @driver_name.setter
+ def driver_name(self, driver_name):
+ """Sets the driver_name of this V1alpha2VendorParameters.
+
+ DriverName is the name used by the DRA driver kubelet plugin. # noqa: E501
+
+ :param driver_name: The driver_name of this V1alpha2VendorParameters. # noqa: E501
+ :type: str
+ """
+
+ self._driver_name = driver_name
+
+ @property
+ def parameters(self):
+ """Gets the parameters of this V1alpha2VendorParameters. # noqa: E501
+
+ Parameters can be arbitrary setup parameters. They are ignored while allocating a claim. # noqa: E501
+
+ :return: The parameters of this V1alpha2VendorParameters. # noqa: E501
+ :rtype: object
+ """
+ return self._parameters
+
+ @parameters.setter
+ def parameters(self, parameters):
+ """Sets the parameters of this V1alpha2VendorParameters.
+
+ Parameters can be arbitrary setup parameters. They are ignored while allocating a claim. # noqa: E501
+
+ :param parameters: The parameters of this V1alpha2VendorParameters. # noqa: E501
+ :type: object
+ """
+
+ 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, V1alpha2VendorParameters):
+ 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, V1alpha2VendorParameters):
+ 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
index 1b3e4212d50..e4df2b31aeb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_audit_annotation.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
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
index 74555db16f3..21ab15aef71 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_expression_warning.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
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 d874c9bccf3..c5e049fb480 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.29
+ The version of the OpenAPI document: release-1.30
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 4e3dc71cf02..bdb64b9964f 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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 28ca1875c15..5b84d27a4ae 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.29
+ The version of the OpenAPI document: release-1.30
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 d593daff100..e8838db9dd2 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.29
+ The version of the OpenAPI document: release-1.30
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 fa661b762e6..9ac20f78e29 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_self_subject_review.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_self_subject_review.py
index aab556de948..e061068db88 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_self_subject_review.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_self_subject_review_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_self_subject_review_status.py
index 347d438ff94..61e5838f13b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_self_subject_review_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_type_checking.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_type_checking.py
index aa2cf29983c..a35236732b6 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_type_checking.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
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/v1beta1_validating_admission_policy.py
index 9026e6a5ab3..20bbe50e05c 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding.py
index 318a1c3ed4e..215d2b531cb 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_list.py
index 5ada750e469..bfb0581cfcd 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_binding_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
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
index 30da5c61b6e..3d1cce9742f 100644
--- 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
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_list.py
index 95ce5c31ac6..62f6ced86d1 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validating_admission_policy_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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
index 885a6327d7b..d3a11916b8a 100644
--- 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
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
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
index 6107ebc414d..f0dd926f181 100644
--- 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
@@ -5,7 +5,7 @@
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
- The version of the OpenAPI document: release-1.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validation.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validation.py
index 09a4a009006..1c1ea8dd770 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_validation.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta1_variable.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta1_variable.py
index ad718cce081..7278971bbd1 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_exempt_priority_level_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_exempt_priority_level_configuration.py
index ca85309ac83..0b9e65546ba 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_exempt_priority_level_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_distinguisher_method.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_distinguisher_method.py
index a1fb0b45d6a..d72a55f9834 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_distinguisher_method.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema.py
index c9db0fcdf0a..b029bda82b9 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_condition.py
index 8131adba6f4..0f368f07208 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_list.py
index f6ff8dc5338..cd51ed83af7 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_spec.py
index e2fe2d29b7f..2d919f4b59d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_status.py
index c3a6711e1b7..a51a49523df 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_flow_schema_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_group_subject.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_group_subject.py
index 2ae3f30d628..b45f03b8a0e 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_group_subject.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_limit_response.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_limit_response.py
index c6f072668ab..e697c01b358 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_limit_response.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_limited_priority_level_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_limited_priority_level_configuration.py
index ed3819289a9..84559250609 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_limited_priority_level_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_non_resource_policy_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_non_resource_policy_rule.py
index 38862795301..8129b9537ab 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_non_resource_policy_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_policy_rules_with_subjects.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_policy_rules_with_subjects.py
index 2feff8cc21f..253b453e89b 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_policy_rules_with_subjects.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration.py
index a4b80b55214..49ecee3ba33 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_condition.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_condition.py
index 35322a33d4a..d24adf49155 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_condition.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_list.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_list.py
index e001f427d0c..a01160b4981 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_list.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_reference.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_reference.py
index 4f8f8f30f07..58055e8f413 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_reference.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_spec.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_spec.py
index c89c610a9aa..705f0468f88 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_spec.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_status.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_status.py
index c630951ed08..cf935be037f 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_priority_level_configuration_status.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_queuing_configuration.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_queuing_configuration.py
index b13994de264..41c00faf375 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_queuing_configuration.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_resource_policy_rule.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_resource_policy_rule.py
index 9a1f4e0c4af..76900a1187d 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_resource_policy_rule.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_service_account_subject.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_service_account_subject.py
index 534ede94d44..a95d68a7510 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_service_account_subject.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_subject.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_subject.py
index 68d09bbeee8..c1b6830e629 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_subject.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_user_subject.py b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_user_subject.py
index 0ad1a26c0cc..4590cda6c22 100644
--- a/contrib/python/kubernetes/kubernetes/client/models/v1beta3_user_subject.py
+++ b/contrib/python/kubernetes/kubernetes/client/models/v1beta3_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.29
+ The version of the OpenAPI document: release-1.30
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 1a384de8bb4..4dfce0c7af4 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.29
+ The version of the OpenAPI document: release-1.30
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 c1279e38874..a30d8c80098 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.29
+ The version of the OpenAPI document: release-1.30
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 44cb83cabcb..b9cc44a1508 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.29
+ The version of the OpenAPI document: release-1.30
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 d7b28e3c226..29963555ceb 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.29
+ The version of the OpenAPI document: release-1.30
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 50ec9c37cba..8e53b338e97 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.29
+ The version of the OpenAPI document: release-1.30
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 f04027fb6e7..7b60529cf28 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.29
+ The version of the OpenAPI document: release-1.30
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 2389a91a06f..0eb9a2e44ee 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.29
+ The version of the OpenAPI document: release-1.30
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 75e93dd7dfb..cd47282b05f 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.29
+ The version of the OpenAPI document: release-1.30
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 108e0121655..17ddbcfcb4c 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.29
+ The version of the OpenAPI document: release-1.30
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 d15cdb4c77b..e55b7eac7aa 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.29
+ The version of the OpenAPI document: release-1.30
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 8587cf5f667..c83f6299fa7 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.29
+ The version of the OpenAPI document: release-1.30
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 9debb549796..713361437b6 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.29
+ The version of the OpenAPI document: release-1.30
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 c84fbc3075a..68e982c7deb 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.29
+ The version of the OpenAPI document: release-1.30
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 af60b42f344..1f4c32564e3 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.29
+ The version of the OpenAPI document: release-1.30
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 40a12309815..513d0ae1a10 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.29
+ The version of the OpenAPI document: release-1.30
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 386b65e7722..1f7b3aa825f 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.29
+ The version of the OpenAPI document: release-1.30
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 ddf1c121c9b..88eec9bc842 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.29
+ The version of the OpenAPI document: release-1.30
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 e434cccc245..8f6a5200ae2 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.29
+ The version of the OpenAPI document: release-1.30
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 b4b417bda0b..30f7d85e0a2 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.29
+ The version of the OpenAPI document: release-1.30
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 8947e3f8e34..9b9164a2dc5 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.29
+ The version of the OpenAPI document: release-1.30
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 e9a5837b359..4746e0ffb97 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.29
+ The version of the OpenAPI document: release-1.30
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 0df09ad5a52..c42ad0a97a1 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.29
+ The version of the OpenAPI document: release-1.30
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 5d2fdcaa4f2..ba3ed258906 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.29
+ The version of the OpenAPI document: release-1.30
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 f9c57d440b3..991c9d7afde 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.29
+ The version of the OpenAPI document: release-1.30
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 cf69aefe203..e0e96bedeb1 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.29
+ The version of the OpenAPI document: release-1.30
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 799ab12663a..5e5577715e2 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.29
+ The version of the OpenAPI document: release-1.30
Generated by: https://openapi-generator.tech
"""
diff --git a/contrib/python/kubernetes/kubernetes/config/kube_config.py b/contrib/python/kubernetes/kubernetes/config/kube_config.py
index d8c63a8261b..09cda8bda0e 100644
--- a/contrib/python/kubernetes/kubernetes/config/kube_config.py
+++ b/contrib/python/kubernetes/kubernetes/config/kube_config.py
@@ -80,7 +80,7 @@ def _create_temp_file_with_content(content, temp_file_path=None):
def _is_expired(expiry):
return ((parse_rfc3339(expiry) - EXPIRY_SKEW_PREVENTION_DELAY) <=
- datetime.datetime.utcnow().replace(tzinfo=UTC))
+ datetime.datetime.now(tz=UTC))
class FileOrData(object):
@@ -727,6 +727,10 @@ class KubeConfigMerger:
self.config_merged = ConfigNode(path, config_merged, path)
for item in ('clusters', 'contexts', 'users'):
self._merge(item, config.get(item, []) or [], path)
+
+ if 'current-context' in config:
+ self.config_merged.value['current-context'] = config['current-context']
+
self.config_files[path] = config
def _merge(self, item, add_cfg, path):
@@ -862,32 +866,36 @@ def load_kube_config_from_dict(config_dict, context=None,
def new_client_from_config(
config_file=None,
context=None,
- persist_config=True):
+ persist_config=True,
+ client_configuration=None):
"""
Loads configuration the same as load_kube_config but returns an ApiClient
to be used with any API object. This will allow the caller to concurrently
talk with multiple clusters.
"""
- client_config = type.__call__(Configuration)
+ if client_configuration is None:
+ client_configuration = type.__call__(Configuration)
load_kube_config(config_file=config_file, context=context,
- client_configuration=client_config,
+ client_configuration=client_configuration,
persist_config=persist_config)
- return ApiClient(configuration=client_config)
+ return ApiClient(configuration=client_configuration)
def new_client_from_config_dict(
config_dict=None,
context=None,
persist_config=True,
- temp_file_path=None):
+ temp_file_path=None,
+ client_configuration=None):
"""
Loads configuration the same as load_kube_config_from_dict but returns an ApiClient
to be used with any API object. This will allow the caller to concurrently
talk with multiple clusters.
"""
- client_config = type.__call__(Configuration)
+ if client_configuration is None:
+ client_configuration = type.__call__(Configuration)
load_kube_config_from_dict(config_dict=config_dict, context=context,
- client_configuration=client_config,
+ client_configuration=client_configuration,
persist_config=persist_config,
temp_file_path=temp_file_path)
- return ApiClient(configuration=client_config)
+ return ApiClient(configuration=client_configuration)
diff --git a/contrib/python/kubernetes/kubernetes/dynamic/client.py b/contrib/python/kubernetes/kubernetes/dynamic/client.py
index e4f2e1487eb..352e11a8092 100644
--- a/contrib/python/kubernetes/kubernetes/dynamic/client.py
+++ b/contrib/python/kubernetes/kubernetes/dynamic/client.py
@@ -195,10 +195,13 @@ class DynamicClient(object):
"""
if not watcher: watcher = watch.Watch()
+ # Use field selector to query for named instance so the watch parameter is handled properly.
+ if name:
+ field_selector = f"metadata.name={name}"
+
for event in watcher.stream(
resource.get,
namespace=namespace,
- name=name,
field_selector=field_selector,
label_selector=label_selector,
resource_version=resource_version,
diff --git a/contrib/python/kubernetes/kubernetes/stream/stream.py b/contrib/python/kubernetes/kubernetes/stream/stream.py
index 115a899b50b..e34dedfc3bf 100644
--- a/contrib/python/kubernetes/kubernetes/stream/stream.py
+++ b/contrib/python/kubernetes/kubernetes/stream/stream.py
@@ -30,9 +30,18 @@ def _websocket_request(websocket_request, force_kwargs, api_method, *args, **kwa
except AttributeError:
configuration = api_client.config
prev_request = api_client.request
+ binary = kwargs.pop('binary', False)
try:
- api_client.request = functools.partial(websocket_request, configuration)
- return api_method(*args, **kwargs)
+ api_client.request = functools.partial(websocket_request, configuration, binary=binary)
+ out = api_method(*args, **kwargs)
+ # The api_client insists on converting this to a string using its representation, so we have
+ # to do this dance to strip it of the b' prefix and ' suffix, encode it byte-per-byte (latin1),
+ # escape all of the unicode \x*'s, then encode it back byte-by-byte
+ # However, if _preload_content=False is passed, then the entire WSClient is returned instead
+ # of a response, and we want to leave it alone
+ if binary and kwargs.get('_preload_content', True):
+ out = out[2:-1].encode('latin1').decode('unicode_escape').encode('latin1')
+ return out
finally:
api_client.request = prev_request
diff --git a/contrib/python/kubernetes/kubernetes/stream/ws_client.py b/contrib/python/kubernetes/kubernetes/stream/ws_client.py
index 5ec8e7d4aaf..3c854ea741f 100644
--- a/contrib/python/kubernetes/kubernetes/stream/ws_client.py
+++ b/contrib/python/kubernetes/kubernetes/stream/ws_client.py
@@ -26,8 +26,9 @@ import time
import six
import yaml
+
from six.moves.urllib.parse import urlencode, urlparse, urlunparse
-from six import StringIO
+from six import StringIO, BytesIO
from websocket import WebSocket, ABNF, enableTrace
from base64 import urlsafe_b64decode
@@ -48,7 +49,7 @@ class _IgnoredIO:
class WSClient:
- def __init__(self, configuration, url, headers, capture_all):
+ def __init__(self, configuration, url, headers, capture_all, binary=False):
"""A websocket client with support for channels.
Exec command uses different channels for different streams. for
@@ -58,8 +59,10 @@ class WSClient:
"""
self._connected = False
self._channels = {}
+ self.binary = binary
+ self.newline = '\n' if not self.binary else b'\n'
if capture_all:
- self._all = StringIO()
+ self._all = StringIO() if not self.binary else BytesIO()
else:
self._all = _IgnoredIO()
self.sock = create_websocket(configuration, url, headers)
@@ -92,8 +95,8 @@ class WSClient:
while self.is_open() and time.time() - start < timeout:
if channel in self._channels:
data = self._channels[channel]
- if "\n" in data:
- index = data.find("\n")
+ if self.newline in data:
+ index = data.find(self.newline)
ret = data[:index]
data = data[index+1:]
if data:
@@ -197,10 +200,12 @@ class WSClient:
return
elif op_code == ABNF.OPCODE_BINARY or op_code == ABNF.OPCODE_TEXT:
data = frame.data
- if six.PY3:
+ if six.PY3 and not self.binary:
data = data.decode("utf-8", "replace")
if len(data) > 1:
- channel = ord(data[0])
+ channel = data[0]
+ if six.PY3 and not self.binary:
+ channel = ord(channel)
data = data[1:]
if data:
if channel in [STDOUT_CHANNEL, STDERR_CHANNEL]:
@@ -518,13 +523,17 @@ def websocket_call(configuration, _method, url, **kwargs):
_request_timeout = kwargs.get("_request_timeout", 60)
_preload_content = kwargs.get("_preload_content", True)
capture_all = kwargs.get("capture_all", True)
-
+ binary = kwargs.get('binary', False)
try:
- client = WSClient(configuration, url, headers, capture_all)
+ client = WSClient(configuration, url, headers, capture_all, binary=binary)
if not _preload_content:
return client
client.run_forever(timeout=_request_timeout)
- return WSResponse('%s' % ''.join(client.read_all()))
+ all = client.read_all()
+ if binary:
+ return WSResponse(all)
+ else:
+ return WSResponse('%s' % ''.join(all))
except (Exception, KeyboardInterrupt, SystemExit) as e:
raise ApiException(status=0, reason=str(e))
diff --git a/contrib/python/kubernetes/ya.make b/contrib/python/kubernetes/ya.make
index e22dda0bd4f..ba53c9fdae1 100644
--- a/contrib/python/kubernetes/ya.make
+++ b/contrib/python/kubernetes/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(29.0.0)
+VERSION(30.1.0)
LICENSE(Apache-2.0)
@@ -83,6 +83,8 @@ PY_SRCS(
kubernetes/client/api/storage_api.py
kubernetes/client/api/storage_v1_api.py
kubernetes/client/api/storage_v1alpha1_api.py
+ kubernetes/client/api/storagemigration_api.py
+ kubernetes/client/api/storagemigration_v1alpha1_api.py
kubernetes/client/api/version_api.py
kubernetes/client/api/well_known_api.py
kubernetes/client/api_client.py
@@ -119,7 +121,9 @@ PY_SRCS(
kubernetes/client/models/v1_api_service_spec.py
kubernetes/client/models/v1_api_service_status.py
kubernetes/client/models/v1_api_versions.py
+ kubernetes/client/models/v1_app_armor_profile.py
kubernetes/client/models/v1_attached_volume.py
+ kubernetes/client/models/v1_audit_annotation.py
kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py
kubernetes/client/models/v1_azure_disk_volume_source.py
kubernetes/client/models/v1_azure_file_persistent_volume_source.py
@@ -229,6 +233,7 @@ PY_SRCS(
kubernetes/client/models/v1_eviction.py
kubernetes/client/models/v1_exec_action.py
kubernetes/client/models/v1_exempt_priority_level_configuration.py
+ kubernetes/client/models/v1_expression_warning.py
kubernetes/client/models/v1_external_documentation.py
kubernetes/client/models/v1_fc_volume_source.py
kubernetes/client/models/v1_flex_persistent_volume_source.py
@@ -306,10 +311,12 @@ PY_SRCS(
kubernetes/client/models/v1_local_volume_source.py
kubernetes/client/models/v1_managed_fields_entry.py
kubernetes/client/models/v1_match_condition.py
+ kubernetes/client/models/v1_match_resources.py
kubernetes/client/models/v1_modify_volume_status.py
kubernetes/client/models/v1_mutating_webhook.py
kubernetes/client/models/v1_mutating_webhook_configuration.py
kubernetes/client/models/v1_mutating_webhook_configuration_list.py
+ kubernetes/client/models/v1_named_rule_with_operations.py
kubernetes/client/models/v1_namespace.py
kubernetes/client/models/v1_namespace_condition.py
kubernetes/client/models/v1_namespace_list.py
@@ -331,6 +338,8 @@ PY_SRCS(
kubernetes/client/models/v1_node_config_status.py
kubernetes/client/models/v1_node_daemon_endpoints.py
kubernetes/client/models/v1_node_list.py
+ kubernetes/client/models/v1_node_runtime_handler.py
+ kubernetes/client/models/v1_node_runtime_handler_features.py
kubernetes/client/models/v1_node_selector.py
kubernetes/client/models/v1_node_selector_requirement.py
kubernetes/client/models/v1_node_selector_term.py
@@ -345,6 +354,8 @@ PY_SRCS(
kubernetes/client/models/v1_object_reference.py
kubernetes/client/models/v1_overhead.py
kubernetes/client/models/v1_owner_reference.py
+ kubernetes/client/models/v1_param_kind.py
+ kubernetes/client/models/v1_param_ref.py
kubernetes/client/models/v1_persistent_volume.py
kubernetes/client/models/v1_persistent_volume_claim.py
kubernetes/client/models/v1_persistent_volume_claim_condition.py
@@ -454,6 +465,7 @@ PY_SRCS(
kubernetes/client/models/v1_secret_reference.py
kubernetes/client/models/v1_secret_volume_source.py
kubernetes/client/models/v1_security_context.py
+ kubernetes/client/models/v1_selectable_field.py
kubernetes/client/models/v1_self_subject_access_review.py
kubernetes/client/models/v1_self_subject_access_review_spec.py
kubernetes/client/models/v1_self_subject_review.py
@@ -492,6 +504,8 @@ PY_SRCS(
kubernetes/client/models/v1_subject_access_review_spec.py
kubernetes/client/models/v1_subject_access_review_status.py
kubernetes/client/models/v1_subject_rules_review_status.py
+ kubernetes/client/models/v1_success_policy.py
+ kubernetes/client/models/v1_success_policy_rule.py
kubernetes/client/models/v1_sysctl.py
kubernetes/client/models/v1_taint.py
kubernetes/client/models/v1_tcp_socket_action.py
@@ -504,15 +518,25 @@ PY_SRCS(
kubernetes/client/models/v1_topology_selector_label_requirement.py
kubernetes/client/models/v1_topology_selector_term.py
kubernetes/client/models/v1_topology_spread_constraint.py
+ kubernetes/client/models/v1_type_checking.py
kubernetes/client/models/v1_typed_local_object_reference.py
kubernetes/client/models/v1_typed_object_reference.py
kubernetes/client/models/v1_uncounted_terminated_pods.py
kubernetes/client/models/v1_user_info.py
kubernetes/client/models/v1_user_subject.py
+ kubernetes/client/models/v1_validating_admission_policy.py
+ kubernetes/client/models/v1_validating_admission_policy_binding.py
+ kubernetes/client/models/v1_validating_admission_policy_binding_list.py
+ kubernetes/client/models/v1_validating_admission_policy_binding_spec.py
+ kubernetes/client/models/v1_validating_admission_policy_list.py
+ kubernetes/client/models/v1_validating_admission_policy_spec.py
+ kubernetes/client/models/v1_validating_admission_policy_status.py
kubernetes/client/models/v1_validating_webhook.py
kubernetes/client/models/v1_validating_webhook_configuration.py
kubernetes/client/models/v1_validating_webhook_configuration_list.py
+ kubernetes/client/models/v1_validation.py
kubernetes/client/models/v1_validation_rule.py
+ kubernetes/client/models/v1_variable.py
kubernetes/client/models/v1_volume.py
kubernetes/client/models/v1_volume_attachment.py
kubernetes/client/models/v1_volume_attachment_list.py
@@ -522,6 +546,7 @@ PY_SRCS(
kubernetes/client/models/v1_volume_device.py
kubernetes/client/models/v1_volume_error.py
kubernetes/client/models/v1_volume_mount.py
+ kubernetes/client/models/v1_volume_mount_status.py
kubernetes/client/models/v1_volume_node_affinity.py
kubernetes/client/models/v1_volume_node_resources.py
kubernetes/client/models/v1_volume_projection.py
@@ -536,11 +561,13 @@ PY_SRCS(
kubernetes/client/models/v1alpha1_cluster_trust_bundle_list.py
kubernetes/client/models/v1alpha1_cluster_trust_bundle_spec.py
kubernetes/client/models/v1alpha1_expression_warning.py
+ kubernetes/client/models/v1alpha1_group_version_resource.py
kubernetes/client/models/v1alpha1_ip_address.py
kubernetes/client/models/v1alpha1_ip_address_list.py
kubernetes/client/models/v1alpha1_ip_address_spec.py
kubernetes/client/models/v1alpha1_match_condition.py
kubernetes/client/models/v1alpha1_match_resources.py
+ kubernetes/client/models/v1alpha1_migration_condition.py
kubernetes/client/models/v1alpha1_named_rule_with_operations.py
kubernetes/client/models/v1alpha1_param_kind.py
kubernetes/client/models/v1alpha1_param_ref.py
@@ -555,6 +582,10 @@ PY_SRCS(
kubernetes/client/models/v1alpha1_storage_version.py
kubernetes/client/models/v1alpha1_storage_version_condition.py
kubernetes/client/models/v1alpha1_storage_version_list.py
+ kubernetes/client/models/v1alpha1_storage_version_migration.py
+ kubernetes/client/models/v1alpha1_storage_version_migration_list.py
+ kubernetes/client/models/v1alpha1_storage_version_migration_spec.py
+ kubernetes/client/models/v1alpha1_storage_version_migration_status.py
kubernetes/client/models/v1alpha1_storage_version_status.py
kubernetes/client/models/v1alpha1_type_checking.py
kubernetes/client/models/v1alpha1_validating_admission_policy.py
@@ -569,6 +600,16 @@ PY_SRCS(
kubernetes/client/models/v1alpha1_volume_attributes_class.py
kubernetes/client/models/v1alpha1_volume_attributes_class_list.py
kubernetes/client/models/v1alpha2_allocation_result.py
+ kubernetes/client/models/v1alpha2_driver_allocation_result.py
+ kubernetes/client/models/v1alpha2_driver_requests.py
+ kubernetes/client/models/v1alpha2_named_resources_allocation_result.py
+ kubernetes/client/models/v1alpha2_named_resources_attribute.py
+ kubernetes/client/models/v1alpha2_named_resources_filter.py
+ kubernetes/client/models/v1alpha2_named_resources_instance.py
+ kubernetes/client/models/v1alpha2_named_resources_int_slice.py
+ kubernetes/client/models/v1alpha2_named_resources_request.py
+ kubernetes/client/models/v1alpha2_named_resources_resources.py
+ kubernetes/client/models/v1alpha2_named_resources_string_slice.py
kubernetes/client/models/v1alpha2_pod_scheduling_context.py
kubernetes/client/models/v1alpha2_pod_scheduling_context_list.py
kubernetes/client/models/v1alpha2_pod_scheduling_context_spec.py
@@ -576,6 +617,8 @@ PY_SRCS(
kubernetes/client/models/v1alpha2_resource_claim.py
kubernetes/client/models/v1alpha2_resource_claim_consumer_reference.py
kubernetes/client/models/v1alpha2_resource_claim_list.py
+ kubernetes/client/models/v1alpha2_resource_claim_parameters.py
+ kubernetes/client/models/v1alpha2_resource_claim_parameters_list.py
kubernetes/client/models/v1alpha2_resource_claim_parameters_reference.py
kubernetes/client/models/v1alpha2_resource_claim_scheduling_status.py
kubernetes/client/models/v1alpha2_resource_claim_spec.py
@@ -585,8 +628,16 @@ PY_SRCS(
kubernetes/client/models/v1alpha2_resource_claim_template_spec.py
kubernetes/client/models/v1alpha2_resource_class.py
kubernetes/client/models/v1alpha2_resource_class_list.py
+ kubernetes/client/models/v1alpha2_resource_class_parameters.py
+ kubernetes/client/models/v1alpha2_resource_class_parameters_list.py
kubernetes/client/models/v1alpha2_resource_class_parameters_reference.py
+ kubernetes/client/models/v1alpha2_resource_filter.py
kubernetes/client/models/v1alpha2_resource_handle.py
+ kubernetes/client/models/v1alpha2_resource_request.py
+ kubernetes/client/models/v1alpha2_resource_slice.py
+ kubernetes/client/models/v1alpha2_resource_slice_list.py
+ kubernetes/client/models/v1alpha2_structured_resource_handle.py
+ kubernetes/client/models/v1alpha2_vendor_parameters.py
kubernetes/client/models/v1beta1_audit_annotation.py
kubernetes/client/models/v1beta1_expression_warning.py
kubernetes/client/models/v1beta1_match_condition.py
diff --git a/contrib/python/prompt-toolkit/py3/.dist-info/METADATA b/contrib/python/prompt-toolkit/py3/.dist-info/METADATA
index 4ae5526507e..fcd3151a1c6 100644
--- a/contrib/python/prompt-toolkit/py3/.dist-info/METADATA
+++ b/contrib/python/prompt-toolkit/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: prompt_toolkit
-Version: 3.0.45
+Version: 3.0.46
Summary: Library for building powerful interactive command lines in Python
Home-page: https://github.com/prompt-toolkit/python-prompt-toolkit
Author: Jonathan Slenders
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/__init__.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/__init__.py
index 7b3e9bbe6d8..9f194f1b441 100644
--- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/__init__.py
+++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/__init__.py
@@ -28,7 +28,7 @@ from .formatted_text import ANSI, HTML
from .shortcuts import PromptSession, print_formatted_text, prompt
# Don't forget to update in `docs/conf.py`!
-__version__ = "3.0.45"
+__version__ = "3.0.46"
assert pep440.match(__version__)
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/application/current.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/application/current.py
index 908141a4767..7e2cf480ba8 100644
--- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/application/current.py
+++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/application/current.py
@@ -147,11 +147,17 @@ def create_app_session(
Like in the case of an Telnet/SSH server.
"""
# If no input/output is specified, fall back to the current input/output,
- # whatever that is.
+ # if there was one that was set/created for the current session.
+ # (Note that we check `_input`/`_output` and not `input`/`output`. This is
+ # because we don't want to accidently create a new input/output objects
+ # here and store it in the "parent" `AppSession`. Especially, when
+ # combining pytest's `capsys` fixture and `create_app_session`, sys.stdin
+ # and sys.stderr are patched for every test, so we don't want to leak
+ # those outputs object across `AppSession`s.)
if input is None:
- input = get_app_session().input
+ input = get_app_session()._input
if output is None:
- output = get_app_session().output
+ output = get_app_session()._output
# Create new `AppSession` and activate.
session = AppSession(input=input, output=output)
diff --git a/contrib/python/prompt-toolkit/py3/ya.make b/contrib/python/prompt-toolkit/py3/ya.make
index 53903b363a3..f8e402db87c 100644
--- a/contrib/python/prompt-toolkit/py3/ya.make
+++ b/contrib/python/prompt-toolkit/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(3.0.45)
+VERSION(3.0.46)
LICENSE(BSD-3-Clause)
diff --git a/contrib/python/responses/py3/.dist-info/METADATA b/contrib/python/responses/py3/.dist-info/METADATA
index c658b290658..c12dde8ca85 100644
--- a/contrib/python/responses/py3/.dist-info/METADATA
+++ b/contrib/python/responses/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: responses
-Version: 0.25.0
+Version: 0.25.2
Summary: A utility library for mocking out the `requests` Python library.
Home-page: https://github.com/getsentry/responses
Author: David Cramer
diff --git a/contrib/python/responses/py3/responses/__init__.py b/contrib/python/responses/py3/responses/__init__.py
index d990091fa6d..8c12345a60e 100644
--- a/contrib/python/responses/py3/responses/__init__.py
+++ b/contrib/python/responses/py3/responses/__init__.py
@@ -532,6 +532,7 @@ def _form_response(
body: Union[BufferedReader, BytesIO],
headers: Optional[Mapping[str, str]],
status: int,
+ request_method: Optional[str],
) -> HTTPResponse:
"""
Function to generate `urllib3.response.HTTPResponse` object.
@@ -566,6 +567,7 @@ def _form_response(
headers=headers,
original_response=orig_response, # type: ignore[arg-type] # See comment above
preload_content=False,
+ request_method=request_method,
)
@@ -632,7 +634,7 @@ class Response(BaseResponse):
content_length = len(body.getvalue())
headers["Content-Length"] = str(content_length)
- return _form_response(body, headers, status)
+ return _form_response(body, headers, status, request.method)
def __repr__(self) -> str:
return (
@@ -695,7 +697,7 @@ class CallbackResponse(BaseResponse):
body = _handle_body(body)
headers.extend(r_headers)
- return _form_response(body, headers, status)
+ return _form_response(body, headers, status, request.method)
class PassthroughResponse(BaseResponse):
@@ -1104,7 +1106,7 @@ class RequestsMock:
response = self._real_send(adapter, request, **kwargs) # type: ignore
else:
try:
- response = adapter.build_response( # type: ignore[no-untyped-call]
+ response = adapter.build_response( # type: ignore[assignment]
request, match.get_response(request)
)
except BaseException as response:
diff --git a/contrib/python/responses/py3/responses/matchers.py b/contrib/python/responses/py3/responses/matchers.py
index 20af1be693b..40f3a83dde1 100644
--- a/contrib/python/responses/py3/responses/matchers.py
+++ b/contrib/python/responses/py3/responses/matchers.py
@@ -18,45 +18,6 @@ from requests import PreparedRequest
from urllib3.util.url import parse_url
-def _create_key_val_str(input_dict: Union[Mapping[Any, Any], Any]) -> str:
- """
- Returns string of format {'key': val, 'key2': val2}
- Function is called recursively for nested dictionaries
-
- :param input_dict: dictionary to transform
- :return: (str) reformatted string
- """
-
- def list_to_str(input_list: List[str]) -> str:
- """
- Convert all list items to string.
- Function is called recursively for nested lists
- """
- converted_list = []
- for item in sorted(input_list, key=lambda x: str(x)):
- if isinstance(item, dict):
- item = _create_key_val_str(item)
- elif isinstance(item, list):
- item = list_to_str(item)
-
- converted_list.append(str(item))
- list_str = ", ".join(converted_list)
- return "[" + list_str + "]"
-
- items_list = []
- for key in sorted(input_dict.keys(), key=lambda x: str(x)):
- val = input_dict[key]
- if isinstance(val, dict):
- val = _create_key_val_str(val)
- elif isinstance(val, list):
- val = list_to_str(input_list=val)
-
- items_list.append(f"{key}: {val}")
-
- key_val_str = "{{{}}}".format(", ".join(items_list))
- return key_val_str
-
-
def _filter_dict_recursively(
dict1: Mapping[Any, Any], dict2: Mapping[Any, Any]
) -> Mapping[Any, Any]:
@@ -70,6 +31,21 @@ def _filter_dict_recursively(
return filtered_dict
+def body_matcher(params: str, *, allow_blank: bool = False) -> Callable[..., Any]:
+ def match(request: PreparedRequest) -> Tuple[bool, str]:
+ reason = ""
+ if isinstance(request.body, bytes):
+ request_body = request.body.decode("utf-8")
+ else:
+ request_body = str(request.body)
+ valid = True if request_body == params else False
+ if not valid:
+ reason = f"request.body doesn't match {params} doesn't match {request_body}"
+ return valid, reason
+
+ return match
+
+
def urlencoded_params_matcher(
params: Optional[Mapping[str, str]], *, allow_blank: bool = False
) -> Callable[..., Any]:
@@ -91,8 +67,8 @@ def urlencoded_params_matcher(
params_dict = params or {}
valid = params is None if request_body is None else params_dict == qsl_body
if not valid:
- reason = "request.body doesn't match: {} doesn't match {}".format(
- _create_key_val_str(qsl_body), _create_key_val_str(params_dict)
+ reason = (
+ f"request.body doesn't match: {qsl_body} doesn't match {params_dict}"
)
return valid, reason
@@ -146,13 +122,7 @@ def json_params_matcher(
valid = params is None if request_body is None else json_params == json_body
if not valid:
- if isinstance(json_body, dict) and isinstance(json_params, dict):
- reason = "request.body doesn't match: {} doesn't match {}".format(
- _create_key_val_str(json_body), _create_key_val_str(json_params)
- )
- else:
- reason = f"request.body doesn't match: {json_body} doesn't match {json_params}"
-
+ reason = f"request.body doesn't match: {json_body} doesn't match {json_params}"
if not strict_match:
reason += (
"\nNote: You use non-strict parameters check, "
@@ -234,10 +204,7 @@ def query_param_matcher(
valid = sorted(params_dict.items()) == sorted(request_params_dict.items())
if not valid:
- reason = "Parameters do not match. {} doesn't match {}".format(
- _create_key_val_str(request_params_dict),
- _create_key_val_str(params_dict),
- )
+ reason = f"Parameters do not match. {request_params_dict} doesn't match {params_dict}"
if not strict_match:
reason += (
"\nYou can use `strict_match=True` to do a strict parameters check."
@@ -267,9 +234,9 @@ def query_string_matcher(query: Optional[str]) -> Callable[..., Any]:
valid = not query if request_query is None else request_qsl == matcher_qsl
if not valid:
- reason = "Query string doesn't match. {} doesn't match {}".format(
- _create_key_val_str(dict(request_qsl)),
- _create_key_val_str(dict(matcher_qsl)),
+ reason = (
+ "Query string doesn't match. "
+ f"{dict(request_qsl)} doesn't match {dict(matcher_qsl)}"
)
return valid, reason
@@ -299,8 +266,8 @@ def request_kwargs_matcher(kwargs: Optional[Mapping[str, Any]]) -> Callable[...,
)
if not valid:
- reason = "Arguments don't match: {} doesn't match {}".format(
- _create_key_val_str(request_kwargs), _create_key_val_str(kwargs_dict)
+ reason = (
+ f"Arguments don't match: {request_kwargs} doesn't match {kwargs_dict}"
)
return valid, reason
@@ -436,8 +403,9 @@ def header_matcher(
valid = _compare_with_regex(request_headers)
if not valid:
- return False, "Headers do not match: {} doesn't match {}".format(
- _create_key_val_str(request_headers), _create_key_val_str(headers)
+ return (
+ False,
+ f"Headers do not match: {request_headers} doesn't match {headers}",
)
return valid, ""
diff --git a/contrib/python/responses/py3/ya.make b/contrib/python/responses/py3/ya.make
index ffa133acdfd..04114979d90 100644
--- a/contrib/python/responses/py3/ya.make
+++ b/contrib/python/responses/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(0.25.0)
+VERSION(0.25.2)
LICENSE(Apache-2.0)
diff --git a/contrib/python/retry/py2/.dist-info/METADATA b/contrib/python/retry/py2/.dist-info/METADATA
new file mode 100644
index 00000000000..c5986d2fea0
--- /dev/null
+++ b/contrib/python/retry/py2/.dist-info/METADATA
@@ -0,0 +1,184 @@
+Metadata-Version: 2.0
+Name: retry
+Version: 0.9.2
+Summary: Easy to use retry decorator.
+Home-page: https://github.com/invl/retry
+Author: invl
+Author-email: [email protected]
+License: Apache License 2.0
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Natural Language :: English
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development
+Requires-Dist: decorator (>=3.4.2)
+Requires-Dist: py (<2.0.0,>=1.4.26)
+
+retry
+=====
+
+.. image:: https://pypip.in/d/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+.. image:: https://pypip.in/v/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+.. image:: https://pypip.in/license/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+
+Easy to use retry decorator.
+
+
+Features
+--------
+
+- No external dependency (stdlib only).
+- (Optionally) Preserve function signatures (`pip install decorator`).
+- Original traceback, easy to debug.
+
+
+Installation
+------------
+
+.. code-block:: bash
+
+ $ pip install retry
+
+
+API
+---
+
+retry decorator
+^^^^^^^^^^^^^^^
+
+.. code:: python
+
+ def retry(exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1, jitter=0, logger=logging_logger):
+ """Return a retry decorator.
+
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ """
+
+Various retrying logic can be achieved by combination of arguments.
+
+
+Examples
+""""""""
+
+.. code:: python
+
+ from retry import retry
+
+.. code:: python
+
+ @retry()
+ def make_trouble():
+ '''Retry until succeed'''
+
+.. code:: python
+
+ @retry(ZeroDivisionError, tries=3, delay=2)
+ def make_trouble():
+ '''Retry on ZeroDivisionError, raise error after 3 attempts, sleep 2 seconds between attempts.'''
+
+.. code:: python
+
+ @retry((ValueError, TypeError), delay=1, backoff=2)
+ def make_trouble():
+ '''Retry on ValueError or TypeError, sleep 1, 2, 4, 8, ... seconds between attempts.'''
+
+.. code:: python
+
+ @retry((ValueError, TypeError), delay=1, backoff=2, max_delay=4)
+ def make_trouble():
+ '''Retry on ValueError or TypeError, sleep 1, 2, 4, 4, ... seconds between attempts.'''
+
+.. code:: python
+
+ @retry(ValueError, delay=1, jitter=1)
+ def make_trouble():
+ '''Retry on ValueError, sleep 1, 2, 3, 4, ... seconds between attempts.'''
+
+.. code:: python
+
+ # If you enable logging, you can get warnings like 'ValueError, retrying in
+ # 1 seconds'
+ if __name__ == '__main__':
+ import logging
+ logging.basicConfig()
+ make_trouble()
+
+retry_call
+^^^^^^^^^^
+
+.. code:: python
+
+ def retry_call(f, fargs=None, fkwargs=None, exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1,
+ jitter=0,
+ logger=logging_logger):
+ """
+ Calls a function and re-executes it if it failed.
+
+ :param f: the function to execute.
+ :param fargs: the positional arguments of the function to execute.
+ :param fkwargs: the named arguments of the function to execute.
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: the result of the f function.
+ """
+
+This is very similar to the decorator, except that it takes a function and its arguments as parameters. The use case behind it is to be able to dynamically adjust the retry arguments.
+
+.. code:: python
+
+ import requests
+
+ from retry.api import retry_call
+
+
+ def make_trouble(service, info=None):
+ if not info:
+ info = ''
+ r = requests.get(service + info)
+ return r.text
+
+
+ def what_is_my_ip(approach=None):
+ if approach == "optimistic":
+ tries = 1
+ elif approach == "conservative":
+ tries = 3
+ else:
+ # skeptical
+ tries = -1
+ result = retry_call(make_trouble, fargs=["http://ipinfo.io/"], fkwargs={"info": "ip"}, tries=tries)
+ print(result)
+
+ what_is_my_ip("conservative")
+
+
+
diff --git a/contrib/python/retry/py2/.dist-info/top_level.txt b/contrib/python/retry/py2/.dist-info/top_level.txt
new file mode 100644
index 00000000000..77428f7b73e
--- /dev/null
+++ b/contrib/python/retry/py2/.dist-info/top_level.txt
@@ -0,0 +1 @@
+retry
diff --git a/contrib/python/retry/py2/AUTHORS b/contrib/python/retry/py2/AUTHORS
new file mode 100644
index 00000000000..573ff535618
--- /dev/null
+++ b/contrib/python/retry/py2/AUTHORS
@@ -0,0 +1,8 @@
+Richard O'Dwyer <[email protected]>
+Rémy Greinhofer <[email protected]>
+williara <[email protected]>
diff --git a/contrib/python/retry/py2/LICENSE b/contrib/python/retry/py2/LICENSE
new file mode 100644
index 00000000000..3a2cc3260e9
--- /dev/null
+++ b/contrib/python/retry/py2/LICENSE
@@ -0,0 +1,13 @@
+Copyright 2014 invl
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/contrib/python/retry/py2/README.rst b/contrib/python/retry/py2/README.rst
new file mode 100644
index 00000000000..e8f78b15e81
--- /dev/null
+++ b/contrib/python/retry/py2/README.rst
@@ -0,0 +1,160 @@
+retry
+=====
+
+.. image:: https://pypip.in/d/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+.. image:: https://pypip.in/v/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+.. image:: https://pypip.in/license/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+
+Easy to use retry decorator.
+
+
+Features
+--------
+
+- No external dependency (stdlib only).
+- (Optionally) Preserve function signatures (`pip install decorator`).
+- Original traceback, easy to debug.
+
+
+Installation
+------------
+
+.. code-block:: bash
+
+ $ pip install retry
+
+
+API
+---
+
+retry decorator
+^^^^^^^^^^^^^^^
+
+.. code:: python
+
+ def retry(exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1, jitter=0, logger=logging_logger):
+ """Return a retry decorator.
+
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ """
+
+Various retrying logic can be achieved by combination of arguments.
+
+
+Examples
+""""""""
+
+.. code:: python
+
+ from retry import retry
+
+.. code:: python
+
+ @retry()
+ def make_trouble():
+ '''Retry until succeed'''
+
+.. code:: python
+
+ @retry(ZeroDivisionError, tries=3, delay=2)
+ def make_trouble():
+ '''Retry on ZeroDivisionError, raise error after 3 attempts, sleep 2 seconds between attempts.'''
+
+.. code:: python
+
+ @retry((ValueError, TypeError), delay=1, backoff=2)
+ def make_trouble():
+ '''Retry on ValueError or TypeError, sleep 1, 2, 4, 8, ... seconds between attempts.'''
+
+.. code:: python
+
+ @retry((ValueError, TypeError), delay=1, backoff=2, max_delay=4)
+ def make_trouble():
+ '''Retry on ValueError or TypeError, sleep 1, 2, 4, 4, ... seconds between attempts.'''
+
+.. code:: python
+
+ @retry(ValueError, delay=1, jitter=1)
+ def make_trouble():
+ '''Retry on ValueError, sleep 1, 2, 3, 4, ... seconds between attempts.'''
+
+.. code:: python
+
+ # If you enable logging, you can get warnings like 'ValueError, retrying in
+ # 1 seconds'
+ if __name__ == '__main__':
+ import logging
+ logging.basicConfig()
+ make_trouble()
+
+retry_call
+^^^^^^^^^^
+
+.. code:: python
+
+ def retry_call(f, fargs=None, fkwargs=None, exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1,
+ jitter=0,
+ logger=logging_logger):
+ """
+ Calls a function and re-executes it if it failed.
+
+ :param f: the function to execute.
+ :param fargs: the positional arguments of the function to execute.
+ :param fkwargs: the named arguments of the function to execute.
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: the result of the f function.
+ """
+
+This is very similar to the decorator, except that it takes a function and its arguments as parameters. The use case behind it is to be able to dynamically adjust the retry arguments.
+
+.. code:: python
+
+ import requests
+
+ from retry.api import retry_call
+
+
+ def make_trouble(service, info=None):
+ if not info:
+ info = ''
+ r = requests.get(service + info)
+ return r.text
+
+
+ def what_is_my_ip(approach=None):
+ if approach == "optimistic":
+ tries = 1
+ elif approach == "conservative":
+ tries = 3
+ else:
+ # skeptical
+ tries = -1
+ result = retry_call(make_trouble, fargs=["http://ipinfo.io/"], fkwargs={"info": "ip"}, tries=tries)
+ print(result)
+
+ what_is_my_ip("conservative")
+
+
+
diff --git a/contrib/python/retry/py2/patches/01-return-retry_call.patch b/contrib/python/retry/py2/patches/01-return-retry_call.patch
new file mode 100644
index 00000000000..a683760a334
--- /dev/null
+++ b/contrib/python/retry/py2/patches/01-return-retry_call.patch
@@ -0,0 +1,13 @@
+--- contrib/python/retry/py2/retry/__init__.py (index)
++++ contrib/python/retry/py2/retry/__init__.py (working tree)
+@@ -1,8 +1,8 @@
+-__all__ = ['retry']
++__all__ = ['retry', 'retry_call']
+
+ import logging
+
+-from .api import retry
++from .api import retry, retry_call
+
+
+ # Set default logging handler to avoid "No handler found" warnings.
diff --git a/contrib/python/retry/py2/retry/__init__.py b/contrib/python/retry/py2/retry/__init__.py
new file mode 100644
index 00000000000..1dd57053566
--- /dev/null
+++ b/contrib/python/retry/py2/retry/__init__.py
@@ -0,0 +1,18 @@
+__all__ = ['retry', 'retry_call']
+
+import logging
+
+from .api import retry, retry_call
+
+
+# Set default logging handler to avoid "No handler found" warnings.
+try: # Python 2.7+
+ from logging import NullHandler
+except ImportError:
+ class NullHandler(logging.Handler):
+
+ def emit(self, record):
+ pass
+
+log = logging.getLogger(__name__)
+log.addHandler(NullHandler())
diff --git a/contrib/python/retry/py2/retry/api.py b/contrib/python/retry/py2/retry/api.py
new file mode 100644
index 00000000000..245e4e4c083
--- /dev/null
+++ b/contrib/python/retry/py2/retry/api.py
@@ -0,0 +1,101 @@
+import logging
+import random
+import time
+
+from functools import partial
+
+from retry.compat import decorator
+
+
+logging_logger = logging.getLogger(__name__)
+
+
+def __retry_internal(f, exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1, jitter=0,
+ logger=logging_logger):
+ """
+ Executes a function and retries it if it failed.
+
+ :param f: the function to execute.
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: the result of the f function.
+ """
+ _tries, _delay = tries, delay
+ while _tries:
+ try:
+ return f()
+ except exceptions as e:
+ _tries -= 1
+ if not _tries:
+ raise
+
+ if logger is not None:
+ logger.warning('%s, retrying in %s seconds...', e, _delay)
+
+ time.sleep(_delay)
+ _delay *= backoff
+
+ if isinstance(jitter, tuple):
+ _delay += random.uniform(*jitter)
+ else:
+ _delay += jitter
+
+ if max_delay is not None:
+ _delay = min(_delay, max_delay)
+
+
+def retry(exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1, jitter=0, logger=logging_logger):
+ """Returns a retry decorator.
+
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: a retry decorator.
+ """
+
+ @decorator
+ def retry_decorator(f, *fargs, **fkwargs):
+ args = fargs if fargs else list()
+ kwargs = fkwargs if fkwargs else dict()
+ return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,
+ logger)
+
+ return retry_decorator
+
+
+def retry_call(f, fargs=None, fkwargs=None, exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1,
+ jitter=0,
+ logger=logging_logger):
+ """
+ Calls a function and re-executes it if it failed.
+
+ :param f: the function to execute.
+ :param fargs: the positional arguments of the function to execute.
+ :param fkwargs: the named arguments of the function to execute.
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: the result of the f function.
+ """
+ args = fargs if fargs else list()
+ kwargs = fkwargs if fkwargs else dict()
+ return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, logger)
diff --git a/contrib/python/retry/py2/retry/compat.py b/contrib/python/retry/py2/retry/compat.py
new file mode 100644
index 00000000000..f39510d1716
--- /dev/null
+++ b/contrib/python/retry/py2/retry/compat.py
@@ -0,0 +1,18 @@
+import functools
+
+
+try:
+ from decorator import decorator
+except ImportError:
+ def decorator(caller):
+ """ Turns caller into a decorator.
+ Unlike decorator module, function signature is not preserved.
+
+ :param caller: caller(f, *args, **kwargs)
+ """
+ def decor(f):
+ @functools.wraps(f)
+ def wrapper(*args, **kwargs):
+ return caller(f, *args, **kwargs)
+ return wrapper
+ return decor
diff --git a/contrib/python/retry/py2/retry/tests/__init__.py b/contrib/python/retry/py2/retry/tests/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/contrib/python/retry/py2/retry/tests/__init__.py
diff --git a/contrib/python/retry/py2/retry/tests/test_retry.py b/contrib/python/retry/py2/retry/tests/test_retry.py
new file mode 100644
index 00000000000..64f45cd89db
--- /dev/null
+++ b/contrib/python/retry/py2/retry/tests/test_retry.py
@@ -0,0 +1,185 @@
+try:
+ from unittest.mock import create_autospec
+except ImportError:
+ from mock import create_autospec
+
+try:
+ from unittest.mock import MagicMock
+except ImportError:
+ from mock import MagicMock
+
+import time
+
+import pytest
+
+from retry.api import retry_call
+from retry.api import retry
+
+
+def test_retry(monkeypatch):
+ mock_sleep_time = [0]
+
+ def mock_sleep(seconds):
+ mock_sleep_time[0] += seconds
+
+ monkeypatch.setattr(time, 'sleep', mock_sleep)
+
+ hit = [0]
+
+ tries = 5
+ delay = 1
+ backoff = 2
+
+ @retry(tries=tries, delay=delay, backoff=backoff)
+ def f():
+ hit[0] += 1
+ 1 / 0
+
+ with pytest.raises(ZeroDivisionError):
+ f()
+ assert hit[0] == tries
+ assert mock_sleep_time[0] == sum(
+ delay * backoff ** i for i in range(tries - 1))
+
+
+def test_tries_inf():
+ hit = [0]
+ target = 10
+
+ @retry(tries=float('inf'))
+ def f():
+ hit[0] += 1
+ if hit[0] == target:
+ return target
+ else:
+ raise ValueError
+ assert f() == target
+
+
+def test_tries_minus1():
+ hit = [0]
+ target = 10
+
+ @retry(tries=-1)
+ def f():
+ hit[0] += 1
+ if hit[0] == target:
+ return target
+ else:
+ raise ValueError
+ assert f() == target
+
+
+def test_max_delay(monkeypatch):
+ mock_sleep_time = [0]
+
+ def mock_sleep(seconds):
+ mock_sleep_time[0] += seconds
+
+ monkeypatch.setattr(time, 'sleep', mock_sleep)
+
+ hit = [0]
+
+ tries = 5
+ delay = 1
+ backoff = 2
+ max_delay = delay # Never increase delay
+
+ @retry(tries=tries, delay=delay, max_delay=max_delay, backoff=backoff)
+ def f():
+ hit[0] += 1
+ 1 / 0
+
+ with pytest.raises(ZeroDivisionError):
+ f()
+ assert hit[0] == tries
+ assert mock_sleep_time[0] == delay * (tries - 1)
+
+
+def test_fixed_jitter(monkeypatch):
+ mock_sleep_time = [0]
+
+ def mock_sleep(seconds):
+ mock_sleep_time[0] += seconds
+
+ monkeypatch.setattr(time, 'sleep', mock_sleep)
+
+ hit = [0]
+
+ tries = 10
+ jitter = 1
+
+ @retry(tries=tries, jitter=jitter)
+ def f():
+ hit[0] += 1
+ 1 / 0
+
+ with pytest.raises(ZeroDivisionError):
+ f()
+ assert hit[0] == tries
+ assert mock_sleep_time[0] == sum(range(tries - 1))
+
+
+def test_retry_call():
+ f_mock = MagicMock(side_effect=RuntimeError)
+ tries = 2
+ try:
+ retry_call(f_mock, exceptions=RuntimeError, tries=tries)
+ except RuntimeError:
+ pass
+
+ assert f_mock.call_count == tries
+
+
+def test_retry_call_2():
+ side_effect = [RuntimeError, RuntimeError, 3]
+ f_mock = MagicMock(side_effect=side_effect)
+ tries = 5
+ result = None
+ try:
+ result = retry_call(f_mock, exceptions=RuntimeError, tries=tries)
+ except RuntimeError:
+ pass
+
+ assert result == 3
+ assert f_mock.call_count == len(side_effect)
+
+
+def test_retry_call_with_args():
+
+ def f(value=0):
+ if value < 0:
+ return value
+ else:
+ raise RuntimeError
+
+ return_value = -1
+ result = None
+ f_mock = MagicMock(spec=f, return_value=return_value)
+ try:
+ result = retry_call(f_mock, fargs=[return_value])
+ except RuntimeError:
+ pass
+
+ assert result == return_value
+ assert f_mock.call_count == 1
+
+
+def test_retry_call_with_kwargs():
+
+ def f(value=0):
+ if value < 0:
+ return value
+ else:
+ raise RuntimeError
+
+ kwargs = {'value': -1}
+ result = None
+ f_mock = MagicMock(spec=f, return_value=kwargs['value'])
+ try:
+ result = retry_call(f_mock, fkwargs=kwargs)
+ except RuntimeError:
+ pass
+
+ assert result == kwargs['value']
+ assert f_mock.call_count == 1
diff --git a/contrib/python/retry/py2/tests/ya.make b/contrib/python/retry/py2/tests/ya.make
new file mode 100644
index 00000000000..381b71c8c49
--- /dev/null
+++ b/contrib/python/retry/py2/tests/ya.make
@@ -0,0 +1,23 @@
+PY2TEST()
+
+SUBSCRIBER(g:python-contrib)
+
+PEERDIR(
+ contrib/python/retry
+)
+
+IF (PYTHON2)
+ PEERDIR(
+ contrib/python/mock
+ )
+ENDIF()
+
+SRCDIR(contrib/python/retry/py2/retry/tests)
+
+TEST_SRCS(
+ test_retry.py
+)
+
+NO_LINT()
+
+END()
diff --git a/contrib/python/retry/py2/ya.make b/contrib/python/retry/py2/ya.make
new file mode 100644
index 00000000000..97cf4602015
--- /dev/null
+++ b/contrib/python/retry/py2/ya.make
@@ -0,0 +1,35 @@
+# Generated by devtools/yamaker (pypi).
+
+PY2_LIBRARY()
+
+SUBSCRIBER(g:python-contrib)
+
+VERSION(0.9.2)
+
+LICENSE(Apache-2.0)
+
+PEERDIR(
+ contrib/python/decorator
+ contrib/python/py
+)
+
+NO_LINT()
+
+PY_SRCS(
+ TOP_LEVEL
+ retry/__init__.py
+ retry/api.py
+ retry/compat.py
+)
+
+RESOURCE_FILES(
+ PREFIX contrib/python/retry/py2/
+ .dist-info/METADATA
+ .dist-info/top_level.txt
+)
+
+END()
+
+RECURSE_FOR_TESTS(
+ tests
+)
diff --git a/contrib/python/retry/py3/.dist-info/METADATA b/contrib/python/retry/py3/.dist-info/METADATA
new file mode 100644
index 00000000000..c5986d2fea0
--- /dev/null
+++ b/contrib/python/retry/py3/.dist-info/METADATA
@@ -0,0 +1,184 @@
+Metadata-Version: 2.0
+Name: retry
+Version: 0.9.2
+Summary: Easy to use retry decorator.
+Home-page: https://github.com/invl/retry
+Author: invl
+Author-email: [email protected]
+License: Apache License 2.0
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Natural Language :: English
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development
+Requires-Dist: decorator (>=3.4.2)
+Requires-Dist: py (<2.0.0,>=1.4.26)
+
+retry
+=====
+
+.. image:: https://pypip.in/d/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+.. image:: https://pypip.in/v/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+.. image:: https://pypip.in/license/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+
+Easy to use retry decorator.
+
+
+Features
+--------
+
+- No external dependency (stdlib only).
+- (Optionally) Preserve function signatures (`pip install decorator`).
+- Original traceback, easy to debug.
+
+
+Installation
+------------
+
+.. code-block:: bash
+
+ $ pip install retry
+
+
+API
+---
+
+retry decorator
+^^^^^^^^^^^^^^^
+
+.. code:: python
+
+ def retry(exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1, jitter=0, logger=logging_logger):
+ """Return a retry decorator.
+
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ """
+
+Various retrying logic can be achieved by combination of arguments.
+
+
+Examples
+""""""""
+
+.. code:: python
+
+ from retry import retry
+
+.. code:: python
+
+ @retry()
+ def make_trouble():
+ '''Retry until succeed'''
+
+.. code:: python
+
+ @retry(ZeroDivisionError, tries=3, delay=2)
+ def make_trouble():
+ '''Retry on ZeroDivisionError, raise error after 3 attempts, sleep 2 seconds between attempts.'''
+
+.. code:: python
+
+ @retry((ValueError, TypeError), delay=1, backoff=2)
+ def make_trouble():
+ '''Retry on ValueError or TypeError, sleep 1, 2, 4, 8, ... seconds between attempts.'''
+
+.. code:: python
+
+ @retry((ValueError, TypeError), delay=1, backoff=2, max_delay=4)
+ def make_trouble():
+ '''Retry on ValueError or TypeError, sleep 1, 2, 4, 4, ... seconds between attempts.'''
+
+.. code:: python
+
+ @retry(ValueError, delay=1, jitter=1)
+ def make_trouble():
+ '''Retry on ValueError, sleep 1, 2, 3, 4, ... seconds between attempts.'''
+
+.. code:: python
+
+ # If you enable logging, you can get warnings like 'ValueError, retrying in
+ # 1 seconds'
+ if __name__ == '__main__':
+ import logging
+ logging.basicConfig()
+ make_trouble()
+
+retry_call
+^^^^^^^^^^
+
+.. code:: python
+
+ def retry_call(f, fargs=None, fkwargs=None, exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1,
+ jitter=0,
+ logger=logging_logger):
+ """
+ Calls a function and re-executes it if it failed.
+
+ :param f: the function to execute.
+ :param fargs: the positional arguments of the function to execute.
+ :param fkwargs: the named arguments of the function to execute.
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: the result of the f function.
+ """
+
+This is very similar to the decorator, except that it takes a function and its arguments as parameters. The use case behind it is to be able to dynamically adjust the retry arguments.
+
+.. code:: python
+
+ import requests
+
+ from retry.api import retry_call
+
+
+ def make_trouble(service, info=None):
+ if not info:
+ info = ''
+ r = requests.get(service + info)
+ return r.text
+
+
+ def what_is_my_ip(approach=None):
+ if approach == "optimistic":
+ tries = 1
+ elif approach == "conservative":
+ tries = 3
+ else:
+ # skeptical
+ tries = -1
+ result = retry_call(make_trouble, fargs=["http://ipinfo.io/"], fkwargs={"info": "ip"}, tries=tries)
+ print(result)
+
+ what_is_my_ip("conservative")
+
+
+
diff --git a/contrib/python/retry/py3/.dist-info/top_level.txt b/contrib/python/retry/py3/.dist-info/top_level.txt
new file mode 100644
index 00000000000..77428f7b73e
--- /dev/null
+++ b/contrib/python/retry/py3/.dist-info/top_level.txt
@@ -0,0 +1 @@
+retry
diff --git a/contrib/python/retry/py3/AUTHORS b/contrib/python/retry/py3/AUTHORS
new file mode 100644
index 00000000000..573ff535618
--- /dev/null
+++ b/contrib/python/retry/py3/AUTHORS
@@ -0,0 +1,8 @@
+Richard O'Dwyer <[email protected]>
+Rémy Greinhofer <[email protected]>
+williara <[email protected]>
diff --git a/contrib/python/retry/py3/LICENSE b/contrib/python/retry/py3/LICENSE
new file mode 100644
index 00000000000..3a2cc3260e9
--- /dev/null
+++ b/contrib/python/retry/py3/LICENSE
@@ -0,0 +1,13 @@
+Copyright 2014 invl
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/contrib/python/retry/py3/README.rst b/contrib/python/retry/py3/README.rst
new file mode 100644
index 00000000000..e8f78b15e81
--- /dev/null
+++ b/contrib/python/retry/py3/README.rst
@@ -0,0 +1,160 @@
+retry
+=====
+
+.. image:: https://pypip.in/d/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+.. image:: https://pypip.in/v/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+.. image:: https://pypip.in/license/retry/badge.png
+ :target: https://pypi.python.org/pypi/retry/
+
+
+Easy to use retry decorator.
+
+
+Features
+--------
+
+- No external dependency (stdlib only).
+- (Optionally) Preserve function signatures (`pip install decorator`).
+- Original traceback, easy to debug.
+
+
+Installation
+------------
+
+.. code-block:: bash
+
+ $ pip install retry
+
+
+API
+---
+
+retry decorator
+^^^^^^^^^^^^^^^
+
+.. code:: python
+
+ def retry(exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1, jitter=0, logger=logging_logger):
+ """Return a retry decorator.
+
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ """
+
+Various retrying logic can be achieved by combination of arguments.
+
+
+Examples
+""""""""
+
+.. code:: python
+
+ from retry import retry
+
+.. code:: python
+
+ @retry()
+ def make_trouble():
+ '''Retry until succeed'''
+
+.. code:: python
+
+ @retry(ZeroDivisionError, tries=3, delay=2)
+ def make_trouble():
+ '''Retry on ZeroDivisionError, raise error after 3 attempts, sleep 2 seconds between attempts.'''
+
+.. code:: python
+
+ @retry((ValueError, TypeError), delay=1, backoff=2)
+ def make_trouble():
+ '''Retry on ValueError or TypeError, sleep 1, 2, 4, 8, ... seconds between attempts.'''
+
+.. code:: python
+
+ @retry((ValueError, TypeError), delay=1, backoff=2, max_delay=4)
+ def make_trouble():
+ '''Retry on ValueError or TypeError, sleep 1, 2, 4, 4, ... seconds between attempts.'''
+
+.. code:: python
+
+ @retry(ValueError, delay=1, jitter=1)
+ def make_trouble():
+ '''Retry on ValueError, sleep 1, 2, 3, 4, ... seconds between attempts.'''
+
+.. code:: python
+
+ # If you enable logging, you can get warnings like 'ValueError, retrying in
+ # 1 seconds'
+ if __name__ == '__main__':
+ import logging
+ logging.basicConfig()
+ make_trouble()
+
+retry_call
+^^^^^^^^^^
+
+.. code:: python
+
+ def retry_call(f, fargs=None, fkwargs=None, exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1,
+ jitter=0,
+ logger=logging_logger):
+ """
+ Calls a function and re-executes it if it failed.
+
+ :param f: the function to execute.
+ :param fargs: the positional arguments of the function to execute.
+ :param fkwargs: the named arguments of the function to execute.
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: the result of the f function.
+ """
+
+This is very similar to the decorator, except that it takes a function and its arguments as parameters. The use case behind it is to be able to dynamically adjust the retry arguments.
+
+.. code:: python
+
+ import requests
+
+ from retry.api import retry_call
+
+
+ def make_trouble(service, info=None):
+ if not info:
+ info = ''
+ r = requests.get(service + info)
+ return r.text
+
+
+ def what_is_my_ip(approach=None):
+ if approach == "optimistic":
+ tries = 1
+ elif approach == "conservative":
+ tries = 3
+ else:
+ # skeptical
+ tries = -1
+ result = retry_call(make_trouble, fargs=["http://ipinfo.io/"], fkwargs={"info": "ip"}, tries=tries)
+ print(result)
+
+ what_is_my_ip("conservative")
+
+
+
diff --git a/contrib/python/retry/py3/patches/01-return-retry_call.patch b/contrib/python/retry/py3/patches/01-return-retry_call.patch
new file mode 100644
index 00000000000..b849f59947d
--- /dev/null
+++ b/contrib/python/retry/py3/patches/01-return-retry_call.patch
@@ -0,0 +1,13 @@
+--- contrib/python/retry/py3/retry/__init__.py (index)
++++ contrib/python/retry/py3/retry/__init__.py (working tree)
+@@ -1,8 +1,8 @@
+-__all__ = ['retry']
++__all__ = ['retry', 'retry_call']
+
+ import logging
+
+-from .api import retry
++from .api import retry, retry_call
+
+
+ # Set default logging handler to avoid "No handler found" warnings.
diff --git a/contrib/python/retry/py3/retry/__init__.py b/contrib/python/retry/py3/retry/__init__.py
new file mode 100644
index 00000000000..1dd57053566
--- /dev/null
+++ b/contrib/python/retry/py3/retry/__init__.py
@@ -0,0 +1,18 @@
+__all__ = ['retry', 'retry_call']
+
+import logging
+
+from .api import retry, retry_call
+
+
+# Set default logging handler to avoid "No handler found" warnings.
+try: # Python 2.7+
+ from logging import NullHandler
+except ImportError:
+ class NullHandler(logging.Handler):
+
+ def emit(self, record):
+ pass
+
+log = logging.getLogger(__name__)
+log.addHandler(NullHandler())
diff --git a/contrib/python/retry/py3/retry/api.py b/contrib/python/retry/py3/retry/api.py
new file mode 100644
index 00000000000..245e4e4c083
--- /dev/null
+++ b/contrib/python/retry/py3/retry/api.py
@@ -0,0 +1,101 @@
+import logging
+import random
+import time
+
+from functools import partial
+
+from retry.compat import decorator
+
+
+logging_logger = logging.getLogger(__name__)
+
+
+def __retry_internal(f, exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1, jitter=0,
+ logger=logging_logger):
+ """
+ Executes a function and retries it if it failed.
+
+ :param f: the function to execute.
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: the result of the f function.
+ """
+ _tries, _delay = tries, delay
+ while _tries:
+ try:
+ return f()
+ except exceptions as e:
+ _tries -= 1
+ if not _tries:
+ raise
+
+ if logger is not None:
+ logger.warning('%s, retrying in %s seconds...', e, _delay)
+
+ time.sleep(_delay)
+ _delay *= backoff
+
+ if isinstance(jitter, tuple):
+ _delay += random.uniform(*jitter)
+ else:
+ _delay += jitter
+
+ if max_delay is not None:
+ _delay = min(_delay, max_delay)
+
+
+def retry(exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1, jitter=0, logger=logging_logger):
+ """Returns a retry decorator.
+
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: a retry decorator.
+ """
+
+ @decorator
+ def retry_decorator(f, *fargs, **fkwargs):
+ args = fargs if fargs else list()
+ kwargs = fkwargs if fkwargs else dict()
+ return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,
+ logger)
+
+ return retry_decorator
+
+
+def retry_call(f, fargs=None, fkwargs=None, exceptions=Exception, tries=-1, delay=0, max_delay=None, backoff=1,
+ jitter=0,
+ logger=logging_logger):
+ """
+ Calls a function and re-executes it if it failed.
+
+ :param f: the function to execute.
+ :param fargs: the positional arguments of the function to execute.
+ :param fkwargs: the named arguments of the function to execute.
+ :param exceptions: an exception or a tuple of exceptions to catch. default: Exception.
+ :param tries: the maximum number of attempts. default: -1 (infinite).
+ :param delay: initial delay between attempts. default: 0.
+ :param max_delay: the maximum value of delay. default: None (no limit).
+ :param backoff: multiplier applied to delay between attempts. default: 1 (no backoff).
+ :param jitter: extra seconds added to delay between attempts. default: 0.
+ fixed if a number, random if a range tuple (min, max)
+ :param logger: logger.warning(fmt, error, delay) will be called on failed attempts.
+ default: retry.logging_logger. if None, logging is disabled.
+ :returns: the result of the f function.
+ """
+ args = fargs if fargs else list()
+ kwargs = fkwargs if fkwargs else dict()
+ return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter, logger)
diff --git a/contrib/python/retry/py3/retry/compat.py b/contrib/python/retry/py3/retry/compat.py
new file mode 100644
index 00000000000..f39510d1716
--- /dev/null
+++ b/contrib/python/retry/py3/retry/compat.py
@@ -0,0 +1,18 @@
+import functools
+
+
+try:
+ from decorator import decorator
+except ImportError:
+ def decorator(caller):
+ """ Turns caller into a decorator.
+ Unlike decorator module, function signature is not preserved.
+
+ :param caller: caller(f, *args, **kwargs)
+ """
+ def decor(f):
+ @functools.wraps(f)
+ def wrapper(*args, **kwargs):
+ return caller(f, *args, **kwargs)
+ return wrapper
+ return decor
diff --git a/contrib/python/retry/py3/retry/tests/__init__.py b/contrib/python/retry/py3/retry/tests/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/contrib/python/retry/py3/retry/tests/__init__.py
diff --git a/contrib/python/retry/py3/retry/tests/test_retry.py b/contrib/python/retry/py3/retry/tests/test_retry.py
new file mode 100644
index 00000000000..64f45cd89db
--- /dev/null
+++ b/contrib/python/retry/py3/retry/tests/test_retry.py
@@ -0,0 +1,185 @@
+try:
+ from unittest.mock import create_autospec
+except ImportError:
+ from mock import create_autospec
+
+try:
+ from unittest.mock import MagicMock
+except ImportError:
+ from mock import MagicMock
+
+import time
+
+import pytest
+
+from retry.api import retry_call
+from retry.api import retry
+
+
+def test_retry(monkeypatch):
+ mock_sleep_time = [0]
+
+ def mock_sleep(seconds):
+ mock_sleep_time[0] += seconds
+
+ monkeypatch.setattr(time, 'sleep', mock_sleep)
+
+ hit = [0]
+
+ tries = 5
+ delay = 1
+ backoff = 2
+
+ @retry(tries=tries, delay=delay, backoff=backoff)
+ def f():
+ hit[0] += 1
+ 1 / 0
+
+ with pytest.raises(ZeroDivisionError):
+ f()
+ assert hit[0] == tries
+ assert mock_sleep_time[0] == sum(
+ delay * backoff ** i for i in range(tries - 1))
+
+
+def test_tries_inf():
+ hit = [0]
+ target = 10
+
+ @retry(tries=float('inf'))
+ def f():
+ hit[0] += 1
+ if hit[0] == target:
+ return target
+ else:
+ raise ValueError
+ assert f() == target
+
+
+def test_tries_minus1():
+ hit = [0]
+ target = 10
+
+ @retry(tries=-1)
+ def f():
+ hit[0] += 1
+ if hit[0] == target:
+ return target
+ else:
+ raise ValueError
+ assert f() == target
+
+
+def test_max_delay(monkeypatch):
+ mock_sleep_time = [0]
+
+ def mock_sleep(seconds):
+ mock_sleep_time[0] += seconds
+
+ monkeypatch.setattr(time, 'sleep', mock_sleep)
+
+ hit = [0]
+
+ tries = 5
+ delay = 1
+ backoff = 2
+ max_delay = delay # Never increase delay
+
+ @retry(tries=tries, delay=delay, max_delay=max_delay, backoff=backoff)
+ def f():
+ hit[0] += 1
+ 1 / 0
+
+ with pytest.raises(ZeroDivisionError):
+ f()
+ assert hit[0] == tries
+ assert mock_sleep_time[0] == delay * (tries - 1)
+
+
+def test_fixed_jitter(monkeypatch):
+ mock_sleep_time = [0]
+
+ def mock_sleep(seconds):
+ mock_sleep_time[0] += seconds
+
+ monkeypatch.setattr(time, 'sleep', mock_sleep)
+
+ hit = [0]
+
+ tries = 10
+ jitter = 1
+
+ @retry(tries=tries, jitter=jitter)
+ def f():
+ hit[0] += 1
+ 1 / 0
+
+ with pytest.raises(ZeroDivisionError):
+ f()
+ assert hit[0] == tries
+ assert mock_sleep_time[0] == sum(range(tries - 1))
+
+
+def test_retry_call():
+ f_mock = MagicMock(side_effect=RuntimeError)
+ tries = 2
+ try:
+ retry_call(f_mock, exceptions=RuntimeError, tries=tries)
+ except RuntimeError:
+ pass
+
+ assert f_mock.call_count == tries
+
+
+def test_retry_call_2():
+ side_effect = [RuntimeError, RuntimeError, 3]
+ f_mock = MagicMock(side_effect=side_effect)
+ tries = 5
+ result = None
+ try:
+ result = retry_call(f_mock, exceptions=RuntimeError, tries=tries)
+ except RuntimeError:
+ pass
+
+ assert result == 3
+ assert f_mock.call_count == len(side_effect)
+
+
+def test_retry_call_with_args():
+
+ def f(value=0):
+ if value < 0:
+ return value
+ else:
+ raise RuntimeError
+
+ return_value = -1
+ result = None
+ f_mock = MagicMock(spec=f, return_value=return_value)
+ try:
+ result = retry_call(f_mock, fargs=[return_value])
+ except RuntimeError:
+ pass
+
+ assert result == return_value
+ assert f_mock.call_count == 1
+
+
+def test_retry_call_with_kwargs():
+
+ def f(value=0):
+ if value < 0:
+ return value
+ else:
+ raise RuntimeError
+
+ kwargs = {'value': -1}
+ result = None
+ f_mock = MagicMock(spec=f, return_value=kwargs['value'])
+ try:
+ result = retry_call(f_mock, fkwargs=kwargs)
+ except RuntimeError:
+ pass
+
+ assert result == kwargs['value']
+ assert f_mock.call_count == 1
diff --git a/contrib/python/retry/py3/tests/ya.make b/contrib/python/retry/py3/tests/ya.make
new file mode 100644
index 00000000000..b7d8e73ae81
--- /dev/null
+++ b/contrib/python/retry/py3/tests/ya.make
@@ -0,0 +1,23 @@
+PY3TEST()
+
+SUBSCRIBER(g:python-contrib)
+
+PEERDIR(
+ contrib/python/retry
+)
+
+IF (PYTHON2)
+ PEERDIR(
+ contrib/python/mock
+ )
+ENDIF()
+
+SRCDIR(contrib/python/retry/py3/retry/tests)
+
+TEST_SRCS(
+ test_retry.py
+)
+
+NO_LINT()
+
+END()
diff --git a/contrib/python/retry/py3/ya.make b/contrib/python/retry/py3/ya.make
new file mode 100644
index 00000000000..5c3b309b719
--- /dev/null
+++ b/contrib/python/retry/py3/ya.make
@@ -0,0 +1,35 @@
+# Generated by devtools/yamaker (pypi).
+
+PY3_LIBRARY()
+
+SUBSCRIBER(g:python-contrib)
+
+VERSION(0.9.2)
+
+LICENSE(Apache-2.0)
+
+PEERDIR(
+ contrib/python/decorator
+ contrib/python/py
+)
+
+NO_LINT()
+
+PY_SRCS(
+ TOP_LEVEL
+ retry/__init__.py
+ retry/api.py
+ retry/compat.py
+)
+
+RESOURCE_FILES(
+ PREFIX contrib/python/retry/py3/
+ .dist-info/METADATA
+ .dist-info/top_level.txt
+)
+
+END()
+
+RECURSE_FOR_TESTS(
+ tests
+)
diff --git a/contrib/python/retry/ya.make b/contrib/python/retry/ya.make
new file mode 100644
index 00000000000..3766ebcd67c
--- /dev/null
+++ b/contrib/python/retry/ya.make
@@ -0,0 +1,20 @@
+PY23_LIBRARY()
+
+LICENSE(Service-Py23-Proxy)
+
+SUBSCRIBER(g:python-contrib)
+
+IF (PYTHON2)
+ PEERDIR(contrib/python/retry/py2)
+ELSE()
+ PEERDIR(contrib/python/retry/py3)
+ENDIF()
+
+NO_LINT()
+
+END()
+
+RECURSE(
+ py2
+ py3
+)
diff --git a/contrib/python/scipy/py3/ya.make b/contrib/python/scipy/py3/ya.make
index bbf87b9b5e4..4bfa915f30b 100644
--- a/contrib/python/scipy/py3/ya.make
+++ b/contrib/python/scipy/py3/ya.make
@@ -1,4 +1,4 @@
-# Generated by devtools/yamaker from nixpkgs 23.05.
+# Generated by devtools/yamaker from nixpkgs 24.05.
PY3_LIBRARY()
diff --git a/contrib/python/ydb/py3/.dist-info/METADATA b/contrib/python/ydb/py3/.dist-info/METADATA
index d75da64fc14..cccddeb4271 100644
--- a/contrib/python/ydb/py3/.dist-info/METADATA
+++ b/contrib/python/ydb/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: ydb
-Version: 3.11.4
+Version: 3.12.2
Summary: YDB Python SDK
Home-page: http://github.com/ydb-platform/ydb-python-sdk
Author: Yandex LLC
diff --git a/contrib/python/ydb/py3/ya.make b/contrib/python/ydb/py3/ya.make
index 12ac0b16000..cec1a8a4ef6 100644
--- a/contrib/python/ydb/py3/ya.make
+++ b/contrib/python/ydb/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(3.11.4)
+VERSION(3.12.2)
LICENSE(Apache-2.0)
diff --git a/contrib/python/ydb/py3/ydb/aio/credentials.py b/contrib/python/ydb/py3/ydb/aio/credentials.py
index 48db925eba9..18e1b7e0a9b 100644
--- a/contrib/python/ydb/py3/ydb/aio/credentials.py
+++ b/contrib/python/ydb/py3/ydb/aio/credentials.py
@@ -71,7 +71,7 @@ class AbstractExpiringTokenCredentials(credentials.AbstractExpiringTokenCredenti
try:
auth_metadata = await self._make_token_request()
await self._cached_token.update(auth_metadata["access_token"])
- self.update_expiration_info(auth_metadata)
+ self._update_expiration_info(auth_metadata)
self.logger.info(
"Token refresh successful. current_time %s, refresh_in %s",
current_time,
diff --git a/contrib/python/ydb/py3/ydb/iam/auth.py b/contrib/python/ydb/py3/ydb/iam/auth.py
index dac9fb6c1c2..5fd179d2af0 100644
--- a/contrib/python/ydb/py3/ydb/iam/auth.py
+++ b/contrib/python/ydb/py3/ydb/iam/auth.py
@@ -104,14 +104,20 @@ class BaseJWTCredentials(abc.ABC):
@classmethod
def from_file(cls, key_file, iam_endpoint=None, iam_channel_credentials=None):
with open(os.path.expanduser(key_file), "r") as r:
- output = json.loads(r.read())
- account_id = output.get("service_account_id", None)
+ key = r.read()
+
+ return cls.from_content(key, iam_endpoint=iam_endpoint, iam_channel_credentials=iam_channel_credentials)
+
+ @classmethod
+ def from_content(cls, key, iam_endpoint=None, iam_channel_credentials=None):
+ key_json = json.loads(key)
+ account_id = key_json.get("service_account_id", None)
if account_id is None:
- account_id = output.get("user_account_id", None)
+ account_id = key_json.get("user_account_id", None)
return cls(
account_id,
- output["id"],
- output["private_key"],
+ key_json["id"],
+ key_json["private_key"],
iam_endpoint=iam_endpoint,
iam_channel_credentials=iam_channel_credentials,
)
diff --git a/contrib/python/ydb/py3/ydb/ydb_version.py b/contrib/python/ydb/py3/ydb/ydb_version.py
index b3b3b4cbd59..671c282292f 100644
--- a/contrib/python/ydb/py3/ydb/ydb_version.py
+++ b/contrib/python/ydb/py3/ydb/ydb_version.py
@@ -1 +1 @@
-VERSION = "3.11.4"
+VERSION = "3.12.2"