platform-api-python-client 4.31.0__py3-none-any.whl → 4.41.0__py3-none-any.whl

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 (200) hide show
  1. platform_api_python_client/__init__.py +410 -148
  2. platform_api_python_client/api/external_api.py +6466 -1215
  3. platform_api_python_client/api_client.py +81 -36
  4. platform_api_python_client/configuration.py +262 -66
  5. platform_api_python_client/exceptions.py +24 -5
  6. platform_api_python_client/models/__init__.py +90 -35
  7. platform_api_python_client/models/admission.py +106 -0
  8. platform_api_python_client/models/autoscaling.py +120 -0
  9. platform_api_python_client/models/ccl_dynamo_pools.py +117 -0
  10. platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py} +16 -16
  11. platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_chart_values.py +121 -0
  12. platform_api_python_client/models/{c_serve_v2_recipe.py → ccluster_catalogs_cluster_base_argo_rollouts_controller.py} +15 -18
  13. platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_values.py +110 -0
  14. platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_chart_values.py +117 -0
  15. platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_values.py +110 -0
  16. platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_chart_values.py +152 -0
  17. platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_values.py +121 -0
  18. platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_chart_values.py +110 -0
  19. platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_controller.py +121 -0
  20. platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_values.py +110 -0
  21. platform_api_python_client/models/ccluster_catalogs_cluster_base_istio_values.py +143 -0
  22. platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_chart_values.py +154 -0
  23. platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_values.py +121 -0
  24. platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_chart_values.py +131 -0
  25. platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_values.py +110 -0
  26. platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_chart_values.py +121 -0
  27. platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_values.py +121 -0
  28. platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_chart_values.py +106 -0
  29. platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_values.py +110 -0
  30. platform_api_python_client/models/cdi.py +113 -0
  31. platform_api_python_client/models/cluster_base_components.py +187 -0
  32. platform_api_python_client/models/cluster_capacity_response.py +5 -5
  33. platform_api_python_client/models/cluster_credential.py +6 -5
  34. platform_api_python_client/models/cluster_registration_request.py +4 -3
  35. platform_api_python_client/models/cluster_registration_response.py +4 -3
  36. platform_api_python_client/models/{istio_cni_overrides.py → cni.py} +29 -15
  37. platform_api_python_client/models/config_file_mount.py +6 -5
  38. platform_api_python_client/models/create_compute_deployment_request.py +35 -9
  39. platform_api_python_client/models/create_compute_deployment_response.py +4 -3
  40. platform_api_python_client/models/create_dynamo_deployment_request.py +67 -20
  41. platform_api_python_client/models/create_dynamo_deployment_response.py +4 -3
  42. platform_api_python_client/models/create_filesystem_volume_request.py +8 -20
  43. platform_api_python_client/models/create_hardware_instance_request.py +4 -3
  44. platform_api_python_client/models/create_inference_deployment_response.py +4 -3
  45. platform_api_python_client/models/create_inference_v3_deployment_request.py +52 -10
  46. platform_api_python_client/models/create_job_deployment_request.py +35 -9
  47. platform_api_python_client/models/create_job_deployment_response.py +4 -3
  48. platform_api_python_client/models/create_object_volume_request.py +10 -22
  49. platform_api_python_client/models/create_organization_request.py +4 -3
  50. platform_api_python_client/models/create_organization_response.py +4 -3
  51. platform_api_python_client/models/create_service_account_request.py +4 -3
  52. platform_api_python_client/models/create_service_account_response.py +4 -3
  53. platform_api_python_client/models/credits_response.py +4 -3
  54. platform_api_python_client/models/daily_bill_response.py +4 -3
  55. platform_api_python_client/models/{fluent_bit.py → dashboard.py} +29 -12
  56. platform_api_python_client/models/{prometheus_adapter.py → default_priorities.py} +29 -12
  57. platform_api_python_client/models/default_queue.py +106 -0
  58. platform_api_python_client/models/delete_user_vault_item_request.py +4 -3
  59. platform_api_python_client/models/deployment_log_event_v4.py +4 -3
  60. platform_api_python_client/models/deployment_response.py +12 -27
  61. platform_api_python_client/models/deployment_status_request.py +4 -3
  62. platform_api_python_client/models/deployment_status_response.py +4 -3
  63. platform_api_python_client/models/deployment_status_v3_response.py +5 -5
  64. platform_api_python_client/models/deployment_type.py +14 -0
  65. platform_api_python_client/models/deployment_usage.py +5 -5
  66. platform_api_python_client/models/deployment_usage_value.py +4 -3
  67. platform_api_python_client/models/dynamo_communications_input.py +4 -16
  68. platform_api_python_client/models/dynamo_frontend_config.py +105 -0
  69. platform_api_python_client/models/dynamo_frontend_config_response.py +105 -0
  70. platform_api_python_client/models/dynamo_image.py +106 -0
  71. platform_api_python_client/models/dynamo_kv_transfer_configuration.py +4 -16
  72. platform_api_python_client/models/{external_dns.py → dynamo_weight_transfer_configuration.py} +13 -13
  73. platform_api_python_client/models/dynamo_weight_transfer_policy.py +36 -0
  74. platform_api_python_client/models/dynamo_worker_pool_config.py +6 -18
  75. platform_api_python_client/models/dynamo_worker_pools.py +4 -16
  76. platform_api_python_client/models/{keda.py → env.py} +14 -13
  77. platform_api_python_client/models/generate_service_account_secret_response.py +4 -3
  78. platform_api_python_client/models/get_cluster_response.py +8 -5
  79. platform_api_python_client/models/get_compute_deployment_response.py +35 -8
  80. platform_api_python_client/models/get_deployment_log_response.py +4 -3
  81. platform_api_python_client/models/get_deployment_log_v4_response.py +5 -5
  82. platform_api_python_client/models/get_deployment_pods_response.py +4 -3
  83. platform_api_python_client/models/get_deployment_response.py +7 -7
  84. platform_api_python_client/models/get_deployment_revision_response.py +4 -3
  85. platform_api_python_client/models/get_deployment_usage_response.py +24 -9
  86. platform_api_python_client/models/get_dynamo_deployment_response.py +63 -15
  87. platform_api_python_client/models/get_filesystem_volume_response.py +4 -3
  88. platform_api_python_client/models/get_inference_deployment_response.py +7 -7
  89. platform_api_python_client/models/get_inference_v3_deployment_response.py +51 -8
  90. platform_api_python_client/models/get_job_deployment_response.py +35 -8
  91. platform_api_python_client/models/get_object_volume_response.py +4 -3
  92. platform_api_python_client/models/gpu_type_capacity.py +4 -3
  93. platform_api_python_client/models/hardware_instance_response.py +10 -5
  94. platform_api_python_client/models/hardware_preset_response.py +4 -3
  95. platform_api_python_client/models/http_validation_error.py +5 -5
  96. platform_api_python_client/models/image.py +113 -0
  97. platform_api_python_client/models/image_pull_secret_credentials.py +4 -3
  98. platform_api_python_client/models/{istio_cni_subchart_overrides.py → ingress.py} +26 -18
  99. platform_api_python_client/models/{c_serve_recipe_response.py → insight_list_item_response.py} +33 -27
  100. platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → insight_resource.py} +20 -14
  101. platform_api_python_client/models/insight_resource_type.py +37 -0
  102. platform_api_python_client/models/insight_response.py +133 -0
  103. platform_api_python_client/models/insight_severity.py +40 -0
  104. platform_api_python_client/models/insight_status.py +39 -0
  105. platform_api_python_client/models/insight_status_change_response.py +108 -0
  106. platform_api_python_client/models/invite_user_request.py +4 -3
  107. platform_api_python_client/models/istio_base.py +106 -0
  108. platform_api_python_client/models/istio_cni.py +124 -0
  109. platform_api_python_client/models/{ingress_nginx.py → istio_gateway.py} +29 -12
  110. platform_api_python_client/models/{dynamo_communications_output.py → istiod.py} +21 -15
  111. platform_api_python_client/models/list_cluster_capacity_response.py +5 -5
  112. platform_api_python_client/models/list_daily_bill_response.py +5 -5
  113. platform_api_python_client/models/list_deployment_revisions_response.py +5 -5
  114. platform_api_python_client/models/list_get_cluster_response.py +5 -5
  115. platform_api_python_client/models/list_get_deployment_response.py +5 -5
  116. platform_api_python_client/models/list_hardware_instance_response.py +5 -5
  117. platform_api_python_client/models/list_hardware_preset_response.py +5 -5
  118. platform_api_python_client/models/{istio_overrides.py → list_insights_response.py} +19 -20
  119. platform_api_python_client/models/list_organization_gpu_quota_response.py +5 -5
  120. platform_api_python_client/models/list_prebuilt_image_response.py +5 -5
  121. platform_api_python_client/models/list_service_accounts_response.py +5 -5
  122. platform_api_python_client/models/list_user_vault_items_response.py +5 -5
  123. platform_api_python_client/models/list_volumes_response.py +5 -5
  124. platform_api_python_client/models/{validation_error_loc_inner.py → location_inner.py} +6 -6
  125. platform_api_python_client/models/metric.py +13 -0
  126. platform_api_python_client/models/metrics.py +117 -0
  127. platform_api_python_client/models/metrics_config.py +6 -5
  128. platform_api_python_client/models/mig.py +106 -0
  129. platform_api_python_client/models/operator.py +117 -0
  130. platform_api_python_client/models/organization_gpu_quota_request.py +4 -3
  131. platform_api_python_client/models/organization_gpu_quota_response.py +4 -3
  132. platform_api_python_client/models/pilot.py +106 -0
  133. platform_api_python_client/models/pod_details.py +4 -3
  134. platform_api_python_client/models/pool.py +117 -0
  135. platform_api_python_client/models/prebuilt_image_response.py +4 -3
  136. platform_api_python_client/models/prometheus.py +110 -0
  137. platform_api_python_client/models/prometheus_rules.py +120 -0
  138. platform_api_python_client/models/prometheus_spec.py +113 -0
  139. platform_api_python_client/models/prometheus_values.py +117 -0
  140. platform_api_python_client/models/quota.py +106 -0
  141. platform_api_python_client/models/replicas.py +106 -0
  142. platform_api_python_client/models/resource_list.py +113 -0
  143. platform_api_python_client/models/resource_requirements.py +120 -0
  144. platform_api_python_client/models/revision_pod_details.py +5 -5
  145. platform_api_python_client/models/rollout_strategy_params.py +4 -3
  146. platform_api_python_client/models/scheduler.py +117 -0
  147. platform_api_python_client/models/service_account_response.py +4 -3
  148. platform_api_python_client/models/{istio.py → toggle.py} +27 -19
  149. platform_api_python_client/models/toleration.py +134 -0
  150. platform_api_python_client/models/unified_get_compute_deployment_response.py +177 -0
  151. platform_api_python_client/models/{c_serve_recipe_perf.py → unified_get_deployment_logs_response.py} +19 -22
  152. platform_api_python_client/models/{longhorn.py → unified_get_deployment_pods_response.py} +13 -14
  153. platform_api_python_client/models/unified_get_deployment_response.py +164 -0
  154. platform_api_python_client/models/unified_get_deployment_revision_response.py +110 -0
  155. platform_api_python_client/models/{argo_rollouts.py → unified_get_deployment_rollout_response.py} +15 -13
  156. platform_api_python_client/models/unified_get_deployment_usage_response.py +110 -0
  157. platform_api_python_client/models/unified_get_dynamo_deployment_response.py +218 -0
  158. platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +228 -0
  159. platform_api_python_client/models/unified_get_job_deployment_response.py +204 -0
  160. platform_api_python_client/models/{list_c_serve_recipe_response.py → unified_list_deployment_revisions_response.py} +12 -12
  161. platform_api_python_client/models/{spire.py → unified_update_deployment_rollout_request.py} +12 -13
  162. platform_api_python_client/models/unified_write_compute_deployment_request.py +154 -0
  163. platform_api_python_client/models/unified_write_deployment_request.py +164 -0
  164. platform_api_python_client/models/unified_write_deployment_response.py +110 -0
  165. platform_api_python_client/models/unified_write_dynamo_deployment_request.py +197 -0
  166. platform_api_python_client/models/{create_c_serve_v3_deployment_request.py → unified_write_inference_v3_deployment_request.py} +86 -78
  167. platform_api_python_client/models/unified_write_job_deployment_request.py +183 -0
  168. platform_api_python_client/models/update_cluster_metadata_request.py +4 -3
  169. platform_api_python_client/models/{cluster_config.py → update_cluster_request.py} +11 -10
  170. platform_api_python_client/models/update_deployment_response.py +4 -3
  171. platform_api_python_client/models/update_deployment_status_v3_request.py +4 -3
  172. platform_api_python_client/models/update_insight_status_request.py +107 -0
  173. platform_api_python_client/models/update_service_account_request.py +4 -3
  174. platform_api_python_client/models/upsert_user_vault_item_request.py +5 -4
  175. platform_api_python_client/models/usage_availability.py +40 -0
  176. platform_api_python_client/models/usage_component.py +39 -0
  177. platform_api_python_client/models/user_vault_item.py +4 -3
  178. platform_api_python_client/models/validation_error.py +8 -8
  179. platform_api_python_client/models/volume_mount.py +4 -3
  180. platform_api_python_client/models/volume_status_response.py +4 -3
  181. platform_api_python_client/models/workload.py +110 -0
  182. platform_api_python_client/rest.py +87 -10
  183. platform_api_python_client-4.41.0.dist-info/METADATA +418 -0
  184. platform_api_python_client-4.41.0.dist-info/RECORD +206 -0
  185. {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.41.0.dist-info}/WHEEL +1 -1
  186. platform_api_python_client/models/cert_manager.py +0 -89
  187. platform_api_python_client/models/cluster_components.py +0 -193
  188. platform_api_python_client/models/final_stack.py +0 -89
  189. platform_api_python_client/models/get_c_serve_v2_deployment_response.py +0 -193
  190. platform_api_python_client/models/get_c_serve_v3_deployment_response.py +0 -194
  191. platform_api_python_client/models/gpu_operator.py +0 -89
  192. platform_api_python_client/models/kube_prometheus_stack.py +0 -89
  193. platform_api_python_client/models/metrics_server.py +0 -89
  194. platform_api_python_client/models/network_operator.py +0 -89
  195. platform_api_python_client/models/opentelemetry_collector.py +0 -89
  196. platform_api_python_client/models/spire_crds.py +0 -89
  197. platform_api_python_client/models/teleport_kube_agent.py +0 -89
  198. platform_api_python_client-4.31.0.dist-info/METADATA +0 -23
  199. platform_api_python_client-4.31.0.dist-info/RECORD +0 -151
  200. {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.41.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,187 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from platform_api_python_client.models.ccluster_catalogs_cluster_base_argo_rollouts_values import CclusterCatalogsClusterBaseArgoRolloutsValues
23
+ from platform_api_python_client.models.ccluster_catalogs_cluster_base_cert_manager_values import CclusterCatalogsClusterBaseCertManagerValues
24
+ from platform_api_python_client.models.ccluster_catalogs_cluster_base_gpu_operator_values import CclusterCatalogsClusterBaseGpuOperatorValues
25
+ from platform_api_python_client.models.ccluster_catalogs_cluster_base_ingress_nginx_values import CclusterCatalogsClusterBaseIngressNginxValues
26
+ from platform_api_python_client.models.ccluster_catalogs_cluster_base_istio_values import CclusterCatalogsClusterBaseIstioValues
27
+ from platform_api_python_client.models.ccluster_catalogs_cluster_base_kai_scheduler_values import CclusterCatalogsClusterBaseKaiSchedulerValues
28
+ from platform_api_python_client.models.ccluster_catalogs_cluster_base_keda_values import CclusterCatalogsClusterBaseKedaValues
29
+ from platform_api_python_client.models.ccluster_catalogs_cluster_base_kube_prometheus_stack_values import CclusterCatalogsClusterBaseKubePrometheusStackValues
30
+ from platform_api_python_client.models.ccluster_catalogs_cluster_base_metrics_server_values import CclusterCatalogsClusterBaseMetricsServerValues
31
+ from typing import Optional, Set
32
+ from typing_extensions import Self
33
+ from pydantic_core import to_jsonable_python
34
+
35
+ class ClusterBaseComponents(BaseModel):
36
+ """
37
+ The cluster_base components to install on a ccluster cluster, each as its chart's values. A component is installed only when its field is set (``{}`` for the catalog defaults), with exactly the values given. One left out is not installed, and is uninstalled if an earlier update installed it. final_stack is required. The values use the chart's own keys and may include keys the typed model doesn't list; they reach the chart unchanged. Inference deployments on GKE need ingress_nginx's `ingress-nginx.controller.podLabels` (`sidecar.istio.io/inject: \"true\"`), istio's CNI paths and gpu_operator's GKE driver paths. An unknown component name is rejected rather than read as one left out, which would uninstall it. With the generated Python client, build the request with `UpdateClusterRequest.from_dict(...)`: its model constructors drop the keys a typed model doesn't list (CentML/platform#4946).
38
+ """ # noqa: E501
39
+ kube_prometheus_stack: Optional[CclusterCatalogsClusterBaseKubePrometheusStackValues] = None
40
+ istio: Optional[CclusterCatalogsClusterBaseIstioValues] = None
41
+ cert_manager: Optional[CclusterCatalogsClusterBaseCertManagerValues] = None
42
+ ingress_nginx: Optional[CclusterCatalogsClusterBaseIngressNginxValues] = None
43
+ keda: Optional[CclusterCatalogsClusterBaseKedaValues] = None
44
+ argo_rollouts: Optional[CclusterCatalogsClusterBaseArgoRolloutsValues] = None
45
+ gpu_operator: Optional[CclusterCatalogsClusterBaseGpuOperatorValues] = None
46
+ kai_scheduler: Optional[CclusterCatalogsClusterBaseKaiSchedulerValues] = None
47
+ metrics_server: Optional[CclusterCatalogsClusterBaseMetricsServerValues] = None
48
+ final_stack: Dict[str, Any] = Field(description="Values of the catalogs/cluster_base/final_stack chart, generated from its Go package.")
49
+ __properties: ClassVar[List[str]] = ["kube_prometheus_stack", "istio", "cert_manager", "ingress_nginx", "keda", "argo_rollouts", "gpu_operator", "kai_scheduler", "metrics_server", "final_stack"]
50
+
51
+ model_config = ConfigDict(
52
+ validate_by_name=True,
53
+ validate_by_alias=True,
54
+ validate_assignment=True,
55
+ protected_namespaces=(),
56
+ )
57
+
58
+
59
+ def to_str(self) -> str:
60
+ """Returns the string representation of the model using alias"""
61
+ return pprint.pformat(self.model_dump(by_alias=True))
62
+
63
+ def to_json(self) -> str:
64
+ """Returns the JSON representation of the model using alias"""
65
+ return json.dumps(to_jsonable_python(self.to_dict()))
66
+
67
+ @classmethod
68
+ def from_json(cls, json_str: str) -> Optional[Self]:
69
+ """Create an instance of ClusterBaseComponents from a JSON string"""
70
+ return cls.from_dict(json.loads(json_str))
71
+
72
+ def to_dict(self) -> Dict[str, Any]:
73
+ """Return the dictionary representation of the model using alias.
74
+
75
+ This has the following differences from calling pydantic's
76
+ `self.model_dump(by_alias=True)`:
77
+
78
+ * `None` is only added to the output dict for nullable fields that
79
+ were set at model initialization. Other fields with value `None`
80
+ are ignored.
81
+ """
82
+ excluded_fields: Set[str] = set([
83
+ ])
84
+
85
+ _dict = self.model_dump(
86
+ by_alias=True,
87
+ exclude=excluded_fields,
88
+ exclude_none=True,
89
+ )
90
+ # override the default output from pydantic by calling `to_dict()` of kube_prometheus_stack
91
+ if self.kube_prometheus_stack:
92
+ _dict['kube_prometheus_stack'] = self.kube_prometheus_stack.to_dict()
93
+ # override the default output from pydantic by calling `to_dict()` of istio
94
+ if self.istio:
95
+ _dict['istio'] = self.istio.to_dict()
96
+ # override the default output from pydantic by calling `to_dict()` of cert_manager
97
+ if self.cert_manager:
98
+ _dict['cert_manager'] = self.cert_manager.to_dict()
99
+ # override the default output from pydantic by calling `to_dict()` of ingress_nginx
100
+ if self.ingress_nginx:
101
+ _dict['ingress_nginx'] = self.ingress_nginx.to_dict()
102
+ # override the default output from pydantic by calling `to_dict()` of keda
103
+ if self.keda:
104
+ _dict['keda'] = self.keda.to_dict()
105
+ # override the default output from pydantic by calling `to_dict()` of argo_rollouts
106
+ if self.argo_rollouts:
107
+ _dict['argo_rollouts'] = self.argo_rollouts.to_dict()
108
+ # override the default output from pydantic by calling `to_dict()` of gpu_operator
109
+ if self.gpu_operator:
110
+ _dict['gpu_operator'] = self.gpu_operator.to_dict()
111
+ # override the default output from pydantic by calling `to_dict()` of kai_scheduler
112
+ if self.kai_scheduler:
113
+ _dict['kai_scheduler'] = self.kai_scheduler.to_dict()
114
+ # override the default output from pydantic by calling `to_dict()` of metrics_server
115
+ if self.metrics_server:
116
+ _dict['metrics_server'] = self.metrics_server.to_dict()
117
+ # set to None if kube_prometheus_stack (nullable) is None
118
+ # and model_fields_set contains the field
119
+ if self.kube_prometheus_stack is None and "kube_prometheus_stack" in self.model_fields_set:
120
+ _dict['kube_prometheus_stack'] = None
121
+
122
+ # set to None if istio (nullable) is None
123
+ # and model_fields_set contains the field
124
+ if self.istio is None and "istio" in self.model_fields_set:
125
+ _dict['istio'] = None
126
+
127
+ # set to None if cert_manager (nullable) is None
128
+ # and model_fields_set contains the field
129
+ if self.cert_manager is None and "cert_manager" in self.model_fields_set:
130
+ _dict['cert_manager'] = None
131
+
132
+ # set to None if ingress_nginx (nullable) is None
133
+ # and model_fields_set contains the field
134
+ if self.ingress_nginx is None and "ingress_nginx" in self.model_fields_set:
135
+ _dict['ingress_nginx'] = None
136
+
137
+ # set to None if keda (nullable) is None
138
+ # and model_fields_set contains the field
139
+ if self.keda is None and "keda" in self.model_fields_set:
140
+ _dict['keda'] = None
141
+
142
+ # set to None if argo_rollouts (nullable) is None
143
+ # and model_fields_set contains the field
144
+ if self.argo_rollouts is None and "argo_rollouts" in self.model_fields_set:
145
+ _dict['argo_rollouts'] = None
146
+
147
+ # set to None if gpu_operator (nullable) is None
148
+ # and model_fields_set contains the field
149
+ if self.gpu_operator is None and "gpu_operator" in self.model_fields_set:
150
+ _dict['gpu_operator'] = None
151
+
152
+ # set to None if kai_scheduler (nullable) is None
153
+ # and model_fields_set contains the field
154
+ if self.kai_scheduler is None and "kai_scheduler" in self.model_fields_set:
155
+ _dict['kai_scheduler'] = None
156
+
157
+ # set to None if metrics_server (nullable) is None
158
+ # and model_fields_set contains the field
159
+ if self.metrics_server is None and "metrics_server" in self.model_fields_set:
160
+ _dict['metrics_server'] = None
161
+
162
+ return _dict
163
+
164
+ @classmethod
165
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
166
+ """Create an instance of ClusterBaseComponents from a dict"""
167
+ if obj is None:
168
+ return None
169
+
170
+ if not isinstance(obj, dict):
171
+ return cls.model_validate(obj)
172
+
173
+ _obj = cls.model_validate({
174
+ "kube_prometheus_stack": CclusterCatalogsClusterBaseKubePrometheusStackValues.from_dict(obj["kube_prometheus_stack"]) if obj.get("kube_prometheus_stack") is not None else None,
175
+ "istio": CclusterCatalogsClusterBaseIstioValues.from_dict(obj["istio"]) if obj.get("istio") is not None else None,
176
+ "cert_manager": CclusterCatalogsClusterBaseCertManagerValues.from_dict(obj["cert_manager"]) if obj.get("cert_manager") is not None else None,
177
+ "ingress_nginx": CclusterCatalogsClusterBaseIngressNginxValues.from_dict(obj["ingress_nginx"]) if obj.get("ingress_nginx") is not None else None,
178
+ "keda": CclusterCatalogsClusterBaseKedaValues.from_dict(obj["keda"]) if obj.get("keda") is not None else None,
179
+ "argo_rollouts": CclusterCatalogsClusterBaseArgoRolloutsValues.from_dict(obj["argo_rollouts"]) if obj.get("argo_rollouts") is not None else None,
180
+ "gpu_operator": CclusterCatalogsClusterBaseGpuOperatorValues.from_dict(obj["gpu_operator"]) if obj.get("gpu_operator") is not None else None,
181
+ "kai_scheduler": CclusterCatalogsClusterBaseKaiSchedulerValues.from_dict(obj["kai_scheduler"]) if obj.get("kai_scheduler") is not None else None,
182
+ "metrics_server": CclusterCatalogsClusterBaseMetricsServerValues.from_dict(obj["metrics_server"]) if obj.get("metrics_server") is not None else None,
183
+ "final_stack": obj.get("final_stack")
184
+ })
185
+ return _obj
186
+
187
+
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List
22
22
  from platform_api_python_client.models.gpu_type_capacity import GpuTypeCapacity
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
+ from pydantic_core import to_jsonable_python
25
26
 
26
27
  class ClusterCapacityResponse(BaseModel):
27
28
  """
@@ -33,7 +34,8 @@ class ClusterCapacityResponse(BaseModel):
33
34
  __properties: ClassVar[List[str]] = ["cluster_id", "cluster_name", "gpu_types"]
34
35
 
35
36
  model_config = ConfigDict(
36
- populate_by_name=True,
37
+ validate_by_name=True,
38
+ validate_by_alias=True,
37
39
  validate_assignment=True,
38
40
  protected_namespaces=(),
39
41
  )
@@ -45,8 +47,7 @@ class ClusterCapacityResponse(BaseModel):
45
47
 
46
48
  def to_json(self) -> str:
47
49
  """Returns the JSON representation of the model using alias"""
48
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
- return json.dumps(self.to_dict())
50
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
51
 
51
52
  @classmethod
52
53
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -75,8 +76,7 @@ class ClusterCapacityResponse(BaseModel):
75
76
  _items = []
76
77
  if self.gpu_types:
77
78
  for _item_gpu_types in self.gpu_types:
78
- if _item_gpu_types:
79
- _items.append(_item_gpu_types.to_dict())
79
+ _items.append(_item_gpu_types.to_dict() if _item_gpu_types is not None else None)
80
80
  _dict['gpu_types'] = _items
81
81
  return _dict
82
82
 
@@ -17,10 +17,11 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
24
25
 
25
26
  class ClusterCredential(BaseModel):
26
27
  """
@@ -28,11 +29,12 @@ class ClusterCredential(BaseModel):
28
29
  """ # noqa: E501
29
30
  server: StrictStr
30
31
  bearer_token: StrictStr
31
- ca_cert: StrictStr
32
+ ca_cert: StrictStr = Field(description="Base64-encoded PEM CA certificate of the cluster's API server, as in a kubeconfig's `certificate-authority-data` or the `ca.crt` key of a service-account token Secret's `data`.")
32
33
  __properties: ClassVar[List[str]] = ["server", "bearer_token", "ca_cert"]
33
34
 
34
35
  model_config = ConfigDict(
35
- populate_by_name=True,
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
36
38
  validate_assignment=True,
37
39
  protected_namespaces=(),
38
40
  )
@@ -44,8 +46,7 @@ class ClusterCredential(BaseModel):
44
46
 
45
47
  def to_json(self) -> str:
46
48
  """Returns the JSON representation of the model using alias"""
47
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
- return json.dumps(self.to_dict())
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
50
 
50
51
  @classmethod
51
52
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -23,6 +23,7 @@ from platform_api_python_client.models.cloud_provider import CloudProvider
23
23
  from platform_api_python_client.models.cluster_credential import ClusterCredential
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
26
27
 
27
28
  class ClusterRegistrationRequest(BaseModel):
28
29
  """
@@ -36,7 +37,8 @@ class ClusterRegistrationRequest(BaseModel):
36
37
  __properties: ClassVar[List[str]] = ["display_name", "storage_class", "region", "cloud_provider", "credential"]
37
38
 
38
39
  model_config = ConfigDict(
39
- populate_by_name=True,
40
+ validate_by_name=True,
41
+ validate_by_alias=True,
40
42
  validate_assignment=True,
41
43
  protected_namespaces=(),
42
44
  )
@@ -48,8 +50,7 @@ class ClusterRegistrationRequest(BaseModel):
48
50
 
49
51
  def to_json(self) -> str:
50
52
  """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
+ return json.dumps(to_jsonable_python(self.to_dict()))
53
54
 
54
55
  @classmethod
55
56
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt
21
21
  from typing import Any, ClassVar, Dict, List
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
24
25
 
25
26
  class ClusterRegistrationResponse(BaseModel):
26
27
  """
@@ -30,7 +31,8 @@ class ClusterRegistrationResponse(BaseModel):
30
31
  __properties: ClassVar[List[str]] = ["id"]
31
32
 
32
33
  model_config = ConfigDict(
33
- populate_by_name=True,
34
+ validate_by_name=True,
35
+ validate_by_alias=True,
34
36
  validate_assignment=True,
35
37
  protected_namespaces=(),
36
38
  )
@@ -42,8 +44,7 @@ class ClusterRegistrationResponse(BaseModel):
42
44
 
43
45
  def to_json(self) -> str:
44
46
  """Returns the JSON representation of the model using alias"""
45
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
- return json.dumps(self.to_dict())
47
+ return json.dumps(to_jsonable_python(self.to_dict()))
47
48
 
48
49
  @classmethod
49
50
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,17 +21,20 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
+ from pydantic_core import to_jsonable_python
24
25
 
25
- class IstioCniOverrides(BaseModel):
26
+ class CNI(BaseModel):
26
27
  """
27
- IstioCniOverrides
28
+ CNI is where istio-cni writes its plugin binary and configuration. These are the only values in this chart that must be tuned per cluster: the chart's defaults are the standard paths, and the correct paths depend on the node image.
28
29
  """ # noqa: E501
29
- cni_bin_dir: Optional[StrictStr] = Field(default=None, alias="cniBinDir")
30
30
  cni_conf_dir: Optional[StrictStr] = Field(default=None, alias="cniConfDir")
31
- __properties: ClassVar[List[str]] = ["cniBinDir", "cniConfDir"]
31
+ cni_bin_dir: Optional[StrictStr] = Field(default=None, alias="cniBinDir")
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties: ClassVar[List[str]] = ["cniConfDir", "cniBinDir"]
32
34
 
33
35
  model_config = ConfigDict(
34
- populate_by_name=True,
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
35
38
  validate_assignment=True,
36
39
  protected_namespaces=(),
37
40
  )
@@ -43,12 +46,11 @@ class IstioCniOverrides(BaseModel):
43
46
 
44
47
  def to_json(self) -> str:
45
48
  """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
- return json.dumps(self.to_dict())
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
48
50
 
49
51
  @classmethod
50
52
  def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of IstioCniOverrides from a JSON string"""
53
+ """Create an instance of CNI from a JSON string"""
52
54
  return cls.from_dict(json.loads(json_str))
53
55
 
54
56
  def to_dict(self) -> Dict[str, Any]:
@@ -60,8 +62,10 @@ class IstioCniOverrides(BaseModel):
60
62
  * `None` is only added to the output dict for nullable fields that
61
63
  were set at model initialization. Other fields with value `None`
62
64
  are ignored.
65
+ * Fields in `self.additional_properties` are added to the output dict.
63
66
  """
64
67
  excluded_fields: Set[str] = set([
68
+ "additional_properties",
65
69
  ])
66
70
 
67
71
  _dict = self.model_dump(
@@ -69,21 +73,26 @@ class IstioCniOverrides(BaseModel):
69
73
  exclude=excluded_fields,
70
74
  exclude_none=True,
71
75
  )
72
- # set to None if cni_bin_dir (nullable) is None
73
- # and model_fields_set contains the field
74
- if self.cni_bin_dir is None and "cni_bin_dir" in self.model_fields_set:
75
- _dict['cniBinDir'] = None
76
+ # puts key-value pairs in additional_properties in the top level
77
+ if self.additional_properties is not None:
78
+ for _key, _value in self.additional_properties.items():
79
+ _dict[_key] = _value
76
80
 
77
81
  # set to None if cni_conf_dir (nullable) is None
78
82
  # and model_fields_set contains the field
79
83
  if self.cni_conf_dir is None and "cni_conf_dir" in self.model_fields_set:
80
84
  _dict['cniConfDir'] = None
81
85
 
86
+ # set to None if cni_bin_dir (nullable) is None
87
+ # and model_fields_set contains the field
88
+ if self.cni_bin_dir is None and "cni_bin_dir" in self.model_fields_set:
89
+ _dict['cniBinDir'] = None
90
+
82
91
  return _dict
83
92
 
84
93
  @classmethod
85
94
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of IstioCniOverrides from a dict"""
95
+ """Create an instance of CNI from a dict"""
87
96
  if obj is None:
88
97
  return None
89
98
 
@@ -91,9 +100,14 @@ class IstioCniOverrides(BaseModel):
91
100
  return cls.model_validate(obj)
92
101
 
93
102
  _obj = cls.model_validate({
94
- "cniBinDir": obj.get("cniBinDir"),
95
- "cniConfDir": obj.get("cniConfDir")
103
+ "cniConfDir": obj.get("cniConfDir"),
104
+ "cniBinDir": obj.get("cniBinDir")
96
105
  })
106
+ # store additional fields in additional_properties
107
+ for _key in obj.keys():
108
+ if _key not in cls.__properties:
109
+ _obj.additional_properties[_key] = obj.get(_key)
110
+
97
111
  return _obj
98
112
 
99
113
 
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List
22
22
  from typing_extensions import Annotated
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
+ from pydantic_core import to_jsonable_python
25
26
 
26
27
  class ConfigFileMount(BaseModel):
27
28
  """
@@ -32,15 +33,16 @@ class ConfigFileMount(BaseModel):
32
33
  content: Annotated[str, Field(min_length=1, strict=True)]
33
34
  __properties: ClassVar[List[str]] = ["filename", "mount_path", "content"]
34
35
 
35
- @field_validator('filename')
36
+ @field_validator('filename', mode="before")
36
37
  def filename_validate_regular_expression(cls, value):
37
38
  """Validates the regular expression"""
38
- if not re.match(r"^[a-zA-Z0-9._-]+$", value):
39
+ if isinstance(value, str) and not re.match(r"^[a-zA-Z0-9._-]+$", value):
39
40
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9._-]+$/")
40
41
  return value
41
42
 
42
43
  model_config = ConfigDict(
43
- populate_by_name=True,
44
+ validate_by_name=True,
45
+ validate_by_alias=True,
44
46
  validate_assignment=True,
45
47
  protected_namespaces=(),
46
48
  )
@@ -52,8 +54,7 @@ class ConfigFileMount(BaseModel):
52
54
 
53
55
  def to_json(self) -> str:
54
56
  """Returns the JSON representation of the model using alias"""
55
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
- return json.dumps(self.to_dict())
57
+ return json.dumps(to_jsonable_python(self.to_dict()))
57
58
 
58
59
  @classmethod
59
60
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -24,6 +24,7 @@ from platform_api_python_client.models.image_pull_secret_credentials import Imag
24
24
  from platform_api_python_client.models.volume_mount import VolumeMount
25
25
  from typing import Optional, Set
26
26
  from typing_extensions import Self
27
+ from pydantic_core import to_jsonable_python
27
28
 
28
29
  class CreateComputeDeploymentRequest(BaseModel):
29
30
  """
@@ -35,22 +36,36 @@ class CreateComputeDeploymentRequest(BaseModel):
35
36
  user_annotations: Optional[Dict[str, StrictStr]] = None
36
37
  chart_revision: Optional[StrictStr] = None
37
38
  volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
38
- priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
39
+ priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = Field(default=None, description="Kubernetes PriorityClass name on the pod spec. Omit to leave unset.")
39
40
  image_url: StrictStr
40
41
  image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
42
+ image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
43
+ image_pull_secret_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = Field(default=None, description="Name of a pre-existing image pull Secret in the deployment namespace. Created, refreshed and deleted externally. Mutually exclusive with inline registry credentials and image_pull_ref. Include on updates to retain it; null clears it.")
44
+ env_vars_refs: Optional[Dict[str, Any]] = None
41
45
  ssh_public_key: StrictStr
42
46
  enable_logging: Optional[StrictBool] = False
43
- __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "image_url", "image_pull_secret_credentials", "ssh_public_key", "enable_logging"]
47
+ __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "image_url", "image_pull_secret_credentials", "image_pull_ref", "image_pull_secret_name", "env_vars_refs", "ssh_public_key", "enable_logging"]
44
48
 
