openshift-python-wrapper 4.15.74__tar.gz → 4.16.1__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.
Files changed (187) hide show
  1. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/PKG-INFO +2 -2
  2. openshift_python_wrapper-4.16.1/ocp_resources/application_aware_applied_cluster_resource_quota.py +12 -0
  3. openshift_python_wrapper-4.16.1/ocp_resources/application_aware_cluster_resource_quota.py +41 -0
  4. openshift_python_wrapper-4.16.1/ocp_resources/application_aware_resource_quota.py +50 -0
  5. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/backup.py +19 -13
  6. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/catalog_source.py +16 -23
  7. openshift_python_wrapper-4.16.1/ocp_resources/cluster_claim.py +28 -0
  8. openshift_python_wrapper-4.16.1/ocp_resources/cluster_deployment.py +55 -0
  9. openshift_python_wrapper-4.16.1/ocp_resources/cluster_pool.py +61 -0
  10. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/cluster_role.py +3 -3
  11. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/cluster_role_binding.py +4 -3
  12. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/configmap.py +9 -4
  13. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/constants.py +11 -8
  14. openshift_python_wrapper-4.16.1/ocp_resources/controller_revision.py +39 -0
  15. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/cron_job.py +8 -10
  16. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/csi_storage_capacity.py +7 -34
  17. openshift_python_wrapper-4.16.1/ocp_resources/data_import_cron.py +97 -0
  18. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/data_source.py +3 -3
  19. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/datavolume.py +20 -22
  20. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/endpoint_slice.py +8 -9
  21. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/endpoints.py +9 -10
  22. openshift_python_wrapper-4.16.1/ocp_resources/fence_agent_remediation_templates.py +64 -0
  23. openshift_python_wrapper-4.16.1/ocp_resources/group.py +18 -0
  24. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/hook.py +7 -9
  25. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/host.py +14 -16
  26. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/hostpath_provisioner.py +1 -1
  27. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/hyperconverged.py +1 -1
  28. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/image_content_source_policy.py +3 -3
  29. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/image_digest_mirror_set.py +3 -3
  30. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/image_stream.py +6 -8
  31. openshift_python_wrapper-4.16.1/ocp_resources/inference_service.py +50 -0
  32. openshift_python_wrapper-4.16.1/ocp_resources/ingress_controller.py +221 -0
  33. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/installplan.py +0 -3
  34. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/ip_address_pool.py +3 -3
  35. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/job.py +1 -1
  36. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/kube_descheduler.py +10 -12
  37. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/l2_advertisement.py +1 -1
  38. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/lease.py +1 -1
  39. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/limit_range.py +4 -3
  40. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/machine_config_pool.py +1 -1
  41. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/machine_health_check.py +1 -1
  42. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/machine_set.py +2 -2
  43. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/metallb.py +1 -1
  44. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/migration.py +7 -9
  45. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/migration_policy.py +1 -1
  46. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/mtv.py +1 -1
  47. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/multi_cluster_observability.py +3 -3
  48. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/multi_network_policy.py +4 -6
  49. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/network_attachment_definition.py +9 -10
  50. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/network_map.py +1 -1
  51. openshift_python_wrapper-4.16.1/ocp_resources/node_health_check.py +80 -0
  52. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/node_maintenance.py +1 -1
  53. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/node_network_configuration_policy.py +4 -4
  54. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/node_network_state.py +7 -9
  55. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/ocs_initialization.py +5 -7
  56. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/operator_group.py +1 -1
  57. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/operator_source.py +10 -12
  58. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/performance_profile.py +4 -6
  59. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/persistent_volume_claim.py +7 -9
  60. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/pipeline.py +4 -3
  61. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/pipelineruns.py +3 -3
  62. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/plan.py +25 -27
  63. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/pod.py +1 -5
  64. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/pod_disruption_budget.py +1 -1
  65. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/priority_class.py +1 -1
  66. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/provider.py +11 -13
  67. openshift_python_wrapper-4.16.1/ocp_resources/proxy.py +60 -0
  68. openshift_python_wrapper-4.16.1/ocp_resources/reclaim_space_cron_job.py +53 -0
  69. openshift_python_wrapper-4.16.1/ocp_resources/reclaim_space_job.py +50 -0
  70. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/resource.py +340 -192
  71. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/resource_quota.py +4 -3
  72. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/restore.py +11 -11
  73. openshift_python_wrapper-4.16.1/ocp_resources/rhmi.py +43 -0
  74. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/role.py +3 -3
  75. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/role_binding.py +1 -1
  76. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/route.py +1 -1
  77. openshift_python_wrapper-4.16.1/ocp_resources/sealed_secret.py +53 -0
  78. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/secret.py +6 -8
  79. openshift_python_wrapper-4.16.1/ocp_resources/self_node_remediation_templates.py +36 -0
  80. openshift_python_wrapper-4.16.1/ocp_resources/service_account.py +58 -0
  81. openshift_python_wrapper-4.16.1/ocp_resources/serving_runtime.py +103 -0
  82. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/sriov_network.py +1 -1
  83. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/sriov_network_node_policy.py +1 -1
  84. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/sriov_network_node_state.py +1 -4
  85. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/storage_class.py +3 -3
  86. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/storage_map.py +1 -1
  87. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/subscription.py +10 -12
  88. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/task_run.py +6 -4
  89. openshift_python_wrapper-4.16.1/ocp_resources/trustyai_service.py +62 -0
  90. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/upload_token_request.py +1 -1
  91. openshift_python_wrapper-4.16.1/ocp_resources/utils.py +55 -0
  92. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine.py +1 -1
  93. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_clone.py +3 -3
  94. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_export.py +12 -14
  95. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_import.py +3 -3
  96. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_instance.py +2 -1
  97. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_instance_migration.py +1 -1
  98. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_migration_resource_quota.py +1 -1
  99. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_restore.py +1 -1
  100. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_snapshot.py +2 -2
  101. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/pyproject.toml +11 -2
  102. openshift_python_wrapper-4.15.74/ocp_resources/controller_revision.py +0 -43
  103. openshift_python_wrapper-4.15.74/ocp_resources/data_import_cron.py +0 -94
  104. openshift_python_wrapper-4.15.74/ocp_resources/node_health_check.py +0 -10
  105. openshift_python_wrapper-4.15.74/ocp_resources/rhmi.py +0 -10
  106. openshift_python_wrapper-4.15.74/ocp_resources/service_account.py +0 -9
  107. openshift_python_wrapper-4.15.74/ocp_resources/utils.py +0 -277
  108. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/LICENSE +0 -0
  109. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/README.md +0 -0
  110. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/__init__.py +0 -0
  111. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/aaq.py +0 -0
  112. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/api_server.py +0 -0
  113. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/api_service.py +0 -0
  114. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/benchmark.py +0 -0
  115. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/cdi.py +0 -0
  116. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/cdi_config.py +0 -0
  117. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/chaos_engine.py +0 -0
  118. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/chaos_result.py +0 -0
  119. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/cluster_operator.py +0 -0
  120. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/cluster_service_version.py +0 -0
  121. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/cluster_version.py +0 -0
  122. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/console_cli_download.py +0 -0
  123. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/console_plugin.py +0 -0
  124. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/console_quick_start.py +0 -0
  125. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/csidriver.py +0 -0
  126. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/custom_resource_definition.py +0 -0
  127. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/daemonset.py +0 -0
  128. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/deployment.py +0 -0
  129. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/destination_rule.py +0 -0
  130. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/dns.py +0 -0
  131. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/event.py +0 -0
  132. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/forklift_controller.py +0 -0
  133. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/gateway.py +0 -0
  134. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/image.py +0 -0
  135. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/imagestreamtag.py +0 -0
  136. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/infrastructure.py +0 -0
  137. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/kubevirt.py +0 -0
  138. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/kubevirt_common_templates_bundle.py +0 -0
  139. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/kubevirt_metrics_aggregation.py +0 -0
  140. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/kubevirt_node_labeller_bundle.py +0 -0
  141. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/kubevirt_template_validaotr.py +0 -0
  142. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/machine.py +0 -0
  143. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/machine_config.py +0 -0
  144. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/managed_cluster.py +0 -0
  145. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/mtq.py +0 -0
  146. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/multi_cluster_hub.py +0 -0
  147. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/mutating_webhook_config.py +0 -0
  148. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/namespace.py +0 -0
  149. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/network.py +0 -0
  150. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/network_addons_config.py +0 -0
  151. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/network_policy.py +0 -0
  152. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/nmstate.py +0 -0
  153. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/node.py +0 -0
  154. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/node_network_configuration_enactment.py +0 -0
  155. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/oauth.py +0 -0
  156. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/operator.py +0 -0
  157. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/operator_condition.py +0 -0
  158. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/operator_hub.py +0 -0
  159. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/package_manifest.py +0 -0
  160. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/peer_authentication.py +0 -0
  161. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/persistent_volume.py +0 -0
  162. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/pod_metrics.py +0 -0
  163. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/project.py +0 -0
  164. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/prometheus.py +0 -0
  165. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/prometheus_rule.py +0 -0
  166. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/replicaset.py +0 -0
  167. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/scheduler.py +0 -0
  168. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/security_context_constraints.py +0 -0
  169. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/service.py +0 -0
  170. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/service_mesh_control_plane.py +0 -0
  171. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/service_mesh_member_roll.py +0 -0
  172. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/service_monitor.py +0 -0
  173. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/ssp.py +0 -0
  174. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/storage_profile.py +0 -0
  175. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/tekton_tasks.py +0 -0
  176. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/template.py +0 -0
  177. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/validating_webhook_config.py +0 -0
  178. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_Instance_replica_set.py +0 -0
  179. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_cluster_instance_types.py +0 -0
  180. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_cluster_preferences.py +0 -0
  181. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_instance_preset.py +0 -0
  182. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_instance_types.py +0 -0
  183. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_machine_preferences.py +0 -0
  184. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/virtual_service.py +0 -0
  185. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/vm_import_config.py +0 -0
  186. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/volume_snapshot.py +0 -0
  187. {openshift_python_wrapper-4.15.74 → openshift_python_wrapper-4.16.1}/ocp_resources/volume_snapshot_class.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openshift-python-wrapper
