platform-api-python-client 4.31.0__py3-none-any.whl → 4.37.1__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.
- platform_api_python_client/__init__.py +39 -10
- platform_api_python_client/api/external_api.py +6460 -1203
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +38 -9
- platform_api_python_client/models/ccl_dynamo_pools.py +116 -0
- platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py} +12 -13
- platform_api_python_client/models/cluster_credential.py +2 -2
- platform_api_python_client/models/create_compute_deployment_request.py +27 -1
- platform_api_python_client/models/create_dynamo_deployment_request.py +42 -1
- platform_api_python_client/models/create_filesystem_volume_request.py +0 -13
- platform_api_python_client/models/create_inference_v3_deployment_request.py +42 -2
- platform_api_python_client/models/create_job_deployment_request.py +27 -1
- platform_api_python_client/models/create_object_volume_request.py +0 -13
- platform_api_python_client/models/deployment_response.py +12 -27
- platform_api_python_client/models/deployment_type.py +14 -0
- platform_api_python_client/models/dynamo_communications_input.py +0 -13
- platform_api_python_client/models/dynamo_communications_output.py +0 -13
- platform_api_python_client/models/dynamo_image.py +105 -0
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +0 -13
- platform_api_python_client/models/dynamo_weight_transfer_configuration.py +88 -0
- platform_api_python_client/models/dynamo_weight_transfer_policy.py +36 -0
- platform_api_python_client/models/dynamo_worker_pool_config.py +1 -14
- platform_api_python_client/models/dynamo_worker_pools.py +0 -13
- platform_api_python_client/models/env.py +89 -0
- platform_api_python_client/models/get_cluster_response.py +4 -2
- platform_api_python_client/models/get_compute_deployment_response.py +29 -2
- platform_api_python_client/models/get_deployment_usage_response.py +19 -4
- platform_api_python_client/models/get_dynamo_deployment_response.py +43 -1
- platform_api_python_client/models/get_inference_v3_deployment_response.py +43 -2
- platform_api_python_client/models/get_job_deployment_response.py +29 -2
- platform_api_python_client/models/hardware_instance_response.py +6 -2
- platform_api_python_client/models/image.py +112 -0
- platform_api_python_client/models/ingress.py +103 -0
- platform_api_python_client/models/insight_list_item_response.py +108 -0
- platform_api_python_client/models/insight_resource.py +97 -0
- platform_api_python_client/models/insight_resource_type.py +37 -0
- platform_api_python_client/models/insight_response.py +133 -0
- platform_api_python_client/models/insight_severity.py +40 -0
- platform_api_python_client/models/insight_status.py +39 -0
- platform_api_python_client/models/{c_serve_recipe_response.py → insight_status_change_response.py} +28 -24
- platform_api_python_client/models/{c_serve_recipe_perf.py → list_insights_response.py} +16 -19
- platform_api_python_client/models/metric.py +13 -0
- platform_api_python_client/models/pool.py +116 -0
- platform_api_python_client/models/{get_c_serve_v2_deployment_response.py → unified_get_compute_deployment_response.py} +65 -81
- platform_api_python_client/models/unified_get_deployment_logs_response.py +95 -0
- platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → unified_get_deployment_pods_response.py} +8 -13
- platform_api_python_client/models/unified_get_deployment_response.py +164 -0
- platform_api_python_client/models/unified_get_deployment_revision_response.py +109 -0
- platform_api_python_client/models/unified_get_deployment_rollout_response.py +90 -0
- platform_api_python_client/models/unified_get_deployment_usage_response.py +110 -0
- platform_api_python_client/models/unified_get_dynamo_deployment_response.py +218 -0
- platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +228 -0
- platform_api_python_client/models/{get_c_serve_v3_deployment_response.py → unified_get_job_deployment_response.py} +85 -75
- platform_api_python_client/models/{list_c_serve_recipe_response.py → unified_list_deployment_revisions_response.py} +7 -7
- platform_api_python_client/models/unified_update_deployment_rollout_request.py +87 -0
- platform_api_python_client/models/unified_write_compute_deployment_request.py +154 -0
- platform_api_python_client/models/unified_write_deployment_request.py +164 -0
- platform_api_python_client/models/{c_serve_v2_recipe.py → unified_write_deployment_response.py} +27 -27
- platform_api_python_client/models/unified_write_dynamo_deployment_request.py +197 -0
- platform_api_python_client/models/{create_c_serve_v3_deployment_request.py → unified_write_inference_v3_deployment_request.py} +78 -70
- platform_api_python_client/models/unified_write_job_deployment_request.py +183 -0
- platform_api_python_client/models/update_insight_status_request.py +106 -0
- platform_api_python_client/models/upsert_user_vault_item_request.py +1 -1
- platform_api_python_client/models/usage_availability.py +40 -0
- platform_api_python_client/models/usage_component.py +39 -0
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/RECORD +70 -41
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/WHEEL +1 -1
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.37.1.dist-info}/top_level.txt +0 -0
|
@@ -18,8 +18,9 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from platform_api_python_client.models.backend_protocol import BackendProtocol
|
|
24
25
|
from platform_api_python_client.models.config_file_mount import ConfigFileMount
|
|
25
26
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
@@ -49,6 +50,7 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
49
50
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
50
51
|
priority: Optional[StrictStr] = None
|
|
51
52
|
volume_mounts: Optional[List[VolumeMount]] = None
|
|
53
|
+
hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
52
54
|
container_port: StrictInt
|
|
53
55
|
min_replicas: StrictInt
|
|
54
56
|
max_replicas: StrictInt
|
|
@@ -62,13 +64,27 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
62
64
|
command_args: Optional[List[StrictStr]] = None
|
|
63
65
|
original_command: Optional[StrictStr] = None
|
|
64
66
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
67
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
68
|
+
bearer_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
69
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
70
|
+
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.")
|
|
65
71
|
backend_protocol: Optional[BackendProtocol] = None
|
|
66
72
|
enable_logging: Optional[StrictBool] = True
|
|
67
73
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
68
74
|
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.")
|
|
69
75
|
config_file: Optional[ConfigFileMount] = None
|
|
70
76
|
metrics: Optional[MetricsConfig] = None
|
|
71
|
-
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "container_port", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
|
|
77
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "hf_token_ref", "container_port", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials", "env_vars_refs", "bearer_token_ref", "image_pull_ref", "image_pull_secret_name", "backend_protocol", "enable_logging", "enable_node_model_cache", "session_affinity", "config_file", "metrics"]
|
|
78
|
+
|
|
79
|
+
@field_validator('image_pull_secret_name')
|
|
80
|
+
def image_pull_secret_name_validate_regular_expression(cls, value):
|
|
81
|
+
"""Validates the regular expression"""
|
|
82
|
+
if value is None:
|
|
83
|
+
return value
|
|
84
|
+
|
|
85
|
+
if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
86
|
+
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])?)*$/")
|
|
87
|
+
return value
|
|
72
88
|
|
|
73
89
|
model_config = ConfigDict(
|
|
74
90
|
populate_by_name=True,
|
|
@@ -145,6 +161,11 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
145
161
|
if self.priority is None and "priority" in self.model_fields_set:
|
|
146
162
|
_dict['priority'] = None
|
|
147
163
|
|
|
164
|
+
# set to None if hf_token_ref (nullable) is None
|
|
165
|
+
# and model_fields_set contains the field
|
|
166
|
+
if self.hf_token_ref is None and "hf_token_ref" in self.model_fields_set:
|
|
167
|
+
_dict['hf_token_ref'] = None
|
|
168
|
+
|
|
148
169
|
# set to None if concurrency (nullable) is None
|
|
149
170
|
# and model_fields_set contains the field
|
|
150
171
|
if self.concurrency is None and "concurrency" in self.model_fields_set:
|
|
@@ -190,6 +211,21 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
190
211
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
191
212
|
_dict['image_pull_secret_credentials'] = None
|
|
192
213
|
|
|
214
|
+
# set to None if bearer_token_ref (nullable) is None
|
|
215
|
+
# and model_fields_set contains the field
|
|
216
|
+
if self.bearer_token_ref is None and "bearer_token_ref" in self.model_fields_set:
|
|
217
|
+
_dict['bearer_token_ref'] = None
|
|
218
|
+
|
|
219
|
+
# set to None if image_pull_ref (nullable) is None
|
|
220
|
+
# and model_fields_set contains the field
|
|
221
|
+
if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
|
|
222
|
+
_dict['image_pull_ref'] = None
|
|
223
|
+
|
|
224
|
+
# set to None if image_pull_secret_name (nullable) is None
|
|
225
|
+
# and model_fields_set contains the field
|
|
226
|
+
if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
|
|
227
|
+
_dict['image_pull_secret_name'] = None
|
|
228
|
+
|
|
193
229
|
# set to None if config_file (nullable) is None
|
|
194
230
|
# and model_fields_set contains the field
|
|
195
231
|
if self.config_file is None and "config_file" in self.model_fields_set:
|
|
@@ -227,6 +263,7 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
227
263
|
"user_annotations": obj.get("user_annotations"),
|
|
228
264
|
"priority": obj.get("priority"),
|
|
229
265
|
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
266
|
+
"hf_token_ref": obj.get("hf_token_ref"),
|
|
230
267
|
"container_port": obj.get("container_port"),
|
|
231
268
|
"min_replicas": obj.get("min_replicas"),
|
|
232
269
|
"max_replicas": obj.get("max_replicas"),
|
|
@@ -240,6 +277,10 @@ class GetInferenceV3DeploymentResponse(BaseModel):
|
|
|
240
277
|
"command_args": obj.get("command_args"),
|
|
241
278
|
"original_command": obj.get("original_command"),
|
|
242
279
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
280
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
281
|
+
"bearer_token_ref": obj.get("bearer_token_ref"),
|
|
282
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
283
|
+
"image_pull_secret_name": obj.get("image_pull_secret_name"),
|
|
243
284
|
"backend_protocol": obj.get("backend_protocol"),
|
|
244
285
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
245
286
|
"enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
|
|
@@ -18,8 +18,9 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from platform_api_python_client.models.config_file_mount import ConfigFileMount
|
|
24
25
|
from platform_api_python_client.models.deployment_status import DeploymentStatus
|
|
25
26
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
@@ -56,9 +57,22 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
56
57
|
backoff_limit: Optional[StrictInt] = 3
|
|
57
58
|
active_deadline_seconds: Optional[StrictInt] = None
|
|
58
59
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
60
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
61
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
62
|
+
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.")
|
|
59
63
|
enable_logging: Optional[StrictBool] = True
|
|
60
64
|
config_file: Optional[ConfigFileMount] = None
|
|
61
|
-
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "enable_logging", "config_file"]
|
|
65
|
+
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "env_vars_refs", "image_pull_ref", "image_pull_secret_name", "enable_logging", "config_file"]
|
|
66
|
+
|
|
67
|
+
@field_validator('image_pull_secret_name')
|
|
68
|
+
def image_pull_secret_name_validate_regular_expression(cls, value):
|
|
69
|
+
"""Validates the regular expression"""
|
|
70
|
+
if value is None:
|
|
71
|
+
return value
|
|
72
|
+
|
|
73
|
+
if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
74
|
+
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])?)*$/")
|
|
75
|
+
return value
|
|
62
76
|
|
|
63
77
|
model_config = ConfigDict(
|
|
64
78
|
populate_by_name=True,
|
|
@@ -162,6 +176,16 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
162
176
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
163
177
|
_dict['image_pull_secret_credentials'] = None
|
|
164
178
|
|
|
179
|
+
# set to None if image_pull_ref (nullable) is None
|
|
180
|
+
# and model_fields_set contains the field
|
|
181
|
+
if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
|
|
182
|
+
_dict['image_pull_ref'] = None
|
|
183
|
+
|
|
184
|
+
# set to None if image_pull_secret_name (nullable) is None
|
|
185
|
+
# and model_fields_set contains the field
|
|
186
|
+
if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
|
|
187
|
+
_dict['image_pull_secret_name'] = None
|
|
188
|
+
|
|
165
189
|
# set to None if config_file (nullable) is None
|
|
166
190
|
# and model_fields_set contains the field
|
|
167
191
|
if self.config_file is None and "config_file" in self.model_fields_set:
|
|
@@ -203,6 +227,9 @@ class GetJobDeploymentResponse(BaseModel):
|
|
|
203
227
|
"backoff_limit": obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 3,
|
|
204
228
|
"active_deadline_seconds": obj.get("active_deadline_seconds"),
|
|
205
229
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
230
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
231
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
232
|
+
"image_pull_secret_name": obj.get("image_pull_secret_name"),
|
|
206
233
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
207
234
|
"config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None
|
|
208
235
|
})
|
|
@@ -34,7 +34,8 @@ class HardwareInstanceResponse(BaseModel):
|
|
|
34
34
|
memory: StrictInt
|
|
35
35
|
cluster_id: StrictInt
|
|
36
36
|
accelerator_memory: Optional[StrictInt] = None
|
|
37
|
-
|
|
37
|
+
cost_per_hr: StrictInt
|
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cluster_id", "accelerator_memory", "cost_per_hr"]
|
|
38
39
|
|
|
39
40
|
model_config = ConfigDict(
|
|
40
41
|
populate_by_name=True,
|
|
@@ -66,8 +67,10 @@ class HardwareInstanceResponse(BaseModel):
|
|
|
66
67
|
* `None` is only added to the output dict for nullable fields that
|
|
67
68
|
were set at model initialization. Other fields with value `None`
|
|
68
69
|
are ignored.
|
|
70
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
69
71
|
"""
|
|
70
72
|
excluded_fields: Set[str] = set([
|
|
73
|
+
"cost_per_hr",
|
|
71
74
|
])
|
|
72
75
|
|
|
73
76
|
_dict = self.model_dump(
|
|
@@ -99,7 +102,8 @@ class HardwareInstanceResponse(BaseModel):
|
|
|
99
102
|
"cpu": obj.get("cpu"),
|
|
100
103
|
"memory": obj.get("memory"),
|
|
101
104
|
"cluster_id": obj.get("cluster_id"),
|
|
102
|
-
"accelerator_memory": obj.get("accelerator_memory")
|
|
105
|
+
"accelerator_memory": obj.get("accelerator_memory"),
|
|
106
|
+
"cost_per_hr": obj.get("cost_per_hr")
|
|
103
107
|
})
|
|
104
108
|
return _obj
|
|
105
109
|
|
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class Image(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Image
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
url: StrictStr
|
|
31
|
+
pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
32
|
+
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.")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["url", "pull_ref", "pull_secret_name"]
|
|
34
|
+
|
|
35
|
+
@field_validator('pull_secret_name')
|
|
36
|
+
def pull_secret_name_validate_regular_expression(cls, value):
|
|
37
|
+
"""Validates the regular expression"""
|
|
38
|
+
if value is None:
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
42
|
+
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])?)*$/")
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
+
return json.dumps(self.to_dict())
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of Image from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
])
|
|
78
|
+
|
|
79
|
+
_dict = self.model_dump(
|
|
80
|
+
by_alias=True,
|
|
81
|
+
exclude=excluded_fields,
|
|
82
|
+
exclude_none=True,
|
|
83
|
+
)
|
|
84
|
+
# set to None if pull_ref (nullable) is None
|
|
85
|
+
# and model_fields_set contains the field
|
|
86
|
+
if self.pull_ref is None and "pull_ref" in self.model_fields_set:
|
|
87
|
+
_dict['pull_ref'] = None
|
|
88
|
+
|
|
89
|
+
# set to None if pull_secret_name (nullable) is None
|
|
90
|
+
# and model_fields_set contains the field
|
|
91
|
+
if self.pull_secret_name is None and "pull_secret_name" in self.model_fields_set:
|
|
92
|
+
_dict['pull_secret_name'] = None
|
|
93
|
+
|
|
94
|
+
return _dict
|
|
95
|
+
|
|
96
|
+
@classmethod
|
|
97
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
98
|
+
"""Create an instance of Image from a dict"""
|
|
99
|
+
if obj is None:
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
if not isinstance(obj, dict):
|
|
103
|
+
return cls.model_validate(obj)
|
|
104
|
+
|
|
105
|
+
_obj = cls.model_validate({
|
|
106
|
+
"url": obj.get("url"),
|
|
107
|
+
"pull_ref": obj.get("pull_ref"),
|
|
108
|
+
"pull_secret_name": obj.get("pull_secret_name")
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from platform_api_python_client.models.backend_protocol import BackendProtocol
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class Ingress(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Ingress
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
backend_protocol: Optional[BackendProtocol] = None
|
|
32
|
+
bearer_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
33
|
+
certificate_authority: Optional[StrictStr] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["backend_protocol", "bearer_token_ref", "certificate_authority"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""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
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of Ingress from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# set to None if bearer_token_ref (nullable) is None
|
|
76
|
+
# and model_fields_set contains the field
|
|
77
|
+
if self.bearer_token_ref is None and "bearer_token_ref" in self.model_fields_set:
|
|
78
|
+
_dict['bearer_token_ref'] = None
|
|
79
|
+
|
|
80
|
+
# set to None if certificate_authority (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.certificate_authority is None and "certificate_authority" in self.model_fields_set:
|
|
83
|
+
_dict['certificate_authority'] = None
|
|
84
|
+
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of Ingress from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"backend_protocol": obj.get("backend_protocol"),
|
|
98
|
+
"bearer_token_ref": obj.get("bearer_token_ref"),
|
|
99
|
+
"certificate_authority": obj.get("certificate_authority")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from platform_api_python_client.models.insight_resource import InsightResource
|
|
24
|
+
from platform_api_python_client.models.insight_severity import InsightSeverity
|
|
25
|
+
from platform_api_python_client.models.insight_status import InsightStatus
|
|
26
|
+
from typing import Optional, Set
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class InsightListItemResponse(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
InsightListItemResponse
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
id: StrictInt
|
|
34
|
+
identity: StrictStr = Field(description="Human-readable identifier, e.g. INSIGHT-42")
|
|
35
|
+
severity: InsightSeverity
|
|
36
|
+
status: InsightStatus
|
|
37
|
+
title: StrictStr
|
|
38
|
+
observed_at: datetime
|
|
39
|
+
created_at: datetime
|
|
40
|
+
resource: InsightResource
|
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "identity", "severity", "status", "title", "observed_at", "created_at", "resource"]
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of InsightListItemResponse from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of resource
|
|
83
|
+
if self.resource:
|
|
84
|
+
_dict['resource'] = self.resource.to_dict()
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of InsightListItemResponse from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"id": obj.get("id"),
|
|
98
|
+
"identity": obj.get("identity"),
|
|
99
|
+
"severity": obj.get("severity"),
|
|
100
|
+
"status": obj.get("status"),
|
|
101
|
+
"title": obj.get("title"),
|
|
102
|
+
"observed_at": obj.get("observed_at"),
|
|
103
|
+
"created_at": obj.get("created_at"),
|
|
104
|
+
"resource": InsightResource.from_dict(obj["resource"]) if obj.get("resource") is not None else None
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
107
|
+
|
|
108
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
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, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from platform_api_python_client.models.insight_resource_type import InsightResourceType
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class InsightResource(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InsightResource
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
type: InsightResourceType
|
|
31
|
+
id: StrictInt
|
|
32
|
+
name: Optional[StrictStr] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["type", "id", "name"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""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
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of InsightResource from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# set to None if name (nullable) is None
|
|
75
|
+
# and model_fields_set contains the field
|
|
76
|
+
if self.name is None and "name" in self.model_fields_set:
|
|
77
|
+
_dict['name'] = None
|
|
78
|
+
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of InsightResource from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"type": obj.get("type"),
|
|
92
|
+
"id": obj.get("id"),
|
|
93
|
+
"name": obj.get("name")
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
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 json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class InsightResourceType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
InsightResourceType
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
CLUSTER = 'cluster'
|
|
30
|
+
DEPLOYMENT = 'deployment'
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of InsightResourceType from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
36
|
+
|
|
37
|
+
|