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,218 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from platform_api_python_client.models.ccl_dynamo_pools import CclDynamoPools
25
+ from platform_api_python_client.models.deployment_status import DeploymentStatus
26
+ from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
27
+ from platform_api_python_client.models.dynamo_image import DynamoImage
28
+ from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
29
+ from platform_api_python_client.models.env import Env
30
+ from platform_api_python_client.models.ingress import Ingress
31
+ from platform_api_python_client.models.volume_mount import VolumeMount
32
+ from typing import Optional, Set
33
+ from typing_extensions import Self
34
+ from pydantic_core import to_jsonable_python
35
+
36
+ class UnifiedGetDynamoDeploymentResponse(BaseModel):
37
+ """
38
+ UnifiedGetDynamoDeploymentResponse
39
+ """ # noqa: E501
40
+ id: StrictInt
41
+ status: DeploymentStatus
42
+ creator_email: StrictStr
43
+ created_at: datetime
44
+ updated_at: datetime
45
+ revision_number: StrictInt
46
+ endpoint_url: Optional[StrictStr]
47
+ type: StrictStr
48
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
49
+ cluster_id: StrictInt
50
+ user_annotations: Optional[Dict[str, StrictStr]] = None
51
+ chart_revision: Optional[StrictStr] = None
52
+ volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
53
+ 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.")
54
+ pools: CclDynamoPools
55
+ env: Optional[Env] = None
56
+ image: Optional[DynamoImage] = None
57
+ ingress: Ingress
58
+ serving_mode: Optional[DynamoServingMode] = None
59
+ communications: Optional[DynamoCommunicationsInput] = Field(default=None, description="Platform-managed worker communications. Only disaggregated KV transfer is supported. Omit or set null to preserve the legacy connector configuration.")
60
+ model: StrictStr
61
+ served_model_name: Optional[StrictStr] = None
62
+ extra_args: Optional[StrictStr] = Field(default=None, description="Extra worker CLI arguments as a single shell-style string, split into argv with POSIX shell quoting (shlex). Backslash is an escape character, so `\\` is consumed unless quoted: e.g. `--regex \\d+` reaches the worker as `d+`. Wrap literal backslashes in single quotes (`--regex '\\d+'`). Unbalanced quotes or a trailing backslash are rejected.")
63
+ hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Access-token vault item ID for HF_TOKEN.")
64
+ enable_logging: Optional[StrictBool] = True
65
+ enable_node_model_cache: Optional[StrictBool] = False
66
+ __properties: ClassVar[List[str]] = ["id", "status", "creator_email", "created_at", "updated_at", "revision_number", "endpoint_url", "type", "name", "cluster_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "pools", "env", "image", "ingress", "serving_mode", "communications", "model", "served_model_name", "extra_args", "hf_token_ref", "enable_logging", "enable_node_model_cache"]
67
+
68
+ @field_validator('type')
69
+ def type_validate_enum(cls, value):
70
+ """Validates the enum"""
71
+ if value not in set(['ccl_dynamo']):
72
+ raise ValueError("must be one of enum values ('ccl_dynamo')")
73
+ return value
74
+
75
+ @field_validator('name', mode="before")
76
+ def name_validate_regular_expression(cls, value):
77
+ """Validates the regular expression"""
78
+ if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
79
+ raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
80
+ return value
81
+
82
+ model_config = ConfigDict(
83
+ validate_by_name=True,
84
+ validate_by_alias=True,
85
+ validate_assignment=True,
86
+ protected_namespaces=(),
87
+ )
88
+
89
+
90
+ def to_str(self) -> str:
91
+ """Returns the string representation of the model using alias"""
92
+ return pprint.pformat(self.model_dump(by_alias=True))
93
+
94
+ def to_json(self) -> str:
95
+ """Returns the JSON representation of the model using alias"""
96
+ return json.dumps(to_jsonable_python(self.to_dict()))
97
+
98
+ @classmethod
99
+ def from_json(cls, json_str: str) -> Optional[Self]:
100
+ """Create an instance of UnifiedGetDynamoDeploymentResponse from a JSON string"""
101
+ return cls.from_dict(json.loads(json_str))
102
+
103
+ def to_dict(self) -> Dict[str, Any]:
104
+ """Return the dictionary representation of the model using alias.
105
+
106
+ This has the following differences from calling pydantic's
107
+ `self.model_dump(by_alias=True)`:
108
+
109
+ * `None` is only added to the output dict for nullable fields that
110
+ were set at model initialization. Other fields with value `None`
111
+ are ignored.
112
+ """
113
+ excluded_fields: Set[str] = set([
114
+ ])
115
+
116
+ _dict = self.model_dump(
117
+ by_alias=True,
118
+ exclude=excluded_fields,
119
+ exclude_none=True,
120
+ )
121
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
122
+ _items = []
123
+ if self.volume_mounts:
124
+ for _item_volume_mounts in self.volume_mounts:
125
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
126
+ _dict['volume_mounts'] = _items
127
+ # override the default output from pydantic by calling `to_dict()` of pools
128
+ if self.pools:
129
+ _dict['pools'] = self.pools.to_dict()
130
+ # override the default output from pydantic by calling `to_dict()` of env
131
+ if self.env:
132
+ _dict['env'] = self.env.to_dict()
133
+ # override the default output from pydantic by calling `to_dict()` of image
134
+ if self.image:
135
+ _dict['image'] = self.image.to_dict()
136
+ # override the default output from pydantic by calling `to_dict()` of ingress
137
+ if self.ingress:
138
+ _dict['ingress'] = self.ingress.to_dict()
139
+ # override the default output from pydantic by calling `to_dict()` of communications
140
+ if self.communications:
141
+ _dict['communications'] = self.communications.to_dict()
142
+ # set to None if endpoint_url (nullable) is None
143
+ # and model_fields_set contains the field
144
+ if self.endpoint_url is None and "endpoint_url" in self.model_fields_set:
145
+ _dict['endpoint_url'] = None
146
+
147
+ # set to None if user_annotations (nullable) is None
148
+ # and model_fields_set contains the field
149
+ if self.user_annotations is None and "user_annotations" in self.model_fields_set:
150
+ _dict['user_annotations'] = None
151
+
152
+ # set to None if priority (nullable) is None
153
+ # and model_fields_set contains the field
154
+ if self.priority is None and "priority" in self.model_fields_set:
155
+ _dict['priority'] = None
156
+
157
+ # set to None if communications (nullable) is None
158
+ # and model_fields_set contains the field
159
+ if self.communications is None and "communications" in self.model_fields_set:
160
+ _dict['communications'] = None
161
+
162
+ # set to None if served_model_name (nullable) is None
163
+ # and model_fields_set contains the field
164
+ if self.served_model_name is None and "served_model_name" in self.model_fields_set:
165
+ _dict['served_model_name'] = None
166
+
167
+ # set to None if extra_args (nullable) is None
168
+ # and model_fields_set contains the field
169
+ if self.extra_args is None and "extra_args" in self.model_fields_set:
170
+ _dict['extra_args'] = None
171
+
172
+ # set to None if hf_token_ref (nullable) is None
173
+ # and model_fields_set contains the field
174
+ if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
175
+ _dict['hf_token_ref'] = None
176
+
177
+ return _dict
178
+
179
+ @classmethod
180
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
181
+ """Create an instance of UnifiedGetDynamoDeploymentResponse from a dict"""
182
+ if obj is None:
183
+ return None
184
+
185
+ if not isinstance(obj, dict):
186
+ return cls.model_validate(obj)
187
+
188
+ _obj = cls.model_validate({
189
+ "id": obj.get("id"),
190
+ "status": obj.get("status"),
191
+ "creator_email": obj.get("creator_email"),
192
+ "created_at": obj.get("created_at"),
193
+ "updated_at": obj.get("updated_at"),
194
+ "revision_number": obj.get("revision_number"),
195
+ "endpoint_url": obj.get("endpoint_url"),
196
+ "type": obj.get("type"),
197
+ "name": obj.get("name"),
198
+ "cluster_id": obj.get("cluster_id"),
199
+ "user_annotations": obj.get("user_annotations"),
200
+ "chart_revision": obj.get("chart_revision"),
201
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
202
+ "priority": obj.get("priority"),
203
+ "pools": CclDynamoPools.from_dict(obj["pools"]) if obj.get("pools") is not None else None,
204
+ "env": Env.from_dict(obj["env"]) if obj.get("env") is not None else None,
205
+ "image": DynamoImage.from_dict(obj["image"]) if obj.get("image") is not None else None,
206
+ "ingress": Ingress.from_dict(obj["ingress"]) if obj.get("ingress") is not None else None,
207
+ "serving_mode": obj.get("serving_mode"),
208
+ "communications": DynamoCommunicationsInput.from_dict(obj["communications"]) if obj.get("communications") is not None else None,
209
+ "model": obj.get("model"),
210
+ "served_model_name": obj.get("served_model_name"),
211
+ "extra_args": obj.get("extra_args"),
212
+ "hf_token_ref": obj.get("hf_token_ref"),
213
+ "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
214
+ "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False
215
+ })
216
+ return _obj
217
+
218
+
@@ -0,0 +1,228 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from platform_api_python_client.models.ccl_main_pools import CclMainPools
25
+ from platform_api_python_client.models.config_file_mount import ConfigFileMount
26
+ from platform_api_python_client.models.deployment_status import DeploymentStatus
27
+ from platform_api_python_client.models.env import Env
28
+ from platform_api_python_client.models.image import Image
29
+ from platform_api_python_client.models.ingress import Ingress
30
+ from platform_api_python_client.models.metrics_config import MetricsConfig
31
+ from platform_api_python_client.models.volume_mount import VolumeMount
32
+ from typing import Optional, Set
33
+ from typing_extensions import Self
34
+ from pydantic_core import to_jsonable_python
35
+
36
+ class UnifiedGetInferenceV3DeploymentResponse(BaseModel):
37
+ """
38
+ UnifiedGetInferenceV3DeploymentResponse
39
+ """ # noqa: E501
40
+ id: StrictInt
41
+ status: DeploymentStatus
42
+ creator_email: StrictStr
43
+ created_at: datetime
44
+ updated_at: datetime
45
+ revision_number: StrictInt
46
+ endpoint_url: Optional[StrictStr]
47
+ type: StrictStr
48
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
49
+ cluster_id: StrictInt
50
+ user_annotations: Optional[Dict[str, StrictStr]] = None
51
+ chart_revision: Optional[StrictStr] = None
52
+ volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
53
+ 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.")
54
+ pools: CclMainPools
55
+ env: Optional[Env] = None
56
+ image: Image
57
+ ingress: Ingress
58
+ port: Annotated[int, Field(le=65535, strict=True, ge=1)]
59
+ healthcheck: Optional[StrictStr] = None
60
+ command: Optional[StrictStr] = None
61
+ config_file: Optional[ConfigFileMount] = None
62
+ hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Access-token vault item ID for HF_TOKEN.")
63
+ session_affinity: Optional[StrictBool] = Field(default=False, description="Enable best-effort sticky routing via the `X-Session-Id` request header. Requests carrying the same header value land on the same pod, improving KV cache reuse for agentic workloads. Requests without the header are routed at random. Affinity is NOT durable: scaling, rollouts, restarts, or readiness-probe transitions will remap sessions to different pods. Do not use for irreplaceable in-pod state.")
64
+ metrics: Optional[MetricsConfig] = None
65
+ enable_logging: Optional[StrictBool] = False
66
+ enable_node_model_cache: Optional[StrictBool] = False
67
+ __properties: ClassVar[List[str]] = ["id", "status", "creator_email", "created_at", "updated_at", "revision_number", "endpoint_url", "type", "name", "cluster_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "pools", "env", "image", "ingress", "port", "healthcheck", "command", "config_file", "hf_token_ref", "session_affinity", "metrics", "enable_logging", "enable_node_model_cache"]
68
+
69
+ @field_validator('type')
70
+ def type_validate_enum(cls, value):
71
+ """Validates the enum"""
72
+ if value not in set(['ccl_inference']):
73
+ raise ValueError("must be one of enum values ('ccl_inference')")
74
+ return value
75
+
76
+ @field_validator('name', mode="before")
77
+ def name_validate_regular_expression(cls, value):
78
+ """Validates the regular expression"""
79
+ if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
80
+ raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
81
+ return value
82
+
83
+ model_config = ConfigDict(
84
+ validate_by_name=True,
85
+ validate_by_alias=True,
86
+ validate_assignment=True,
87
+ protected_namespaces=(),
88
+ )
89
+
90
+
91
+ def to_str(self) -> str:
92
+ """Returns the string representation of the model using alias"""
93
+ return pprint.pformat(self.model_dump(by_alias=True))
94
+
95
+ def to_json(self) -> str:
96
+ """Returns the JSON representation of the model using alias"""
97
+ return json.dumps(to_jsonable_python(self.to_dict()))
98
+
99
+ @classmethod
100
+ def from_json(cls, json_str: str) -> Optional[Self]:
101
+ """Create an instance of UnifiedGetInferenceV3DeploymentResponse from a JSON string"""
102
+ return cls.from_dict(json.loads(json_str))
103
+
104
+ def to_dict(self) -> Dict[str, Any]:
105
+ """Return the dictionary representation of the model using alias.
106
+
107
+ This has the following differences from calling pydantic's
108
+ `self.model_dump(by_alias=True)`:
109
+
110
+ * `None` is only added to the output dict for nullable fields that
111
+ were set at model initialization. Other fields with value `None`
112
+ are ignored.
113
+ """
114
+ excluded_fields: Set[str] = set([
115
+ ])
116
+
117
+ _dict = self.model_dump(
118
+ by_alias=True,
119
+ exclude=excluded_fields,
120
+ exclude_none=True,
121
+ )
122
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
123
+ _items = []
124
+ if self.volume_mounts:
125
+ for _item_volume_mounts in self.volume_mounts:
126
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
127
+ _dict['volume_mounts'] = _items
128
+ # override the default output from pydantic by calling `to_dict()` of pools
129
+ if self.pools:
130
+ _dict['pools'] = self.pools.to_dict()
131
+ # override the default output from pydantic by calling `to_dict()` of env
132
+ if self.env:
133
+ _dict['env'] = self.env.to_dict()
134
+ # override the default output from pydantic by calling `to_dict()` of image
135
+ if self.image:
136
+ _dict['image'] = self.image.to_dict()
137
+ # override the default output from pydantic by calling `to_dict()` of ingress
138
+ if self.ingress:
139
+ _dict['ingress'] = self.ingress.to_dict()
140
+ # override the default output from pydantic by calling `to_dict()` of config_file
141
+ if self.config_file:
142
+ _dict['config_file'] = self.config_file.to_dict()
143
+ # override the default output from pydantic by calling `to_dict()` of metrics
144
+ if self.metrics:
145
+ _dict['metrics'] = self.metrics.to_dict()
146
+ # set to None if endpoint_url (nullable) is None
147
+ # and model_fields_set contains the field
148
+ if self.endpoint_url is None and "endpoint_url" in self.model_fields_set:
149
+ _dict['endpoint_url'] = None
150
+
151
+ # set to None if user_annotations (nullable) is None
152
+ # and model_fields_set contains the field
153
+ if self.user_annotations is None and "user_annotations" in self.model_fields_set:
154
+ _dict['user_annotations'] = None
155
+
156
+ # set to None if priority (nullable) is None
157
+ # and model_fields_set contains the field
158
+ if self.priority is None and "priority" in self.model_fields_set:
159
+ _dict['priority'] = None
160
+
161
+ # set to None if healthcheck (nullable) is None
162
+ # and model_fields_set contains the field
163
+ if self.healthcheck is None and "healthcheck" in self.model_fields_set:
164
+ _dict['healthcheck'] = None
165
+
166
+ # set to None if command (nullable) is None
167
+ # and model_fields_set contains the field
168
+ if self.command is None and "command" in self.model_fields_set:
169
+ _dict['command'] = None
170
+
171
+ # set to None if config_file (nullable) is None
172
+ # and model_fields_set contains the field
173
+ if self.config_file is None and "config_file" in self.model_fields_set:
174
+ _dict['config_file'] = None
175
+
176
+ # set to None if hf_token_ref (nullable) is None
177
+ # and model_fields_set contains the field
178
+ if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
179
+ _dict['hf_token_ref'] = None
180
+
181
+ # set to None if metrics (nullable) is None
182
+ # and model_fields_set contains the field
183
+ if self.metrics is None and "metrics" in self.model_fields_set:
184
+ _dict['metrics'] = None
185
+
186
+ return _dict
187
+
188
+ @classmethod
189
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
190
+ """Create an instance of UnifiedGetInferenceV3DeploymentResponse from a dict"""
191
+ if obj is None:
192
+ return None
193
+
194
+ if not isinstance(obj, dict):
195
+ return cls.model_validate(obj)
196
+
197
+ _obj = cls.model_validate({
198
+ "id": obj.get("id"),
199
+ "status": obj.get("status"),
200
+ "creator_email": obj.get("creator_email"),
201
+ "created_at": obj.get("created_at"),
202
+ "updated_at": obj.get("updated_at"),
203
+ "revision_number": obj.get("revision_number"),
204
+ "endpoint_url": obj.get("endpoint_url"),
205
+ "type": obj.get("type"),
206
+ "name": obj.get("name"),
207
+ "cluster_id": obj.get("cluster_id"),
208
+ "user_annotations": obj.get("user_annotations"),
209
+ "chart_revision": obj.get("chart_revision"),
210
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
211
+ "priority": obj.get("priority"),
212
+ "pools": CclMainPools.from_dict(obj["pools"]) if obj.get("pools") is not None else None,
213
+ "env": Env.from_dict(obj["env"]) if obj.get("env") is not None else None,
214
+ "image": Image.from_dict(obj["image"]) if obj.get("image") is not None else None,
215
+ "ingress": Ingress.from_dict(obj["ingress"]) if obj.get("ingress") is not None else None,
216
+ "port": obj.get("port"),
217
+ "healthcheck": obj.get("healthcheck"),
218
+ "command": obj.get("command"),
219
+ "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None,
220
+ "hf_token_ref": obj.get("hf_token_ref"),
221
+ "session_affinity": obj.get("session_affinity") if obj.get("session_affinity") is not None else False,
222
+ "metrics": MetricsConfig.from_dict(obj["metrics"]) if obj.get("metrics") is not None else None,
223
+ "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False,
224
+ "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False
225
+ })
226
+ return _obj
227
+
228
+
@@ -0,0 +1,204 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from platform_api_python_client.models.ccl_main_pools import CclMainPools
25
+ from platform_api_python_client.models.config_file_mount import ConfigFileMount
26
+ from platform_api_python_client.models.deployment_status import DeploymentStatus
27
+ from platform_api_python_client.models.env import Env
28
+ from platform_api_python_client.models.image import Image
29
+ from platform_api_python_client.models.volume_mount import VolumeMount
30
+ from typing import Optional, Set
31
+ from typing_extensions import Self
32
+ from pydantic_core import to_jsonable_python
33
+
34
+ class UnifiedGetJobDeploymentResponse(BaseModel):
35
+ """
36
+ UnifiedGetJobDeploymentResponse
37
+ """ # noqa: E501
38
+ id: StrictInt
39
+ status: DeploymentStatus
40
+ creator_email: StrictStr
41
+ created_at: datetime
42
+ updated_at: datetime
43
+ revision_number: StrictInt
44
+ endpoint_url: Optional[StrictStr]
45
+ type: StrictStr
46
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
47
+ cluster_id: StrictInt
48
+ user_annotations: Optional[Dict[str, StrictStr]] = None
49
+ chart_revision: Optional[StrictStr] = None
50
+ volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
51
+ 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.")
52
+ pools: CclMainPools
53
+ env: Optional[Env] = None
54
+ image: Image
55
+ command: Optional[StrictStr] = None
56
+ config_file: Optional[ConfigFileMount] = None
57
+ completions: Optional[Annotated[int, Field(strict=True, ge=1)]] = 1
58
+ parallelism: Optional[Annotated[int, Field(strict=True, ge=1)]] = 1
59
+ backoff_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = 3
60
+ active_deadline_seconds: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
61
+ enable_logging: Optional[StrictBool] = True
62
+ __properties: ClassVar[List[str]] = ["id", "status", "creator_email", "created_at", "updated_at", "revision_number", "endpoint_url", "type", "name", "cluster_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "pools", "env", "image", "command", "config_file", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "enable_logging"]
63
+
64
+ @field_validator('type')
65
+ def type_validate_enum(cls, value):
66
+ """Validates the enum"""
67
+ if value not in set(['ccl_job']):
68
+ raise ValueError("must be one of enum values ('ccl_job')")
69
+ return value
70
+
71
+ @field_validator('name', mode="before")
72
+ def name_validate_regular_expression(cls, value):
73
+ """Validates the regular expression"""
74
+ if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
75
+ raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
76
+ return value
77
+
78
+ model_config = ConfigDict(
79
+ validate_by_name=True,
80
+ validate_by_alias=True,
81
+ validate_assignment=True,
82
+ protected_namespaces=(),
83
+ )
84
+
85
+
86
+ def to_str(self) -> str:
87
+ """Returns the string representation of the model using alias"""
88
+ return pprint.pformat(self.model_dump(by_alias=True))
89
+
90
+ def to_json(self) -> str:
91
+ """Returns the JSON representation of the model using alias"""
92
+ return json.dumps(to_jsonable_python(self.to_dict()))
93
+
94
+ @classmethod
95
+ def from_json(cls, json_str: str) -> Optional[Self]:
96
+ """Create an instance of UnifiedGetJobDeploymentResponse from a JSON string"""
97
+ return cls.from_dict(json.loads(json_str))
98
+
99
+ def to_dict(self) -> Dict[str, Any]:
100
+ """Return the dictionary representation of the model using alias.
101
+
102
+ This has the following differences from calling pydantic's
103
+ `self.model_dump(by_alias=True)`:
104
+
105
+ * `None` is only added to the output dict for nullable fields that
106
+ were set at model initialization. Other fields with value `None`
107
+ are ignored.
108
+ """
109
+ excluded_fields: Set[str] = set([
110
+ ])
111
+
112
+ _dict = self.model_dump(
113
+ by_alias=True,
114
+ exclude=excluded_fields,
115
+ exclude_none=True,
116
+ )
117
+ # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
118
+ _items = []
119
+ if self.volume_mounts:
120
+ for _item_volume_mounts in self.volume_mounts:
121
+ _items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
122
+ _dict['volume_mounts'] = _items
123
+ # override the default output from pydantic by calling `to_dict()` of pools
124
+ if self.pools:
125
+ _dict['pools'] = self.pools.to_dict()
126
+ # override the default output from pydantic by calling `to_dict()` of env
127
+ if self.env:
128
+ _dict['env'] = self.env.to_dict()
129
+ # override the default output from pydantic by calling `to_dict()` of image
130
+ if self.image:
131
+ _dict['image'] = self.image.to_dict()
132
+ # override the default output from pydantic by calling `to_dict()` of config_file
133
+ if self.config_file:
134
+ _dict['config_file'] = self.config_file.to_dict()
135
+ # set to None if endpoint_url (nullable) is None
136
+ # and model_fields_set contains the field
137
+ if self.endpoint_url is None and "endpoint_url" in self.model_fields_set:
138
+ _dict['endpoint_url'] = None
139
+
140
+ # set to None if user_annotations (nullable) is None
141
+ # and model_fields_set contains the field
142
+ if self.user_annotations is None and "user_annotations" in self.model_fields_set:
143
+ _dict['user_annotations'] = None
144
+
145
+ # set to None if priority (nullable) is None
146
+ # and model_fields_set contains the field
147
+ if self.priority is None and "priority" in self.model_fields_set:
148
+ _dict['priority'] = None
149
+
150
+ # set to None if command (nullable) is None
151
+ # and model_fields_set contains the field
152
+ if self.command is None and "command" in self.model_fields_set:
153
+ _dict['command'] = None
154
+
155
+ # set to None if config_file (nullable) is None
156
+ # and model_fields_set contains the field
157
+ if self.config_file is None and "config_file" in self.model_fields_set:
158
+ _dict['config_file'] = None
159
+
160
+ # set to None if active_deadline_seconds (nullable) is None
161
+ # and model_fields_set contains the field
162
+ if self.active_deadline_seconds is None and "active_deadline_seconds" in self.model_fields_set:
163
+ _dict['active_deadline_seconds'] = None
164
+
165
+ return _dict
166
+
167
+ @classmethod
168
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
169
+ """Create an instance of UnifiedGetJobDeploymentResponse from a dict"""
170
+ if obj is None:
171
+ return None
172
+
173
+ if not isinstance(obj, dict):
174
+ return cls.model_validate(obj)
175
+
176
+ _obj = cls.model_validate({
177
+ "id": obj.get("id"),
178
+ "status": obj.get("status"),
179
+ "creator_email": obj.get("creator_email"),
180
+ "created_at": obj.get("created_at"),
181
+ "updated_at": obj.get("updated_at"),
182
+ "revision_number": obj.get("revision_number"),
183
+ "endpoint_url": obj.get("endpoint_url"),
184
+ "type": obj.get("type"),
185
+ "name": obj.get("name"),
186
+ "cluster_id": obj.get("cluster_id"),
187
+ "user_annotations": obj.get("user_annotations"),
188
+ "chart_revision": obj.get("chart_revision"),
189
+ "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
190
+ "priority": obj.get("priority"),
191
+ "pools": CclMainPools.from_dict(obj["pools"]) if obj.get("pools") is not None else None,
192
+ "env": Env.from_dict(obj["env"]) if obj.get("env") is not None else None,
193
+ "image": Image.from_dict(obj["image"]) if obj.get("image") is not None else None,
194
+ "command": obj.get("command"),
195
+ "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None,
196
+ "completions": obj.get("completions") if obj.get("completions") is not None else 1,
197
+ "parallelism": obj.get("parallelism") if obj.get("parallelism") is not None else 1,
198
+ "backoff_limit": obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 3,
199
+ "active_deadline_seconds": obj.get("active_deadline_seconds"),
200
+ "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True
201
+ })
202
+ return _obj
203
+
204
+