3
- Version: 4.15.74
3
+ Version: 4.16.1
4
4
  Summary: Wrapper around https://github.com/kubernetes-client/python
5
5
  Home-page: https://github.com/RedHatQE/openshift-python-wrapper
6
6
  License: Apache-2.0
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Requires-Dist: colorlog (>=6.7.0,<7.0.0)
20
20
  Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
21
- Requires-Dist: kubernetes (>=28,<29)
21
+ Requires-Dist: kubernetes (>=30.0.0,<31.0.0)
22
22
  Requires-Dist: packaging (>=23.1,<24.0)
23
23
  Requires-Dist: python-benedict (>=0.33.0,<0.34.0)
24
24
  Requires-Dist: python-simple-logger (>=1.0.6)
@@ -0,0 +1,12 @@
1
+ # API reference: https://github.com/kubevirt/application-aware-quota/tree/main/staging/src/kubevirt.io/application-aware-quota-api/pkg/apis/core/v1alpha1
2
+ # TODO: update API reference when OCP doc is available
3
+
4
+ from ocp_resources.resource import NamespacedResource
5
+
6
+
7
+ class ApplicationAwareAppliedClusterResourceQuota(NamespacedResource):
8
+ """
9
+ ApplicationAwareAppliedClusterResourceQuota object.
10
+ """
11
+
12
+ api_group = NamespacedResource.ApiGroup.AAQ_KUBEVIRT_IO
@@ -0,0 +1,41 @@
1
+ # API reference: https://github.com/kubevirt/application-aware-quota/tree/main/staging/src/kubevirt.io/application-aware-quota-api/pkg/apis/core/v1alpha1
2
+ # TODO: update API reference when OCP doc is available
3
+ from __future__ import annotations
4
+ from typing import Dict, Any
5
+
6
+ from ocp_resources.resource import MissingRequiredArgumentError, Resource
7
+
8
+
9
+ class ApplicationAwareClusterResourceQuota(Resource):
10
+ api_group = Resource.ApiGroup.AAQ_KUBEVIRT_IO
11
+
12
+ def __init__(
13
+ self,
14
+ quota: Dict[str, Any] | None = None,
15
+ selector: Dict[str, Any] | None = None,
16
+ **kwargs: Any,
17
+ ) -> None:
18
+ """
19
+ Create ApplicationAwareClusterResourceQuota object.
20
+
21
+ Args:
22
+ quota (dict): defines the desired quota
23
+ example: {"hard": {"pod": 3, "requests.cpu": "500m"}}
24
+ selector (dict): Dict of Namespace labels/annotations to match
25
+ example: {"annotations": {"acrq-annotation": "true"}, "labels": {"matchLabels": {"acrq-label": "true"}}}
26
+ """
27
+ super().__init__(**kwargs)
28
+ self.quota = quota
29
+ self.selector = selector
30
+
31
+ def to_dict(self):
32
+ super().to_dict()
33
+ if not self.yaml_file:
34
+ if not (self.quota or self.selector):
35
+ raise MissingRequiredArgumentError(argument="'quota' or 'selector'")
36
+
37
+ self.res["spec"] = {}
38
+ _spec = self.res["spec"]
39
+
40
+ _spec["quota"] = self.quota
41
+ _spec["selector"] = self.selector
@@ -0,0 +1,50 @@
1
+ # API reference: https://github.com/kubevirt/application-aware-quota/tree/main/staging/src/kubevirt.io/application-aware-quota-api/pkg/apis/core/v1alpha1
2
+ # TODO: update API reference when OCP doc is available
3
+ from __future__ import annotations
4
+ from typing import Dict, Any, List
5
+
6
+ from ocp_resources.resource import MissingRequiredArgumentError, NamespacedResource
7
+
8
+
9
+ class ApplicationAwareResourceQuota(NamespacedResource):
10
+ api_group = NamespacedResource.ApiGroup.AAQ_KUBEVIRT_IO
11
+
12
+ def __init__(
13
+ self,
14
+ hard: Dict[str, Any] | None = None,
15
+ scope_selector: Dict[str, Any] | None = None,
16
+ scopes: List[str] | None = None,
17
+ **kwargs: Any,
18
+ ) -> None:
19
+ """
20
+ Create ApplicationAwareResourceQuota object.
21
+
22
+ Args:
23
+ hard (dict): set of desired hard limits
24
+ example: {"pod": 3, "requests.cpu": "500m", "requests.memory/vmi": "4Gi", "requests.instances/vmi": 2}
25
+ scope_selector (dict, optional): collection of filters
26
+ example: {"matchExpressions": [{"operator": "In", "scopeName": "PriorityClass", "values": ["low"]}]}
27
+ scopes (list, optional): collection of filters
28
+ example: ["Terminating", "PriorityClass"]
29
+ """
30
+ super().__init__(**kwargs)
31
+ self.hard = hard
32
+ self.scope_selector = scope_selector
33
+ self.scopes = scopes
34
+
35
+ def to_dict(self):
36
+ super().to_dict()
37
+ if not self.yaml_file:
38
+ if not self.hard:
39
+ raise MissingRequiredArgumentError(argument="hard")
40
+
41
+ self.res["spec"] = {}
42
+ _spec = self.res["spec"]
43
+
44
+ _spec["hard"] = self.hard
45
+
46
+ if self.scope_selector:
47
+ _spec["scopeSelector"] = self.scope_selector
48
+
49
+ if self.scopes:
50
+ _spec["scopes"] = self.scopes
@@ -1,4 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
+ from __future__ import annotations
3
+ from typing import Any, List
2
4
 