45
- @field_validator('name')
49
+ @field_validator('name', mode="before")
46
50
  def name_validate_regular_expression(cls, value):
47
51
  """Validates the regular expression"""
48
- if not re.match(r"^[a-z][a-z0-9-]*$", value):
52
+ if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
49
53
  raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
50
54
  return value
51
55
 
56
+ @field_validator('image_pull_secret_name', mode="before")
57
+ def image_pull_secret_name_validate_regular_expression(cls, value):
58
+ """Validates the regular expression"""
59
+ if value is None:
60
+ return value
61
+
62
+ if isinstance(value, str) and not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
63
+ raise ValueError(r"must validate the regular expression /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/")
64
+ return value
65
+
52
66
  model_config = ConfigDict(
53
- populate_by_name=True,
67
+ validate_by_name=True,
68
+ validate_by_alias=True,
54
69
  validate_assignment=True,
55
70
  protected_namespaces=(),
56
71
  )
@@ -62,8 +77,7 @@ class CreateComputeDeploymentRequest(BaseModel):
62
77
 
63
78
  def to_json(self) -> str:
64
79
  """Returns the JSON representation of the model using alias"""
65
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
66
- return json.dumps(self.to_dict())
80
+ return json.dumps(to_jsonable_python(self.to_dict()))
67
81
 
