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.
- platform_api_python_client/__init__.py +410 -148
- platform_api_python_client/api/external_api.py +6466 -1215
- platform_api_python_client/api_client.py +81 -36
- platform_api_python_client/configuration.py +262 -66
- platform_api_python_client/exceptions.py +24 -5
- platform_api_python_client/models/__init__.py +90 -35
- platform_api_python_client/models/admission.py +106 -0
- platform_api_python_client/models/autoscaling.py +120 -0
- platform_api_python_client/models/ccl_dynamo_pools.py +117 -0
- platform_api_python_client/models/{create_c_serve_v2_deployment_response.py → ccl_main_pools.py} +16 -16
- platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_chart_values.py +121 -0
- platform_api_python_client/models/{c_serve_v2_recipe.py → ccluster_catalogs_cluster_base_argo_rollouts_controller.py} +15 -18
- platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_chart_values.py +117 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_chart_values.py +152 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_chart_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_controller.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_istio_values.py +143 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_chart_values.py +154 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_chart_values.py +131 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_chart_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_chart_values.py +106 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_values.py +110 -0
- platform_api_python_client/models/cdi.py +113 -0
- platform_api_python_client/models/cluster_base_components.py +187 -0
- platform_api_python_client/models/cluster_capacity_response.py +5 -5
- platform_api_python_client/models/cluster_credential.py +6 -5
- platform_api_python_client/models/cluster_registration_request.py +4 -3
- platform_api_python_client/models/cluster_registration_response.py +4 -3
- platform_api_python_client/models/{istio_cni_overrides.py → cni.py} +29 -15
- platform_api_python_client/models/config_file_mount.py +6 -5
- platform_api_python_client/models/create_compute_deployment_request.py +35 -9
- platform_api_python_client/models/create_compute_deployment_response.py +4 -3
- platform_api_python_client/models/create_dynamo_deployment_request.py +67 -20
- platform_api_python_client/models/create_dynamo_deployment_response.py +4 -3
- platform_api_python_client/models/create_filesystem_volume_request.py +8 -20
- platform_api_python_client/models/create_hardware_instance_request.py +4 -3
- platform_api_python_client/models/create_inference_deployment_response.py +4 -3
- platform_api_python_client/models/create_inference_v3_deployment_request.py +52 -10
- platform_api_python_client/models/create_job_deployment_request.py +35 -9
- platform_api_python_client/models/create_job_deployment_response.py +4 -3
- platform_api_python_client/models/create_object_volume_request.py +10 -22
- platform_api_python_client/models/create_organization_request.py +4 -3
- platform_api_python_client/models/create_organization_response.py +4 -3
- platform_api_python_client/models/create_service_account_request.py +4 -3
- platform_api_python_client/models/create_service_account_response.py +4 -3
- platform_api_python_client/models/credits_response.py +4 -3
- platform_api_python_client/models/daily_bill_response.py +4 -3
- platform_api_python_client/models/{fluent_bit.py → dashboard.py} +29 -12
- platform_api_python_client/models/{prometheus_adapter.py → default_priorities.py} +29 -12
- platform_api_python_client/models/default_queue.py +106 -0
- platform_api_python_client/models/delete_user_vault_item_request.py +4 -3
- platform_api_python_client/models/deployment_log_event_v4.py +4 -3
- platform_api_python_client/models/deployment_response.py +12 -27
- platform_api_python_client/models/deployment_status_request.py +4 -3
- platform_api_python_client/models/deployment_status_response.py +4 -3
- platform_api_python_client/models/deployment_status_v3_response.py +5 -5
- platform_api_python_client/models/deployment_type.py +14 -0
- platform_api_python_client/models/deployment_usage.py +5 -5
- platform_api_python_client/models/deployment_usage_value.py +4 -3
- platform_api_python_client/models/dynamo_communications_input.py +4 -16
- platform_api_python_client/models/dynamo_frontend_config.py +105 -0
- platform_api_python_client/models/dynamo_frontend_config_response.py +105 -0
- platform_api_python_client/models/dynamo_image.py +106 -0
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +4 -16
- platform_api_python_client/models/{external_dns.py → dynamo_weight_transfer_configuration.py} +13 -13
- platform_api_python_client/models/dynamo_weight_transfer_policy.py +36 -0
- platform_api_python_client/models/dynamo_worker_pool_config.py +6 -18
- platform_api_python_client/models/dynamo_worker_pools.py +4 -16
- platform_api_python_client/models/{keda.py → env.py} +14 -13
- platform_api_python_client/models/generate_service_account_secret_response.py +4 -3
- platform_api_python_client/models/get_cluster_response.py +8 -5
- platform_api_python_client/models/get_compute_deployment_response.py +35 -8
- platform_api_python_client/models/get_deployment_log_response.py +4 -3
- platform_api_python_client/models/get_deployment_log_v4_response.py +5 -5
- platform_api_python_client/models/get_deployment_pods_response.py +4 -3
- platform_api_python_client/models/get_deployment_response.py +7 -7
- platform_api_python_client/models/get_deployment_revision_response.py +4 -3
- platform_api_python_client/models/get_deployment_usage_response.py +24 -9
- platform_api_python_client/models/get_dynamo_deployment_response.py +63 -15
- platform_api_python_client/models/get_filesystem_volume_response.py +4 -3
- platform_api_python_client/models/get_inference_deployment_response.py +7 -7
- platform_api_python_client/models/get_inference_v3_deployment_response.py +51 -8
- platform_api_python_client/models/get_job_deployment_response.py +35 -8
- platform_api_python_client/models/get_object_volume_response.py +4 -3
- platform_api_python_client/models/gpu_type_capacity.py +4 -3
- platform_api_python_client/models/hardware_instance_response.py +10 -5
- platform_api_python_client/models/hardware_preset_response.py +4 -3
- platform_api_python_client/models/http_validation_error.py +5 -5
- platform_api_python_client/models/image.py +113 -0
- platform_api_python_client/models/image_pull_secret_credentials.py +4 -3
- platform_api_python_client/models/{istio_cni_subchart_overrides.py → ingress.py} +26 -18
- platform_api_python_client/models/{c_serve_recipe_response.py → insight_list_item_response.py} +33 -27
- platform_api_python_client/models/{create_c_serve_v3_deployment_response.py → insight_resource.py} +20 -14
- 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/insight_status_change_response.py +108 -0
- platform_api_python_client/models/invite_user_request.py +4 -3
- platform_api_python_client/models/istio_base.py +106 -0
- platform_api_python_client/models/istio_cni.py +124 -0
- platform_api_python_client/models/{ingress_nginx.py → istio_gateway.py} +29 -12
- platform_api_python_client/models/{dynamo_communications_output.py → istiod.py} +21 -15
- platform_api_python_client/models/list_cluster_capacity_response.py +5 -5
- platform_api_python_client/models/list_daily_bill_response.py +5 -5
- platform_api_python_client/models/list_deployment_revisions_response.py +5 -5
- platform_api_python_client/models/list_get_cluster_response.py +5 -5
- platform_api_python_client/models/list_get_deployment_response.py +5 -5
- platform_api_python_client/models/list_hardware_instance_response.py +5 -5
- platform_api_python_client/models/list_hardware_preset_response.py +5 -5
- platform_api_python_client/models/{istio_overrides.py → list_insights_response.py} +19 -20
- platform_api_python_client/models/list_organization_gpu_quota_response.py +5 -5
- platform_api_python_client/models/list_prebuilt_image_response.py +5 -5
- platform_api_python_client/models/list_service_accounts_response.py +5 -5
- platform_api_python_client/models/list_user_vault_items_response.py +5 -5
- platform_api_python_client/models/list_volumes_response.py +5 -5
- platform_api_python_client/models/{validation_error_loc_inner.py → location_inner.py} +6 -6
- platform_api_python_client/models/metric.py +13 -0
- platform_api_python_client/models/metrics.py +117 -0
- platform_api_python_client/models/metrics_config.py +6 -5
- platform_api_python_client/models/mig.py +106 -0
- platform_api_python_client/models/operator.py +117 -0
- platform_api_python_client/models/organization_gpu_quota_request.py +4 -3
- platform_api_python_client/models/organization_gpu_quota_response.py +4 -3
- platform_api_python_client/models/pilot.py +106 -0
- platform_api_python_client/models/pod_details.py +4 -3
- platform_api_python_client/models/pool.py +117 -0
- platform_api_python_client/models/prebuilt_image_response.py +4 -3
- platform_api_python_client/models/prometheus.py +110 -0
- platform_api_python_client/models/prometheus_rules.py +120 -0
- platform_api_python_client/models/prometheus_spec.py +113 -0
- platform_api_python_client/models/prometheus_values.py +117 -0
- platform_api_python_client/models/quota.py +106 -0
- platform_api_python_client/models/replicas.py +106 -0
- platform_api_python_client/models/resource_list.py +113 -0
- platform_api_python_client/models/resource_requirements.py +120 -0
- platform_api_python_client/models/revision_pod_details.py +5 -5
- platform_api_python_client/models/rollout_strategy_params.py +4 -3
- platform_api_python_client/models/scheduler.py +117 -0
- platform_api_python_client/models/service_account_response.py +4 -3
- platform_api_python_client/models/{istio.py → toggle.py} +27 -19
- platform_api_python_client/models/toleration.py +134 -0
- platform_api_python_client/models/unified_get_compute_deployment_response.py +177 -0
- platform_api_python_client/models/{c_serve_recipe_perf.py → unified_get_deployment_logs_response.py} +19 -22
- platform_api_python_client/models/{longhorn.py → unified_get_deployment_pods_response.py} +13 -14
- platform_api_python_client/models/unified_get_deployment_response.py +164 -0
- platform_api_python_client/models/unified_get_deployment_revision_response.py +110 -0
- platform_api_python_client/models/{argo_rollouts.py → unified_get_deployment_rollout_response.py} +15 -13
- 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/unified_get_job_deployment_response.py +204 -0
- platform_api_python_client/models/{list_c_serve_recipe_response.py → unified_list_deployment_revisions_response.py} +12 -12
- platform_api_python_client/models/{spire.py → unified_update_deployment_rollout_request.py} +12 -13
- 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/unified_write_deployment_response.py +110 -0
- 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} +86 -78
- platform_api_python_client/models/unified_write_job_deployment_request.py +183 -0
- platform_api_python_client/models/update_cluster_metadata_request.py +4 -3
- platform_api_python_client/models/{cluster_config.py → update_cluster_request.py} +11 -10
- platform_api_python_client/models/update_deployment_response.py +4 -3
- platform_api_python_client/models/update_deployment_status_v3_request.py +4 -3
- platform_api_python_client/models/update_insight_status_request.py +107 -0
- platform_api_python_client/models/update_service_account_request.py +4 -3
- platform_api_python_client/models/upsert_user_vault_item_request.py +5 -4
- platform_api_python_client/models/usage_availability.py +40 -0
- platform_api_python_client/models/usage_component.py +39 -0
- platform_api_python_client/models/user_vault_item.py +4 -3
- platform_api_python_client/models/validation_error.py +8 -8
- platform_api_python_client/models/volume_mount.py +4 -3
- platform_api_python_client/models/volume_status_response.py +4 -3
- platform_api_python_client/models/workload.py +110 -0
- platform_api_python_client/rest.py +87 -10
- platform_api_python_client-4.41.0.dist-info/METADATA +418 -0
- platform_api_python_client-4.41.0.dist-info/RECORD +206 -0
- {platform_api_python_client-4.31.0.dist-info → platform_api_python_client-4.41.0.dist-info}/WHEEL +1 -1
- platform_api_python_client/models/cert_manager.py +0 -89
- platform_api_python_client/models/cluster_components.py +0 -193
- platform_api_python_client/models/final_stack.py +0 -89
- platform_api_python_client/models/get_c_serve_v2_deployment_response.py +0 -193
- platform_api_python_client/models/get_c_serve_v3_deployment_response.py +0 -194
- platform_api_python_client/models/gpu_operator.py +0 -89
- platform_api_python_client/models/kube_prometheus_stack.py +0 -89
- platform_api_python_client/models/metrics_server.py +0 -89
- platform_api_python_client/models/network_operator.py +0 -89
- platform_api_python_client/models/opentelemetry_collector.py +0 -89
- platform_api_python_client/models/spire_crds.py +0 -89
- platform_api_python_client/models/teleport_kube_agent.py +0 -89
- platform_api_python_client-4.31.0.dist-info/METADATA +0 -23
- platform_api_python_client-4.31.0.dist-info/RECORD +0 -151
- {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,106 @@
|
|
|
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, 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
|
+
from pydantic_core import to_jsonable_python
|
|
26
|
+
|
|
27
|
+
class DynamoImage(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
DynamoImage
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
runtime_version: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Dynamo runtime image tag (for example 1.4.0). Defaults to the platform's current release; GET /prebuilt-images?type=dynamo lists the versions the platform has validated, but any tag may be requested. require_gpu_direct_rdma needs an EFA-capable image. Changing it restarts every component of a running deployment.")
|
|
32
|
+
pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["runtime_version", "pull_ref"]
|
|
34
|
+
|
|
35
|
+
@field_validator('runtime_version', mode="before")
|
|
36
|
+
def runtime_version_validate_regular_expression(cls, value):
|
|
37
|
+
"""Validates the regular expression"""
|
|
38
|
+
if value is None:
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
if isinstance(value, str) and not re.match(r"^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$", value):
|
|
42
|
+
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$/")
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
validate_by_name=True,
|
|
47
|
+
validate_by_alias=True,
|
|
48
|
+
validate_assignment=True,
|
|
49
|
+
protected_namespaces=(),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of DynamoImage 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
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
+
"""Create an instance of DynamoImage from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return cls.model_validate(obj)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"runtime_version": obj.get("runtime_version"),
|
|
102
|
+
"pull_ref": obj.get("pull_ref")
|
|
103
|
+
})
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|
|
@@ -22,17 +22,18 @@ from typing import Any, ClassVar, Dict, List
|
|
|
22
22
|
from platform_api_python_client.models.dynamo_kv_transfer_policy import DynamoKvTransferPolicy
|
|
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 DynamoKvTransferConfiguration(BaseModel):
|
|
27
28
|
"""
|
|
28
29
|
DynamoKvTransferConfiguration
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
policy: DynamoKvTransferPolicy = Field(description="allow_tcp uses platform-managed NIXL/UCX and permits TCP; it does not force TCP or guarantee RDMA. require_gpu_direct_rdma selects EKS EFA device requirements and GPU-buffer transfer over LIBFABRIC without TCP fallback. A compatible EFA chart and runtime image are prerequisites; the API does not validate their capabilities. Device availability is resolved during scheduling.")
|
|
31
|
-
additional_properties: Dict[str, Any] = {}
|
|
32
32
|
__properties: ClassVar[List[str]] = ["policy"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
35
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
36
37
|
validate_assignment=True,
|
|
37
38
|
protected_namespaces=(),
|
|
38
39
|
)
|
|
@@ -44,8 +45,7 @@ class DynamoKvTransferConfiguration(BaseModel):
|
|
|
44
45
|
|
|
45
46
|
def to_json(self) -> str:
|
|
46
47
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -61,10 +61,8 @@ class DynamoKvTransferConfiguration(BaseModel):
|
|
|
61
61
|
* `None` is only added to the output dict for nullable fields that
|
|
62
62
|
were set at model initialization. Other fields with value `None`
|
|
63
63
|
are ignored.
|
|
64
|
-
* Fields in `self.additional_properties` are added to the output dict.
|
|
65
64
|
"""
|
|
66
65
|
excluded_fields: Set[str] = set([
|
|
67
|
-
"additional_properties",
|
|
68
66
|
])
|
|
69
67
|
|
|
70
68
|
_dict = self.model_dump(
|
|
@@ -72,11 +70,6 @@ class DynamoKvTransferConfiguration(BaseModel):
|
|
|
72
70
|
exclude=excluded_fields,
|
|
73
71
|
exclude_none=True,
|
|
74
72
|
)
|
|
75
|
-
# puts key-value pairs in additional_properties in the top level
|
|
76
|
-
if self.additional_properties is not None:
|
|
77
|
-
for _key, _value in self.additional_properties.items():
|
|
78
|
-
_dict[_key] = _value
|
|
79
|
-
|
|
80
73
|
return _dict
|
|
81
74
|
|
|
82
75
|
@classmethod
|
|
@@ -91,11 +84,6 @@ class DynamoKvTransferConfiguration(BaseModel):
|
|
|
91
84
|
_obj = cls.model_validate({
|
|
92
85
|
"policy": obj.get("policy")
|
|
93
86
|
})
|
|
94
|
-
# store additional fields in additional_properties
|
|
95
|
-
for _key in obj.keys():
|
|
96
|
-
if _key not in cls.__properties:
|
|
97
|
-
_obj.additional_properties[_key] = obj.get(_key)
|
|
98
|
-
|
|
99
87
|
return _obj
|
|
100
88
|
|
|
101
89
|
|
platform_api_python_client/models/{external_dns.py → dynamo_weight_transfer_configuration.py}
RENAMED
|
@@ -17,21 +17,23 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from platform_api_python_client.models.dynamo_weight_transfer_policy import DynamoWeightTransferPolicy
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
24
26
|
|
|
25
|
-
class
|
|
27
|
+
class DynamoWeightTransferConfiguration(BaseModel):
|
|
26
28
|
"""
|
|
27
|
-
|
|
29
|
+
ModelExpress peer weight transfer between the workers of one pool, in either serving mode.
|
|
28
30
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__properties: ClassVar[List[str]] = ["enabled", "values"]
|
|
31
|
+
policy: Optional[DynamoWeightTransferPolicy] = Field(default=None, description="The default and only policy, so an empty object opts in. require_gpu_direct_rdma makes a starting worker pull the model's weights GPU to GPU from a worker of the same pool that already serves the same model_revision commit, over the cluster's GPU-direct RDMA fabric (currently AWS EFA only), instead of downloading the checkpoint. A pool's first worker, or one without a reachable peer, falls back to the usual loader. The chart and runtime image prerequisites of require_gpu_direct_rdma KV transfer apply; the API does not validate them.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["policy"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -43,12 +45,11 @@ class ExternalDns(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of DynamoWeightTransferConfiguration from a JSON string"""
|
|
52
53
|
return cls.from_dict(json.loads(json_str))
|
|
53
54
|
|
|
54
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,7 +74,7 @@ class ExternalDns(BaseModel):
|
|
|
73
74
|
|
|
74
75
|
@classmethod
|
|
75
76
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
77
|
+
"""Create an instance of DynamoWeightTransferConfiguration from a dict"""
|
|
77
78
|
if obj is None:
|
|
78
79
|
return None
|
|
79
80
|
|
|
@@ -81,8 +82,7 @@ class ExternalDns(BaseModel):
|
|
|
81
82
|
return cls.model_validate(obj)
|
|
82
83
|
|
|
83
84
|
_obj = cls.model_validate({
|
|
84
|
-
"
|
|
85
|
-
"values": obj.get("values")
|
|
85
|
+
"policy": obj.get("policy")
|
|
86
86
|
})
|
|
87
87
|
return _obj
|
|
88
88
|
|
|
@@ -0,0 +1,36 @@
|
|
|
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 DynamoWeightTransferPolicy(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
DynamoWeightTransferPolicy
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
REQUIRE_GPU_DIRECT_RDMA = 'require_gpu_direct_rdma'
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def from_json(cls, json_str: str) -> Self:
|
|
33
|
+
"""Create an instance of DynamoWeightTransferPolicy from a JSON string"""
|
|
34
|
+
return cls(json.loads(json_str))
|
|
35
|
+
|
|
36
|
+
|
|
@@ -22,22 +22,23 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
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 DynamoWorkerPoolConfig(BaseModel):
|
|
27
28
|
"""
|
|
28
29
|
Hardware and scaling for one Dynamo worker role. ``min_replicas``/``max_replicas`` are the canonical size. ``replicas`` is the deprecated fixed-size alias (``min == max``) still accepted on disaggregated pools. ``parse_dynamo_topology`` owns the cross-field rules (bounds ordering, autoscaling target, which roles may autoscale).
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
hardware_instance_id: StrictInt
|
|
31
|
-
replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
32
|
-
min_replicas: Optional[Annotated[int, Field(strict=True, ge=
|
|
32
|
+
replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Deprecated fixed pool size, equivalent to min_replicas == max_replicas.")
|
|
33
|
+
min_replicas: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
33
34
|
max_replicas: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
34
35
|
concurrency: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
35
36
|
cooldown_period: Optional[Annotated[int, Field(le=3600, strict=True, ge=0)]] = None
|
|
36
|
-
additional_properties: Dict[str, Any] = {}
|
|
37
37
|
__properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas", "min_replicas", "max_replicas", "concurrency", "cooldown_period"]
|
|
38
38
|
|
|
39
39
|
model_config = ConfigDict(
|
|
40
|
-
|
|
40
|
+
validate_by_name=True,
|
|
41
|
+
validate_by_alias=True,
|
|
41
42
|
validate_assignment=True,
|
|
42
43
|
protected_namespaces=(),
|
|
43
44
|
)
|
|
@@ -49,8 +50,7 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
49
50
|
|
|
50
51
|
def to_json(self) -> str:
|
|
51
52
|
"""Returns the JSON representation of the model using alias"""
|
|
52
|
-
|
|
53
|
-
return json.dumps(self.to_dict())
|
|
53
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
54
54
|
|
|
55
55
|
@classmethod
|
|
56
56
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -66,10 +66,8 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
66
66
|
* `None` is only added to the output dict for nullable fields that
|
|
67
67
|
were set at model initialization. Other fields with value `None`
|
|
68
68
|
are ignored.
|
|
69
|
-
* Fields in `self.additional_properties` are added to the output dict.
|
|
70
69
|
"""
|
|
71
70
|
excluded_fields: Set[str] = set([
|
|
72
|
-
"additional_properties",
|
|
73
71
|
])
|
|
74
72
|
|
|
75
73
|
_dict = self.model_dump(
|
|
@@ -77,11 +75,6 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
77
75
|
exclude=excluded_fields,
|
|
78
76
|
exclude_none=True,
|
|
79
77
|
)
|
|
80
|
-
# puts key-value pairs in additional_properties in the top level
|
|
81
|
-
if self.additional_properties is not None:
|
|
82
|
-
for _key, _value in self.additional_properties.items():
|
|
83
|
-
_dict[_key] = _value
|
|
84
|
-
|
|
85
78
|
# set to None if replicas (nullable) is None
|
|
86
79
|
# and model_fields_set contains the field
|
|
87
80
|
if self.replicas is None and "replicas" in self.model_fields_set:
|
|
@@ -126,11 +119,6 @@ class DynamoWorkerPoolConfig(BaseModel):
|
|
|
126
119
|
"concurrency": obj.get("concurrency"),
|
|
127
120
|
"cooldown_period": obj.get("cooldown_period")
|
|
128
121
|
})
|
|
129
|
-
# store additional fields in additional_properties
|
|
130
|
-
for _key in obj.keys():
|
|
131
|
-
if _key not in cls.__properties:
|
|
132
|
-
_obj.additional_properties[_key] = obj.get(_key)
|
|
133
|
-
|
|
134
122
|
return _obj
|
|
135
123
|
|
|
136
124
|
|
|
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from platform_api_python_client.models.dynamo_worker_pool_config import DynamoWorkerPoolConfig
|
|
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 DynamoWorkerPools(BaseModel):
|
|
27
28
|
"""
|
|
@@ -30,11 +31,11 @@ class DynamoWorkerPools(BaseModel):
|
|
|
30
31
|
worker: Optional[DynamoWorkerPoolConfig] = None
|
|
31
32
|
prefill: Optional[DynamoWorkerPoolConfig] = None
|
|
32
33
|
decode: Optional[DynamoWorkerPoolConfig] = None
|
|
33
|
-
additional_properties: Dict[str, Any] = {}
|
|
34
34
|
__properties: ClassVar[List[str]] = ["worker", "prefill", "decode"]
|
|
35
35
|
|
|
36
36
|
model_config = ConfigDict(
|
|
37
|
-
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
38
39
|
validate_assignment=True,
|
|
39
40
|
protected_namespaces=(),
|
|
40
41
|
)
|
|
@@ -46,8 +47,7 @@ class DynamoWorkerPools(BaseModel):
|
|
|
46
47
|
|
|
47
48
|
def to_json(self) -> str:
|
|
48
49
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
51
|
|
|
52
52
|
@classmethod
|
|
53
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -63,10 +63,8 @@ class DynamoWorkerPools(BaseModel):
|
|
|
63
63
|
* `None` is only added to the output dict for nullable fields that
|
|
64
64
|
were set at model initialization. Other fields with value `None`
|
|
65
65
|
are ignored.
|
|
66
|
-
* Fields in `self.additional_properties` are added to the output dict.
|
|
67
66
|
"""
|
|
68
67
|
excluded_fields: Set[str] = set([
|
|
69
|
-
"additional_properties",
|
|
70
68
|
])
|
|
71
69
|
|
|
72
70
|
_dict = self.model_dump(
|
|
@@ -83,11 +81,6 @@ class DynamoWorkerPools(BaseModel):
|
|
|
83
81
|
# override the default output from pydantic by calling `to_dict()` of decode
|
|
84
82
|
if self.decode:
|
|
85
83
|
_dict['decode'] = self.decode.to_dict()
|
|
86
|
-
# puts key-value pairs in additional_properties in the top level
|
|
87
|
-
if self.additional_properties is not None:
|
|
88
|
-
for _key, _value in self.additional_properties.items():
|
|
89
|
-
_dict[_key] = _value
|
|
90
|
-
|
|
91
84
|
# set to None if worker (nullable) is None
|
|
92
85
|
# and model_fields_set contains the field
|
|
93
86
|
if self.worker is None and "worker" in self.model_fields_set:
|
|
@@ -119,11 +112,6 @@ class DynamoWorkerPools(BaseModel):
|
|
|
119
112
|
"prefill": DynamoWorkerPoolConfig.from_dict(obj["prefill"]) if obj.get("prefill") is not None else None,
|
|
120
113
|
"decode": DynamoWorkerPoolConfig.from_dict(obj["decode"]) if obj.get("decode") is not None else None
|
|
121
114
|
})
|
|
122
|
-
# store additional fields in additional_properties
|
|
123
|
-
for _key in obj.keys():
|
|
124
|
-
if _key not in cls.__properties:
|
|
125
|
-
_obj.additional_properties[_key] = obj.get(_key)
|
|
126
|
-
|
|
127
115
|
return _obj
|
|
128
116
|
|
|
129
117
|
|
|
@@ -17,21 +17,23 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, 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
|
|
26
|
+
class Env(BaseModel):
|
|
26
27
|
"""
|
|
27
|
-
|
|
28
|
+
Env
|
|
28
29
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__properties: ClassVar[List[str]] = ["
|
|
30
|
+
vars: Optional[Dict[str, StrictStr]] = None
|
|
31
|
+
refs: Optional[Dict[str, Any]] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["vars", "refs"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -43,12 +45,11 @@ class Keda(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of Env from a JSON string"""
|
|
52
53
|
return cls.from_dict(json.loads(json_str))
|
|
53
54
|
|
|
54
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,7 +74,7 @@ class Keda(BaseModel):
|
|
|
73
74
|
|
|
74
75
|
@classmethod
|
|
75
76
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
77
|
+
"""Create an instance of Env from a dict"""
|
|
77
78
|
if obj is None:
|
|
78
79
|
return None
|
|
79
80
|
|
|
@@ -81,8 +82,8 @@ class Keda(BaseModel):
|
|
|
81
82
|
return cls.model_validate(obj)
|
|
82
83
|
|
|
83
84
|
_obj = cls.model_validate({
|
|
84
|
-
"
|
|
85
|
-
"
|
|
85
|
+
"vars": obj.get("vars"),
|
|
86
|
+
"refs": obj.get("refs")
|
|
86
87
|
})
|
|
87
88
|
return _obj
|
|
88
89
|
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, 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 GenerateServiceAccountSecretResponse(BaseModel):
|
|
26
27
|
"""
|
|
@@ -30,7 +31,8 @@ class GenerateServiceAccountSecretResponse(BaseModel):
|
|
|
30
31
|
__properties: ClassVar[List[str]] = ["client_secret"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
|
-
|
|
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 GenerateServiceAccountSecretResponse(BaseModel):
|
|
|
42
44
|
|
|
43
45
|
def to_json(self) -> str:
|
|
44
46
|
"""Returns the JSON representation of the model using alias"""
|
|
45
|
-
|
|
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,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, 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
26
|
class GetClusterResponse(BaseModel):
|
|
26
27
|
"""
|
|
@@ -31,10 +32,12 @@ class GetClusterResponse(BaseModel):
|
|
|
31
32
|
display_name: StrictStr
|
|
32
33
|
region: Optional[StrictStr] = None
|
|
33
34
|
deployment_creation_disabled: Optional[StrictBool] = False
|
|
34
|
-
|
|
35
|
+
managed_by_ccluster: StrictBool
|
|
36
|
+
__properties: ClassVar[List[str]] = ["id", "cluster_name", "display_name", "region", "deployment_creation_disabled", "managed_by_ccluster"]
|
|
35
37
|
|
|
36
38
|
model_config = ConfigDict(
|
|
37
|
-
|
|
39
|
+
validate_by_name=True,
|
|
40
|
+
validate_by_alias=True,
|
|
38
41
|
validate_assignment=True,
|
|
39
42
|
protected_namespaces=(),
|
|
40
43
|
)
|
|
@@ -46,8 +49,7 @@ class GetClusterResponse(BaseModel):
|
|
|
46
49
|
|
|
47
50
|
def to_json(self) -> str:
|
|
48
51
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
52
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
53
|
|
|
52
54
|
@classmethod
|
|
53
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -93,7 +95,8 @@ class GetClusterResponse(BaseModel):
|
|
|
93
95
|
"cluster_name": obj.get("cluster_name"),
|
|
94
96
|
"display_name": obj.get("display_name"),
|
|
95
97
|
"region": obj.get("region"),
|
|
96
|
-
"deployment_creation_disabled": obj.get("deployment_creation_disabled") if obj.get("deployment_creation_disabled") is not None else False
|
|
98
|
+
"deployment_creation_disabled": obj.get("deployment_creation_disabled") if obj.get("deployment_creation_disabled") is not None else False,
|
|
99
|
+
"managed_by_ccluster": obj.get("managed_by_ccluster")
|
|
97
100
|
})
|
|
98
101
|
return _obj
|
|
99
102
|
|
|
@@ -18,14 +18,16 @@ 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.deployment_status import DeploymentStatus
|
|
24
25
|
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
25
26
|
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
|
|
26
27
|
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
27
28
|
from typing import Optional, Set
|
|
28
29
|
from typing_extensions import Self
|
|
30
|
+
from pydantic_core import to_jsonable_python
|
|
29
31
|
|
|
30
32
|
class GetComputeDeploymentResponse(BaseModel):
|
|
31
33
|
"""
|
|
@@ -42,7 +44,7 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
42
44
|
created_at: datetime
|
|
43
45
|
hardware_instance_id: StrictInt
|
|
44
46
|
revision_number: StrictInt
|
|
45
|
-
chart_revision: Optional[StrictStr] = None
|
|
47
|
+
chart_revision: Optional[StrictStr] = Field(default=None, description="Saved catalog Git reference for this revision; null if not recorded. Informational: omit chart_revision from edit or clone requests to use the current platform default.")
|
|
46
48
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
47
49
|
priority: Optional[StrictStr] = None
|
|
48
50
|
volume_mounts: Optional[List[VolumeMount]] = None
|
|
@@ -51,11 +53,25 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
51
53
|
ssh_password: Optional[StrictStr] = None
|
|
52
54
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
53
55
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
56
|
+
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
57
|
+
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
58
|
+
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.")
|
|
54
59
|
enable_logging: Optional[StrictBool] = True
|
|
55
|
-
__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", "exposed_port", "ssh_public_key", "ssh_password", "env_vars", "image_pull_secret_credentials", "enable_logging"]
|
|
60
|
+
__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", "exposed_port", "ssh_public_key", "ssh_password", "env_vars", "image_pull_secret_credentials", "env_vars_refs", "image_pull_ref", "image_pull_secret_name", "enable_logging"]
|
|
61
|
+
|
|
62
|
+
@field_validator('image_pull_secret_name', mode="before")
|
|
63
|
+
def image_pull_secret_name_validate_regular_expression(cls, value):
|
|
64
|
+
"""Validates the regular expression"""
|
|
65
|
+
if value is None:
|
|
66
|
+
return value
|
|
67
|
+
|
|
68
|
+
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):
|
|
69
|
+
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])?)*$/")
|
|
70
|
+
return value
|
|
56
71
|
|
|
57
72
|
model_config = ConfigDict(
|
|
58
|
-
|
|
73
|
+
validate_by_name=True,
|
|
74
|
+
validate_by_alias=True,
|
|
59
75
|
validate_assignment=True,
|
|
60
76
|
protected_namespaces=(),
|
|
61
77
|
)
|
|
@@ -67,8 +83,7 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
67
83
|
|
|
68
84
|
def to_json(self) -> str:
|
|
69
85
|
"""Returns the JSON representation of the model using alias"""
|
|
70
|
-
|
|
71
|
-
return json.dumps(self.to_dict())
|
|
86
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
72
87
|
|
|
73
88
|
@classmethod
|
|
74
89
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -97,8 +112,7 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
97
112
|
_items = []
|
|
98
113
|
if self.volume_mounts:
|
|
99
114
|
for _item_volume_mounts in self.volume_mounts:
|
|
100
|
-
if _item_volume_mounts
|
|
101
|
-
_items.append(_item_volume_mounts.to_dict())
|
|
115
|
+
_items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
|
|
102
116
|
_dict['volume_mounts'] = _items
|
|
103
117
|
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
104
118
|
if self.image_pull_secret_credentials:
|
|
@@ -143,6 +157,16 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
143
157
|
if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
|
|
144
158
|
_dict['image_pull_secret_credentials'] = None
|
|
145
159
|
|
|
160
|
+
# set to None if image_pull_ref (nullable) is None
|
|
161
|
+
# and model_fields_set contains the field
|
|
162
|
+
if self.image_pull_ref is None and "image_pull_ref" in self.model_fields_set:
|
|
163
|
+
_dict['image_pull_ref'] = None
|
|
164
|
+
|
|
165
|
+
# set to None if image_pull_secret_name (nullable) is None
|
|
166
|
+
# and model_fields_set contains the field
|
|
167
|
+
if self.image_pull_secret_name is None and "image_pull_secret_name" in self.model_fields_set:
|
|
168
|
+
_dict['image_pull_secret_name'] = None
|
|
169
|
+
|
|
146
170
|
return _dict
|
|
147
171
|
|
|
148
172
|
@classmethod
|
|
@@ -175,6 +199,9 @@ class GetComputeDeploymentResponse(BaseModel):
|
|
|
175
199
|
"ssh_password": obj.get("ssh_password"),
|
|
176
200
|
"env_vars": obj.get("env_vars"),
|
|
177
201
|
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
|
|
202
|
+
"env_vars_refs": obj.get("env_vars_refs"),
|
|
203
|
+
"image_pull_ref": obj.get("image_pull_ref"),
|
|
204
|
+
"image_pull_secret_name": obj.get("image_pull_secret_name"),
|
|
178
205
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True
|
|
179
206
|
})
|
|
180
207
|
return _obj
|