3
5
  from ocp_resources.resource import NamespacedResource
4
6
 
@@ -13,11 +15,11 @@ class Backup(NamespacedResource):
13
15
 
14
16
  def __init__(
15
17
  self,
16
- included_namespaces=None,
17
- excluded_resources=None,
18
- snapshot_move_data=False,
19
- storage_location=None,
20
- **kwargs,
18
+ included_namespaces: List[str] | None = None,
19
+ excluded_resources: List[str] | None = None,
20
+ snapshot_move_data: bool = False,
21
+ storage_location: str = "",
22
+ **kwargs: Any,
21
23
  ):
22
24
  """
23
25
  Args:
@@ -35,17 +37,21 @@ class Backup(NamespacedResource):
35
37
  self.snapshot_move_data = snapshot_move_data
36
38
  self.storage_location = storage_location
37
39
 
38
- def to_dict(self):
40
+ def to_dict(self) -> None:
39
41
  super().to_dict()
42
+
40
43
  if not self.yaml_file:
41
- spec_dict = {}
44
+ self.res["spec"] = {}
45
+ spec_dict = self.res["spec"]
46
+
42
47
  if self.included_namespaces:
43
- spec_dict.update({"includedNamespaces": self.included_namespaces})
48
+ spec_dict["includedNamespaces"] = self.included_namespaces
49
+
44
50
  if self.excluded_resources:
45
- spec_dict.update({"excludedResources": self.excluded_resources})
51
+ spec_dict["excludedResources"] = self.excluded_resources
52
+
46
53
  if self.snapshot_move_data:
47
- spec_dict.update({"snapshotMoveData": self.snapshot_move_data})
54
+ spec_dict["snapshotMoveData"] = self.snapshot_move_data
55
+
48
56
  if self.storage_location:
49
- spec_dict.update({"storageLocation": self.storage_location})
50
- if spec_dict:
51
- self.res.update({"spec": spec_dict})
57
+ spec_dict["storageLocation"] = self.storage_location
@@ -1,4 +1,4 @@
1
- from ocp_resources.resource import NamespacedResource
1
+ from ocp_resources.resource import MissingRequiredArgumentError, NamespacedResource
2
2
 
3
3
 
4
4
  class CatalogSource(NamespacedResource):
@@ -33,31 +33,24 @@ class CatalogSource(NamespacedResource):
33
33
  self.publisher = publisher
34
34
  self.update_strategy_registry_poll_interval = update_strategy_registry_poll_interval
35
35
 
36
- def to_dict(self):
36
+ def to_dict(self) -> None:
37
37
  super().to_dict()
38
38
  if not self.yaml_file:
39
39
  if not all([self.source_type, self.image, self.display_name, self.publisher]):
40
- raise ValueError(
41
- "Passing yaml_file or all parameters 'source_type', 'image',"
42
- " 'display_name' and 'publisher' is required."
43
- )
44
- self.res.update(
45
- {
46
- "spec": {
47
- "sourceType": self.source_type,
48
- "image": self.image,
49
- "displayName": self.display_name,
50
- "publisher": self.publisher,
51
- }
40
+ raise MissingRequiredArgumentError(argument="'source_type', 'image', 'display_name' and 'publisher'")
41
+ self.res.update({
42
+ "spec": {
43
+ "sourceType": self.source_type,
44
+ "image": self.image,
45
+ "displayName": self.display_name,
46
+ "publisher": self.publisher,
52
47
  }
53
- )
48
+ })
54
49
  if self.update_strategy_registry_poll_interval:
55
- self.res["spec"].update(
56
- {
57
- "updateStrategy": {
58
- "registryPoll": {
59
- "interval": self.update_strategy_registry_poll_interval,
60
- },
50
+ self.res["spec"].update({
51
+ "updateStrategy": {
52
+ "registryPoll": {
53
+ "interval": self.update_strategy_registry_poll_interval,
61
54
  },
62
- }
63
- )
55
+ },
56
+ })
@@ -0,0 +1,28 @@
1
+ from typing import Any
2
+
3
+ from ocp_resources.resource import NamespacedResource
4
+
5
+
6
+ class ClusterClaim(NamespacedResource):
7
+ """
8
+ https://github.com/openshift/hive/blob/master/docs/clusterpools.md#sample-cluster-claim
9
+ """
10
+
11
+ api_group: str = NamespacedResource.ApiGroup.HIVE_OPENSHIFT_IO
12
+
13
+ def __init__(
14
+ self,
15
+ cluster_pool_name: str = "",
16
+ **kwargs: Any,
17
+ ) -> None:
18
+ """
19
+ Args:
20
+ cluster_pool_name (str): ClusterPool name to claim the cluster from
21
+ """
22
+ super().__init__(**kwargs)
23
+ self.cluster_pool_name = cluster_pool_name
24
+
25
+ def to_dict(self) -> None:
26
+ super().to_dict()
27
+ if not self.yaml_file and self.cluster_pool_name:
28
+ self.res.setdefault("spec", {})["clusterPoolName"] = self.cluster_pool_name
@@ -0,0 +1,55 @@
1
+ from typing import Any, Dict
2
+ from ocp_resources.resource import NamespacedResource
3
+
4
+
5
+ class ClusterDeployment(NamespacedResource):
6
+ """
7
+ https://github.com/openshift/hive/blob/master/docs/using-hive.md#clusterdeployment
8
+ """
9
+
10
+ api_group: str = NamespacedResource.ApiGroup.HIVE_OPENSHIFT_IO
11
+
12
+ def __init__(
13
+ self,
14
+ base_domain: str = "",
15
+ cluster_name: str = "",
16
+ platform: Dict[str, Any] | None = None,
17
+ provisioning: Dict[str, Any] | None = None,
18
+ pull_secret_ref_name: str = "",
19
+ **kwargs: Any,
20
+ ) -> None:
21
+ """
22
+ Args:
23
+ base_domain (str): ClusterDeployment base domain
24
+ cluster_name (str): ClusterDeployment cluster name
25
+ platform (dict): ClusterDeployment platform
26
+ provisioning (dict): ClusterDeployment provisioning
27
+ pull_secret_ref_name (str): ClusterDeployment pull secret name
28
+ """
29
+ super().__init__(**kwargs)
30
+ self.base_domain = base_domain
31
+ self.cluster_name = cluster_name
32
+ self.platform = platform
33
+ self.provisioning = provisioning
34
+ self.pull_secret_ref_name = pull_secret_ref_name
35
+
36
+ def to_dict(self) -> None:
37
+ super().to_dict()
38
+ if not self.yaml_file:
39
+ self.res["spec"] = {}
40
+ _spec = self.res["spec"]
41
+
42
+ if self.base_domain:
43
+ _spec["baseDomain"] = self.base_domain
44
+
45
+ if self.cluster_name:
46
+ _spec["clusterName"] = self.cluster_name
47
+
48
+ if self.platform:
49
+ _spec["platform"] = self.platform
50
+
51
+ if self.provisioning:
52
+ _spec["provisioning"] = self.provisioning
53
+
54
+ if self.pull_secret_ref_name:
55
+ _spec["pullSecretRef"] = {"name": self.pull_secret_ref_name}
@@ -0,0 +1,61 @@
1
+ from __future__ import annotations
2
+ from typing import Any, Dict
3
+ from ocp_resources.resource import NamespacedResource
4
+
5
+
6
+ class ClusterPool(NamespacedResource):
7
+ """
8
+ https://github.com/openshift/hive/blob/master/docs/clusterpools.md#supported-cloud-platforms
9
+ """
10
+
11
+ api_group: str = NamespacedResource.ApiGroup.HIVE_OPENSHIFT_IO
12
+
13
+ def __init__(
14
+ self,
15
+ base_domain: str = "",
16
+ image_set_ref_name: str = "",
17
+ platform: Dict[str, Any] | None = None,
18
+ pull_secret_ref_name: str = "",
19
+ running_count: int | None = None,
20
+ size: int | None = None,
21
+ **kwargs: Any,
22
+ ) -> None:
23
+ """
24
+ Args:
25
+ base_domain (str): ClusterPool base domain
26
+ image_set_ref_name (str): ClusterPool image set name
27
+ platform (dict): ClusterPool platform
28
+ pull_secret_ref_name (str): ClusterPool pull secret name
29
+ running_count (int): ClusterPool running count
30
+ size (int): ClusterPool size
31
+ """
32
+ super().__init__(**kwargs)
33
+ self.base_domain = base_domain
34
+ self.image_set_ref_name = image_set_ref_name
35
+ self.platform = platform
36
+ self.pull_secret_ref_name = pull_secret_ref_name
37
+ self.running_count = running_count
38
+ self.size = size
39
+
40
+ def to_dict(self) -> None:
41
+ super().to_dict()
42
+ if not self.yaml_file:
43
+ self.res["spec"] = {}
44
+ _spec = self.res["spec"]
45
+ if self.base_domain:
46
+ _spec["baseDomain"] = self.base_domain
47
+
48
+ if self.image_set_ref_name:
49
+ _spec["imageSetRef"] = {"name": self.image_set_ref_name}
50
+
51
+ if self.platform:
52
+ _spec["platform"] = self.platform
53
+
54
+ if self.pull_secret_ref_name:
55
+ _spec["pullSecretRef"] = {"name": self.pull_secret_ref_name}
56
+
57
+ if self.running_count:
58
+ _spec["runningCount"] = self.running_count
59
+
60
+ if self.size:
61
+ _spec["size"] = self.size
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- from ocp_resources.resource import Resource
2
+ from ocp_resources.resource import MissingRequiredArgumentError, Resource
3
3
 
4
4
 
5
5
  class ClusterRole(Resource):
@@ -20,9 +20,9 @@ class ClusterRole(Resource):
20
20
  super().__init__(**kwargs)
21
21
  self.rules = rules
22
22
 
23
- def to_dict(self):
23
+ def to_dict(self) -> None:
24
24
  super().to_dict()
25
25
  if not self.yaml_file:
26
26
  if not self.rules:
27
- raise ValueError("must send rules or yaml_file")
27
+ raise MissingRequiredArgumentError(argument="rules")
28
28
  self.res["rules"] = self.rules
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  from ocp_resources.cluster_role import ClusterRole
4
- from ocp_resources.resource import Resource
4
+ from ocp_resources.resource import MissingRequiredArgumentError, Resource
5
5
 
6
6
 
7
7
  class ClusterRoleBinding(Resource):
@@ -26,11 +26,12 @@ class ClusterRoleBinding(Resource):
26
26
  self.cluster_role = cluster_role
27
27
  self.subjects = subjects
28
28
 
29
- def to_dict(self):
29
+ def to_dict(self) -> None:
30
30
  super().to_dict()
31
31
  if not self.yaml_file:
32
32
  if not self.cluster_role:
33
- raise ValueError("Passing yaml_file or parameter 'cluster_role' is required.")
33
+ raise MissingRequiredArgumentError(argument="cluster_role")
34
+
34
35
  self.res.setdefault("roleRef", {})
35
36
  self.res["roleRef"] = {
36
37
  "apiGroup": self.api_group,
@@ -1,3 +1,6 @@
1
+ from __future__ import annotations
2
+ from typing import Any, Dict
3
+
1
4
  from ocp_resources.resource import NamespacedResource
2
5
 
3
6
 
@@ -10,17 +13,19 @@ class ConfigMap(NamespacedResource):
10
13
 
11
14
  def __init__(
12
15
  self,
13
- data=None,
14
- **kwargs,
16
+ data: Dict[str, Any] | None = None,
17
+ **kwargs: Any,
15
18
  ):
16
19
  """