68
82
  @classmethod
69
83
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -92,8 +106,7 @@ class CreateComputeDeploymentRequest(BaseModel):
92
106
  _items = []
93
107
  if self.volume_mounts:
94
108
  for _item_volume_mounts in self.volume_mounts:
95
- if _item_volume_mounts:
96
- _items.append(_item_volume_mounts.to_dict())
109
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
97
110
  _dict['volume_mounts'] = _items
98
111
  # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
99
112
  if self.image_pull_secret_credentials:
@@ -113,6 +126,16 @@ class CreateComputeDeploymentRequest(BaseModel):
113
126
  if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
114
127
  _dict['image_pull_secret_credentials'] = None
115
128
 
129
+ # set to None if image_pull_ref (nullable) is None
130
+ # and model_fields_set contains the field
131
+ if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
132
+ _dict['image_pull_ref'] = None
133
+
134
+ # set to None if image_pull_secret_name (nullable) is None
135
+ # and model_fields_set contains the field
136
+ if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
137
+ _dict['image_pull_secret_name'] = None
138
+
116
139
  return _dict
117
140
 
118
141
  @classmethod
@@ -134,6 +157,9 @@ class CreateComputeDeploymentRequest(BaseModel):
134
157
  "priority": obj.get("priority"),
135
158
  "image_url": obj.get("image_url"),
136
159
  "image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
160
+ "image_pull_ref": obj.get("image_pull_ref"),
161
+ "image_pull_secret_name": obj.get("image_pull_secret_name"),
162
+ "env_vars_refs": obj.get("env_vars_refs"),
137
163
  "ssh_public_key": obj.get("ssh_public_key"),
138
164
  "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False
139
165
  })
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
+ from pydantic_core import to_jsonable_python
25
26
 
26
27
  class CreateComputeDeploymentResponse(BaseModel):
27
28
  """
@@ -34,7 +35,8 @@ class CreateComputeDeploymentResponse(BaseModel):
34
35
  __properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url", "port"]
35
36
 
36
37
  model_config = ConfigDict(
37
- populate_by_name=True,
38
+ validate_by_name=True,
39
+ validate_by_alias=True,
38
40
  validate_assignment=True,
39
41
  protected_namespaces=(),
40
42
  )
@@ -46,8 +48,7 @@ class CreateComputeDeploymentResponse(BaseModel):
46
48
 
47
49
  def to_json(self) -> str:
48
50
  """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]: