openshift-python-wrapper 10.0.53__tar.gz → 10.0.54__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/PKG-INFO +1 -1
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/resource.py +23 -6
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/pyproject.toml +1 -1
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/LICENSE +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/README.md +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/__init__.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/aaq.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/api_server.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/api_service.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/backup.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/benchmark.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/catalog_source.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cdi.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cdi_config.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/chaos_engine.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/chaos_result.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_claim.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_deployment.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_operator.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_pool.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_role.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_role_binding.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_service_version.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_version.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/configmap.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/console_cli_download.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/console_plugin.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/console_quick_start.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/constants.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/controller_revision.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cron_job.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/csi_storage_capacity.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/csidriver.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/custom_resource_definition.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/daemonset.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/data_import_cron.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/data_source.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/datavolume.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/deployment.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/destination_rule.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/dns.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/endpoint_slice.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/endpoints.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/event.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/forklift_controller.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/gateway.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/group.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/hook.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/host.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/hostpath_provisioner.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/hyperconverged.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/image.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/image_content_source_policy.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/image_digest_mirror_set.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/image_stream.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/imagestreamtag.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/infrastructure.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/installplan.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/ip_address_pool.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/job.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/kube_descheduler.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/kubevirt.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/kubevirt_common_templates_bundle.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/kubevirt_metrics_aggregation.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/kubevirt_node_labeller_bundle.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/kubevirt_template_validaotr.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/l2_advertisement.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/lease.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/limit_range.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/machine.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/machine_config.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/machine_config_pool.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/machine_health_check.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/machine_set.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/managed_cluster.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/metallb.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/migration.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/migration_policy.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/mtq.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/mtv.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/multi_cluster_hub.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/multi_cluster_observability.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/multi_network_policy.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/mutating_webhook_config.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/namespace.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/network.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/network_addons_config.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/network_attachment_definition.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/network_map.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/network_policy.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/nmstate.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/node.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/node_health_check.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/node_maintenance.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/node_network_configuration_enactment.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/node_network_configuration_policy.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/node_network_state.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/oauth.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/ocs_initialization.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/operator.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/operator_condition.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/operator_group.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/operator_hub.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/operator_source.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/package_manifest.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/peer_authentication.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/performance_profile.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/persistent_volume.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/persistent_volume_claim.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/pipeline.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/pipelineruns.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/plan.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/pod.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/pod_disruption_budget.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/pod_metrics.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/priority_class.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/project.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/prometheus.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/prometheus_rule.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/provider.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/replicaset.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/resource_quota.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/restore.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/rhmi.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/role.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/role_binding.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/route.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/scheduler.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/sealed_secret.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/secret.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/security_context_constraints.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/service.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/service_account.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/service_mesh_control_plane.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/service_mesh_member_roll.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/service_monitor.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/sriov_network.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/sriov_network_node_policy.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/sriov_network_node_state.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/ssp.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/storage_class.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/storage_map.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/storage_profile.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/subscription.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/task_run.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/tekton_tasks.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/template.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/upload_token_request.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/utils.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/validating_webhook_config.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_Instance_replica_set.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_clone.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_cluster_instance_types.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_cluster_preferences.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_export.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_import.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_instance.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_instance_migration.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_instance_preset.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_instance_types.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_migration_resource_quota.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_preferences.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_restore.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_machine_snapshot.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/virtual_service.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/vm_import_config.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/volume_snapshot.py +0 -0
- {openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/volume_snapshot_class.py +0 -0
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/resource.py
RENAMED
|
@@ -20,6 +20,7 @@ from kubernetes.dynamic.exceptions import (
|
|
|
20
20
|
MethodNotAllowedError,
|
|
21
21
|
NotFoundError,
|
|
22
22
|
ForbiddenError,
|
|
23
|
+
ResourceNotFoundError,
|
|
23
24
|
)
|
|
24
25
|
from kubernetes.dynamic.resource import ResourceField
|
|
25
26
|
from packaging.version import Version
|
|
@@ -76,7 +77,7 @@ def _get_api_version(dyn_client: DynamicClient, api_group: str, kind: str) -> st
|
|
|
76
77
|
|
|
77
78
|
|
|
78
79
|
def get_client(
|
|
79
|
-
config_file: str
|
|
80
|
+
config_file: str = "", config_dict: Dict[str, Any] | None = None, context: str = "", **kwargs: Any
|
|
80
81
|
) -> DynamicClient:
|
|
81
82
|
"""
|
|
82
83
|
Get a kubernetes client.
|
|
@@ -100,7 +101,9 @@ def get_client(
|
|
|
100
101
|
# Ref: https://github.com/kubernetes-client/python/blob/v26.1.0/kubernetes/base/config/kube_config.py
|
|
101
102
|
if config_dict:
|
|
102
103
|
return kubernetes.dynamic.DynamicClient(
|
|
103
|
-
client=kubernetes.config.new_client_from_config_dict(
|
|
104
|
+
client=kubernetes.config.new_client_from_config_dict(
|
|
105
|
+
config_dict=config_dict, context=context or None, **kwargs
|
|
106
|
+
)
|
|
104
107
|
)
|
|
105
108
|
try:
|
|
106
109
|
# Ref: https://github.com/kubernetes-client/python/blob/v26.1.0/kubernetes/base/config/__init__.py
|
|
@@ -111,7 +114,7 @@ def get_client(
|
|
|
111
114
|
# is populated during import which comes before setting the variable in code.
|
|
112
115
|
config_file = config_file or os.environ.get("KUBECONFIG", "~/.kube/config")
|
|
113
116
|
return kubernetes.dynamic.DynamicClient(
|
|
114
|
-
client=kubernetes.config.new_client_from_config(config_file=config_file, context=context, **kwargs)
|
|
117
|
+
client=kubernetes.config.new_client_from_config(config_file=config_file, context=context or None, **kwargs)
|
|
115
118
|
)
|
|
116
119
|
except MaxRetryError:
|
|
117
120
|
# Ref: https://github.com/kubernetes-client/python/blob/v26.1.0/kubernetes/base/config/incluster_config.py
|
|
@@ -365,6 +368,7 @@ class Resource:
|
|
|
365
368
|
timeout_seconds: int = TIMEOUT_1MINUTE,
|
|
366
369
|
api_group: str = "",
|
|
367
370
|
hash_log_data: bool = True,
|
|
371
|
+
ensure_exists: bool = False,
|
|
368
372
|
):
|
|
369
373
|
"""
|
|
370
374
|
Create an API resource
|
|
@@ -387,6 +391,7 @@ class Resource:
|
|
|
387
391
|
api_group (str): Resource API group; will overwrite API group definition in resource class
|
|
388
392
|
hash_log_data (bool): Hash resource content based on resource keys_to_hash property
|
|
389
393
|
(example: Secret resource)
|
|
394
|
+
ensure_exists (bool): Whether to check if the resource exists before when initializing the resource, raise if not.
|
|
390
395
|
"""
|
|
391
396
|
|
|
392
397
|
self.name = name
|
|
@@ -408,9 +413,7 @@ class Resource:
|
|
|
408
413
|
self.context = context
|
|
409
414
|
self.label = label
|
|
410
415
|
self.timeout_seconds = timeout_seconds
|
|
411
|
-
self.client: DynamicClient = client or get_client(
|
|
412
|
-
config_file=self.config_file, context=self.context if self.context else None
|
|
413
|
-
)
|
|
416
|
+
self.client: DynamicClient = client or get_client(config_file=self.config_file, context=self.context)
|
|
414
417
|
self.api_group: str = api_group or self.api_group
|
|
415
418
|
self.hash_log_data = hash_log_data
|
|
416
419
|
|
|
@@ -427,9 +430,19 @@ class Resource:
|
|
|
427
430
|
self.yaml_file_contents: str = ""
|
|
428
431
|
self.initial_resource_version: str = ""
|
|
429
432
|
self.logger = self._set_logger()
|
|
433
|
+
|
|
434
|
+
if ensure_exists:
|
|
435
|
+
self._ensure_exists()
|
|
436
|
+
|
|
430
437
|
# self._set_client_and_api_version() must be last init line
|
|
431
438
|
self._set_client_and_api_version()
|
|
432
439
|
|
|
440
|
+
def _ensure_exists(self) -> None:
|
|
441
|
+
self.logger.error(self.namespace)
|
|
442
|
+
if not self.exists:
|
|
443
|
+
_name_for_raise = self.name if not self.namespace else f"{self.namespace}/{self.name}"
|
|
444
|
+
raise ResourceNotFoundError(f"Resource `{self.kind}` `{_name_for_raise}` does not exist")
|
|
445
|
+
|
|
433
446
|
def _set_logger(self) -> logging.Logger:
|
|
434
447
|
log_level = os.environ.get("OPENSHIFT_PYTHON_WRAPPER_LOG_LEVEL", "INFO")
|
|
435
448
|
log_file = os.environ.get("OPENSHIFT_PYTHON_WRAPPER_LOG_FILE", "")
|
|
@@ -1188,6 +1201,7 @@ class NamespacedResource(Resource):
|
|
|
1188
1201
|
delete_timeout: int = TIMEOUT_4MINUTES,
|
|
1189
1202
|
client: DynamicClient | None = None,
|
|
1190
1203
|
privileged_client: DynamicClient | None = None,
|
|
1204
|
+
ensure_exists: bool = True,
|
|
1191
1205
|
**kwargs: Any,
|
|
1192
1206
|
):
|
|
1193
1207
|
super().__init__(
|
|
@@ -1204,6 +1218,9 @@ class NamespacedResource(Resource):
|
|
|
1204
1218
|
if not (self.name and self.namespace) and not self.yaml_file:
|
|
1205
1219
|
raise MissingRequiredArgumentError(argument="'name' and 'namespace'")
|
|
1206
1220
|
|
|
1221
|
+
if ensure_exists:
|
|
1222
|
+
self._ensure_exists()
|
|
1223
|
+
|
|
1207
1224
|
@classmethod
|
|
1208
1225
|
def get(
|
|
1209
1226
|
cls,
|
|
@@ -19,7 +19,7 @@ warn_unused_ignores = true
|
|
|
19
19
|
|
|
20
20
|
[tool.poetry]
|
|
21
21
|
name = "openshift-python-wrapper"
|
|
22
|
-
version = "10.0.
|
|
22
|
+
version = "10.0.54"
|
|
23
23
|
description = "Wrapper around https://github.com/kubernetes-client/python"
|
|
24
24
|
authors = ["Meni Yakove <myakove@gmail.com>", "Ruth Netser <rnetser@gmail.com>"]
|
|
25
25
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/api_server.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/api_service.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/backup.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/benchmark.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cdi_config.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/chaos_engine.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/chaos_result.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_claim.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_pool.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cluster_role.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/configmap.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/cron_job.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/csidriver.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/daemonset.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/data_source.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/datavolume.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/deployment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/endpoints.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/event.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/gateway.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/group.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/image.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/image_stream.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/installplan.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/kubevirt.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/lease.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/limit_range.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/machine.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/machine_set.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/metallb.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/migration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/namespace.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/network.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/network_map.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/nmstate.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/oauth.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/operator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/operator_hub.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/pipeline.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/pipelineruns.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/pod_metrics.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/project.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/prometheus.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/provider.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/replicaset.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/restore.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/role_binding.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/route.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/scheduler.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/sealed_secret.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/secret.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/sriov_network.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/storage_class.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/storage_map.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/subscription.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/task_run.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/tekton_tasks.py
RENAMED
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/template.py
RENAMED
|
File without changes
|
|
File without changes
|
{openshift_python_wrapper-10.0.53 → openshift_python_wrapper-10.0.54}/ocp_resources/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|