17
20
  Args:
18
21
  data (dict, optional): key-value configuration pairs.
19
22
  """
20
23
  super().__init__(**kwargs)
24
+
21
25
  self.data = data
22
26
 
23
- def to_dict(self):
27
+ def to_dict(self) -> None:
24
28
  super().to_dict()
29
+
25
30
  if not self.yaml_file and self.data:
26
- self.res.setdefault("data", {}).update(self.data)
31
+ self.res["data"] = self.data
@@ -1,3 +1,6 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Dict, List
1
4
  from kubernetes.dynamic.exceptions import (
2
5
  ForbiddenError,
3
6
  InternalServerError,
@@ -6,7 +9,7 @@ from kubernetes.dynamic.exceptions import (
6
9
  )
7
10
  from urllib3.exceptions import MaxRetryError, ProtocolError
8
11
 
9
- DEFAULT_CLUSTER_RETRY_EXCEPTIONS = {
12
+ DEFAULT_CLUSTER_RETRY_EXCEPTIONS: Dict[type[Exception], List[str]] = {
10
13
  MaxRetryError: [],
11
14
  ConnectionAbortedError: [],
12
15
  ConnectionResetError: [],
@@ -19,11 +22,11 @@ DEFAULT_CLUSTER_RETRY_EXCEPTIONS = {
19
22
  ServerTimeoutError: [],
20
23
  ForbiddenError: ["context deadline exceeded"],
21
24
  }
22
- PROTOCOL_ERROR_EXCEPTION_DICT = {ProtocolError: []}
23
- NOT_FOUND_ERROR_EXCEPTION_DICT = {NotFoundError: []}
25
+ PROTOCOL_ERROR_EXCEPTION_DICT: Dict[type[Exception], List[str]] = {ProtocolError: []}
26
+ NOT_FOUND_ERROR_EXCEPTION_DICT: Dict[type[Exception], List[str]] = {NotFoundError: []}
24
27
 
25
- TIMEOUT_10SEC = 10
26
- TIMEOUT_1MINUTE = 60
27
- TIMEOUT_2MINUTES = 2 * 60
28
- TIMEOUT_4MINUTES = 4 * 60
29
- TIMEOUT_10MINUTES = 10 * 60
28
+ TIMEOUT_10SEC: int = 10
29
+ TIMEOUT_1MINUTE: int = 60
30
+ TIMEOUT_2MINUTES: int = 2 * 60
31
+ TIMEOUT_4MINUTES: int = 4 * 60
32
+ TIMEOUT_10MINUTES: int = 10 * 60
@@ -0,0 +1,39 @@
1
+ from ocp_resources.resource import MissingRequiredArgumentError, NamespacedResource
2
+
3
+
4
+ class ControllerRevision(NamespacedResource):
5
+ """
6
+ https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/controller-revision-v1/
7
+ """
8
+
9
+ api_group = NamespacedResource.ApiGroup.APPS
10
+
11
+ def __init__(
12
+ self,
13
+ owner_references=None,
14
+ revision_object=None,
15
+ revision=None,
16
+ **kwargs,
17
+ ):
18
+ """
19
+ Args:
20
+ owner_references (list, optional): List of objects depended on this object.
21
+ revision_object (object, optional): the Data Object representing the state.
22
+ revision (int64): indicates the revision of the state represented by Data.
23
+ """
24
+ super().__init__(**kwargs)
25
+ self.owner_references = owner_references
26
+ self.revision_object = revision_object
27
+ self.revision = revision
28
+
29
+ def to_dict(self) -> None:
30
+ super().to_dict()
31
+ if not self.yaml_file:
32
+ if not self.revision:
33
+ raise MissingRequiredArgumentError(argument="revision")
34
+ self.res.update({"revision": self.revision})
35
+
36
+ if self.owner_references:
37
+ self.res.setdefault("metadata", {}).update({"ownerReference": self.owner_references})
38
+ if self.revision_object:
39
+ self.res.update({"data": self.revision_object.res})
@@ -1,4 +1,4 @@
1
- from ocp_resources.resource import NamespacedResource
1
+ from ocp_resources.resource import MissingRequiredArgumentError, NamespacedResource
2
2
 
3
3
 
4
4
  class CronJob(NamespacedResource):
@@ -44,19 +44,17 @@ class CronJob(NamespacedResource):
44
44
  self.failed_jobs_history_limit = failed_jobs_history_limit
45
45
  self.starting_deadline_seconds = starting_deadline_seconds
46
46
 
47
- def to_dict(self):
47
+ def to_dict(self) -> None:
48
48
  super().to_dict()
49
49
  if not self.yaml_file:
50
50
  if not (self.job_template and self.schedule):
51
- raise ValueError("yaml_file or parameters 'job_template' and 'schedule' are" " required.")
52
- self.res.update(
53
- {
54
- "spec": {
55
- "jobTemplate": self.job_template,
56
- "schedule": self.schedule,
57
- }
51
+ raise MissingRequiredArgumentError(argument="'job_template' and 'schedule'")
52
+ self.res.update({
53
+ "spec": {
54
+ "jobTemplate": self.job_template,
55
+ "schedule": self.schedule,
58
56
  }
59
- )
57
+ })
60
58
  if self.timezone:
61
59
  self.res["spec"]["timezone"] = self.timezone
62
60
  if self.suspend:
@@ -1,10 +1,8 @@
1
- from ocp_resources.constants import TIMEOUT_4MINUTES
2
- from ocp_resources.resource import NamespacedResource
1
+ from ocp_resources.resource import MissingRequiredArgumentError, NamespacedResource
3
2
 
4
3
 
5
4
  class CSIStorageCapacity(NamespacedResource):
6
5
  """
7
- CSIStorageCapacity object. API reference:
8
6
  https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/csi-storage-capacity-v1/#CSIStorageCapacity
9
7
  """
10
8
 
@@ -12,24 +10,14 @@ class CSIStorageCapacity(NamespacedResource):
12
10
 
13
11
  def __init__(
14
12
  self,
15
- name=None,
16
- namespace=None,
17
- client=None,
18
13
  capacity=None,
19
14
  maximum_volume_size=None,
20
15
  node_topology=None,
21
16
  storage_class_name=None,
22
- teardown=True,
23
- privileged_client=None,
24
- yaml_file=None,
25
- delete_timeout=TIMEOUT_4MINUTES,
26
17
  **kwargs,
27
18
  ):
28
19
  """
29
20
  Args:
30
- name (str): Name of the CSIStorageCapacity resource
31
- namespace (str): Namespace of CSIStorageCapacity resource
32
- client: (DynamicClient): DynamicClient for api calls
33
21
  capacity (str, optional): value reported by the csi driver
34
22
  maximum_volume_size (str, optional): maximum volume size reported by csi driver
35
23
  storage_class_name (str): storage class name
@@ -37,36 +25,21 @@ class CSIStorageCapacity(NamespacedResource):
37
25
  was reported
38
26
  Example:
39
27
  node_topology: {'matchLabels': {'topology.hostpath.csi/node': 'c01-dbn-413-4c48b-worker-0-pmtv8'}}
40
- teardown (bool): Indicates if the resource should be torn down at the end
41
- privileged_client (DynamicClient): Privileged client for api calls
42
- yaml_file (str): yaml file for the resource.
43
- delete_timeout (int): timeout associated with delete action
44
28
  """
45
- super().__init__(
46
- name=name,
47
- namespace=namespace,
48
- client=client,
49
- teardown=teardown,
50
- privileged_client=privileged_client,
51
- yaml_file=yaml_file,
52
- delete_timeout=delete_timeout,
53
- **kwargs,
54
- )
29
+ super().__init__(**kwargs)
55
30
  self.capacity = capacity
56
31
  self.node_topology = node_topology
57
32
  self.storage_class_name = storage_class_name
58
33
  self.maximum_volume_size = maximum_volume_size
59
34
 
60
- def to_dict(self):
35
+ def to_dict(self) -> None:
61
36
  super().to_dict()
62
37
  if not self.yaml_file:
63
38
  if not self.storage_class_name:
64
- raise ValueError("yaml_file or parameter 'storage_class_name' is required.")
65
- self.res.update(
66
- {
67
- "storageClassName": self.storage_class_name,
68
- }
69
- )
39
+ raise MissingRequiredArgumentError(argument="storage_class_name")
40
+ self.res.update({
41
+ "storageClassName": self.storage_class_name,
42
+ })
70
43
  if self.maximum_volume_size:
71
44
  self.res["maximumVolumeSize"] = self.maximum_volume_size
72
45
  if self.node_topology: