platform-api-python-client 4.37.1__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 -177
- platform_api_python_client/api/external_api.py +41 -47
- 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 +52 -26
- 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 +4 -3
- platform_api_python_client/models/ccl_main_pools.py +4 -3
- platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_chart_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_controller.py +106 -0
- 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/{spire_crds.py → cdi.py} +36 -12
- 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 +4 -3
- 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 +10 -10
- platform_api_python_client/models/create_compute_deployment_response.py +4 -3
- platform_api_python_client/models/create_dynamo_deployment_request.py +29 -23
- platform_api_python_client/models/create_dynamo_deployment_response.py +4 -3
- platform_api_python_client/models/create_filesystem_volume_request.py +8 -7
- 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 +14 -12
- platform_api_python_client/models/create_job_deployment_request.py +10 -10
- platform_api_python_client/models/create_job_deployment_response.py +4 -3
- platform_api_python_client/models/create_object_volume_request.py +10 -9
- 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_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_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 -3
- 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 +6 -5
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +4 -3
- platform_api_python_client/models/dynamo_weight_transfer_configuration.py +4 -3
- platform_api_python_client/models/dynamo_worker_pool_config.py +5 -4
- platform_api_python_client/models/dynamo_worker_pools.py +4 -3
- platform_api_python_client/models/env.py +4 -3
- platform_api_python_client/models/generate_service_account_secret_response.py +4 -3
- platform_api_python_client/models/get_cluster_response.py +4 -3
- platform_api_python_client/models/get_compute_deployment_response.py +8 -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 +5 -5
- platform_api_python_client/models/get_dynamo_deployment_response.py +23 -17
- 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 +11 -9
- platform_api_python_client/models/get_job_deployment_response.py +8 -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 +4 -3
- 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 +6 -5
- platform_api_python_client/models/image_pull_secret_credentials.py +4 -3
- platform_api_python_client/models/ingress.py +4 -3
- platform_api_python_client/models/insight_list_item_response.py +4 -3
- platform_api_python_client/models/insight_resource.py +4 -3
- platform_api_python_client/models/insight_response.py +5 -5
- platform_api_python_client/models/insight_status_change_response.py +4 -3
- 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/{argo_rollouts.py → istio_gateway.py} +29 -12
- platform_api_python_client/models/{istio_cni_subchart_overrides.py → istiod.py} +31 -17
- 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/list_insights_response.py +5 -5
- 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/metrics.py +117 -0
- platform_api_python_client/models/metrics_config.py +6 -5
- platform_api_python_client/models/{istio_overrides.py → mig.py} +28 -18
- 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 +4 -3
- 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 +8 -8
- platform_api_python_client/models/unified_get_deployment_logs_response.py +5 -5
- platform_api_python_client/models/unified_get_deployment_pods_response.py +4 -3
- platform_api_python_client/models/unified_get_deployment_revision_response.py +4 -3
- platform_api_python_client/models/unified_get_deployment_rollout_response.py +4 -3
- platform_api_python_client/models/unified_get_deployment_usage_response.py +5 -5
- platform_api_python_client/models/unified_get_dynamo_deployment_response.py +13 -13
- platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +9 -9
- platform_api_python_client/models/unified_get_job_deployment_response.py +8 -8
- platform_api_python_client/models/unified_list_deployment_revisions_response.py +5 -5
- platform_api_python_client/models/unified_update_deployment_rollout_request.py +4 -3
- platform_api_python_client/models/unified_write_compute_deployment_request.py +8 -8
- platform_api_python_client/models/unified_write_deployment_response.py +4 -3
- platform_api_python_client/models/unified_write_dynamo_deployment_request.py +11 -11
- platform_api_python_client/models/unified_write_inference_v3_deployment_request.py +9 -9
- platform_api_python_client/models/unified_write_job_deployment_request.py +8 -8
- 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 +7 -6
- platform_api_python_client/models/update_service_account_request.py +4 -3
- platform_api_python_client/models/upsert_user_vault_item_request.py +4 -3
- 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/{dynamo_communications_output.py → workload.py} +34 -15
- 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/models/cert_manager.py +0 -89
- platform_api_python_client/models/cluster_components.py +0 -193
- platform_api_python_client/models/external_dns.py +0 -89
- platform_api_python_client/models/final_stack.py +0 -89
- platform_api_python_client/models/gpu_operator.py +0 -89
- platform_api_python_client/models/ingress_nginx.py +0 -89
- platform_api_python_client/models/keda.py +0 -89
- platform_api_python_client/models/kube_prometheus_stack.py +0 -89
- platform_api_python_client/models/longhorn.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.py +0 -89
- platform_api_python_client/models/teleport_kube_agent.py +0 -89
- platform_api_python_client-4.37.1.dist-info/METADATA +0 -23
- platform_api_python_client-4.37.1.dist-info/RECORD +0 -180
- {platform_api_python_client-4.37.1.dist-info → platform_api_python_client-4.41.0.dist-info}/WHEEL +0 -0
- {platform_api_python_client-4.37.1.dist-info → platform_api_python_client-4.41.0.dist-info}/top_level.txt +0 -0
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class ClusterCredential(BaseModel):
|
|
26
27
|
"""
|
|
@@ -32,7 +33,8 @@ class ClusterCredential(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["server", "bearer_token", "ca_cert"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -44,8 +46,7 @@ class ClusterCredential(BaseModel):
|
|
|
44
46
|
|
|
45
47
|
def to_json(self) -> str:
|
|
46
48
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -23,6 +23,7 @@ from platform_api_python_client.models.cloud_provider import CloudProvider
|
|
|
23
23
|
from platform_api_python_client.models.cluster_credential import ClusterCredential
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
26
27
|
|
|
27
28
|
class ClusterRegistrationRequest(BaseModel):
|
|
28
29
|
"""
|
|
@@ -36,7 +37,8 @@ class ClusterRegistrationRequest(BaseModel):
|
|
|
36
37
|
__properties: ClassVar[List[str]] = ["display_name", "storage_class", "region", "cloud_provider", "credential"]
|
|
37
38
|
|
|
38
39
|
model_config = ConfigDict(
|
|
39
|
-
|
|
40
|
+
validate_by_name=True,
|
|
41
|
+
validate_by_alias=True,
|
|
40
42
|
validate_assignment=True,
|
|
41
43
|
protected_namespaces=(),
|
|
42
44
|
)
|
|
@@ -48,8 +50,7 @@ class ClusterRegistrationRequest(BaseModel):
|
|
|
48
50
|
|
|
49
51
|
def to_json(self) -> str:
|
|
50
52
|
"""Returns the JSON representation of the model using alias"""
|
|
51
|
-
|
|
52
|
-
return json.dumps(self.to_dict())
|
|
53
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
53
54
|
|
|
54
55
|
@classmethod
|
|
55
56
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
26
|
class ClusterRegistrationResponse(BaseModel):
|
|
26
27
|
"""
|
|
@@ -30,7 +31,8 @@ class ClusterRegistrationResponse(BaseModel):
|
|
|
30
31
|
__properties: ClassVar[List[str]] = ["id"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
|
-
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
34
36
|
validate_assignment=True,
|
|
35
37
|
protected_namespaces=(),
|
|
36
38
|
)
|
|
@@ -42,8 +44,7 @@ class ClusterRegistrationResponse(BaseModel):
|
|
|
42
44
|
|
|
43
45
|
def to_json(self) -> str:
|
|
44
46
|
"""Returns the JSON representation of the model using alias"""
|
|
45
|
-
|
|
46
|
-
return json.dumps(self.to_dict())
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
47
48
|
|
|
48
49
|
@classmethod
|
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -21,17 +21,20 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
24
25
|
|
|
25
|
-
class
|
|
26
|
+
class CNI(BaseModel):
|
|
26
27
|
"""
|
|
27
|
-
|
|
28
|
+
CNI is where istio-cni writes its plugin binary and configuration. These are the only values in this chart that must be tuned per cluster: the chart's defaults are the standard paths, and the correct paths depend on the node image.
|
|
28
29
|
""" # noqa: E501
|
|
29
|
-
cni_bin_dir: Optional[StrictStr] = Field(default=None, alias="cniBinDir")
|
|
30
30
|
cni_conf_dir: Optional[StrictStr] = Field(default=None, alias="cniConfDir")
|
|
31
|
-
|
|
31
|
+
cni_bin_dir: Optional[StrictStr] = Field(default=None, alias="cniBinDir")
|
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
|
33
|
+
__properties: ClassVar[List[str]] = ["cniConfDir", "cniBinDir"]
|
|
32
34
|
|
|
33
35
|
model_config = ConfigDict(
|
|
34
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
35
38
|
validate_assignment=True,
|
|
36
39
|
protected_namespaces=(),
|
|
37
40
|
)
|
|
@@ -43,12 +46,11 @@ class IstioCniOverrides(BaseModel):
|
|
|
43
46
|
|
|
44
47
|
def to_json(self) -> str:
|
|
45
48
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
50
|
|
|
49
51
|
@classmethod
|
|
50
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
53
|
+
"""Create an instance of CNI from a JSON string"""
|
|
52
54
|
return cls.from_dict(json.loads(json_str))
|
|
53
55
|
|
|
54
56
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -60,8 +62,10 @@ class IstioCniOverrides(BaseModel):
|
|
|
60
62
|
* `None` is only added to the output dict for nullable fields that
|
|
61
63
|
were set at model initialization. Other fields with value `None`
|
|
62
64
|
are ignored.
|
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
63
66
|
"""
|
|
64
67
|
excluded_fields: Set[str] = set([
|
|
68
|
+
"additional_properties",
|
|
65
69
|
])
|
|
66
70
|
|
|
67
71
|
_dict = self.model_dump(
|
|
@@ -69,21 +73,26 @@ class IstioCniOverrides(BaseModel):
|
|
|
69
73
|
exclude=excluded_fields,
|
|
70
74
|
exclude_none=True,
|
|
71
75
|
)
|
|
72
|
-
#
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
# puts key-value pairs in additional_properties in the top level
|
|
77
|
+
if self.additional_properties is not None:
|
|
78
|
+
for _key, _value in self.additional_properties.items():
|
|
79
|
+
_dict[_key] = _value
|
|
76
80
|
|
|
77
81
|
# set to None if cni_conf_dir (nullable) is None
|
|
78
82
|
# and model_fields_set contains the field
|
|
79
83
|
if self.cni_conf_dir is None and "cni_conf_dir" in self.model_fields_set:
|
|
80
84
|
_dict['cniConfDir'] = None
|
|
81
85
|
|
|
86
|
+
# set to None if cni_bin_dir (nullable) is None
|
|
87
|
+
# and model_fields_set contains the field
|
|
88
|
+
if self.cni_bin_dir is None and "cni_bin_dir" in self.model_fields_set:
|
|
89
|
+
_dict['cniBinDir'] = None
|
|
90
|
+
|
|
82
91
|
return _dict
|
|
83
92
|
|
|
84
93
|
@classmethod
|
|
85
94
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
-
"""Create an instance of
|
|
95
|
+
"""Create an instance of CNI from a dict"""
|
|
87
96
|
if obj is None:
|
|
88
97
|
return None
|
|
89
98
|
|
|
@@ -91,9 +100,14 @@ class IstioCniOverrides(BaseModel):
|
|
|
91
100
|
return cls.model_validate(obj)
|
|
92
101
|
|
|
93
102
|
_obj = cls.model_validate({
|
|
94
|
-
"
|
|
95
|
-
"
|
|
103
|
+
"cniConfDir": obj.get("cniConfDir"),
|
|
104
|
+
"cniBinDir": obj.get("cniBinDir")
|
|
96
105
|
})
|
|
106
|
+
# store additional fields in additional_properties
|
|
107
|
+
for _key in obj.keys():
|
|
108
|
+
if _key not in cls.__properties:
|
|
109
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
110
|
+
|
|
97
111
|
return _obj
|
|
98
112
|
|
|
99
113
|
|
|
@@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List
|
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class ConfigFileMount(BaseModel):
|
|
27
28
|
"""
|
|
@@ -32,15 +33,16 @@ class ConfigFileMount(BaseModel):
|
|
|
32
33
|
content: Annotated[str, Field(min_length=1, strict=True)]
|
|
33
34
|
__properties: ClassVar[List[str]] = ["filename", "mount_path", "content"]
|
|
34
35
|
|
|
35
|
-
@field_validator('filename')
|
|
36
|
+
@field_validator('filename', mode="before")
|
|
36
37
|
def filename_validate_regular_expression(cls, value):
|
|
37
38
|
"""Validates the regular expression"""
|
|
38
|
-
if not re.match(r"^[a-zA-Z0-9._-]+$", value):
|
|
39
|
+
if isinstance(value, str) and not re.match(r"^[a-zA-Z0-9._-]+$", value):
|
|
39
40
|
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9._-]+$/")
|
|
40
41
|
return value
|
|
41
42
|
|
|
42
43
|
model_config = ConfigDict(
|
|
43
|
-
|
|
44
|
+
validate_by_name=True,
|
|
45
|
+
validate_by_alias=True,
|
|
44
46
|
validate_assignment=True,
|
|
45
47
|
protected_namespaces=(),
|
|
46
48
|
)
|
|
@@ -52,8 +54,7 @@ class ConfigFileMount(BaseModel):
|
|
|
52
54
|
|
|
53
55
|
def to_json(self) -> str:
|
|
54
56
|
"""Returns the JSON representation of the model using alias"""
|
|
55
|
-
|
|
56
|
-
return json.dumps(self.to_dict())
|
|
57
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
57
58
|
|
|
58
59
|
@classmethod
|
|
59
60
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -24,6 +24,7 @@ from platform_api_python_client.models.image_pull_secret_credentials import Imag
|
|
|
24
24
|
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
|
+
from pydantic_core import to_jsonable_python
|
|
27
28
|
|
|
28
29
|
class CreateComputeDeploymentRequest(BaseModel):
|
|
29
30
|
"""
|
|
@@ -35,7 +36,7 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
35
36
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
36
37
|
chart_revision: Optional[StrictStr] = None
|
|
37
38
|
volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
|
|
38
|
-
priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
|
|
39
|
+
priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = Field(default=None, description="Kubernetes PriorityClass name on the pod spec. Omit to leave unset.")
|
|
39
40
|
image_url: StrictStr
|
|
40
41
|
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
|
|
41
42
|
image_pull_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
@@ -45,25 +46,26 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
45
46
|
enable_logging: Optional[StrictBool] = False
|
|
46
47
|
__properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "image_url", "image_pull_secret_credentials", "image_pull_ref", "image_pull_secret_name", "env_vars_refs", "ssh_public_key", "enable_logging"]
|
|
47
48
|
|
|
48
|
-
@field_validator('name')
|
|
49
|
+
@field_validator('name', mode="before")
|
|
49
50
|
def name_validate_regular_expression(cls, value):
|
|
50
51
|
"""Validates the regular expression"""
|
|
51
|
-
if not re.match(r"^[a-z][a-z0-9-]*$", value):
|
|
52
|
+
if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
|
|
52
53
|
raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
|
|
53
54
|
return value
|
|
54
55
|
|
|
55
|
-
@field_validator('image_pull_secret_name')
|
|
56
|
+
@field_validator('image_pull_secret_name', mode="before")
|
|
56
57
|
def image_pull_secret_name_validate_regular_expression(cls, value):
|
|
57
58
|
"""Validates the regular expression"""
|
|
58
59
|
if value is None:
|
|
59
60
|
return value
|
|
60
61
|
|
|
61
|
-
if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
62
|
+
if isinstance(value, str) and not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
62
63
|
raise ValueError(r"must validate the regular expression /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/")
|
|
63
64
|
return value
|
|
64
65
|
|
|
65
66
|
model_config = ConfigDict(
|
|
66
|
-
|
|
67
|
+
validate_by_name=True,
|
|
68
|
+
validate_by_alias=True,
|
|
67
69
|
validate_assignment=True,
|
|
68
70
|
protected_namespaces=(),
|
|
69
71
|
)
|
|
@@ -75,8 +77,7 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
75
77
|
|
|
76
78
|
def to_json(self) -> str:
|
|
77
79
|
"""Returns the JSON representation of the model using alias"""
|
|
78
|
-
|
|
79
|
-
return json.dumps(self.to_dict())
|
|
80
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
80
81
|
|
|
81
82
|
@classmethod
|
|
82
83
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -105,8 +106,7 @@ class CreateComputeDeploymentRequest(BaseModel):
|
|
|
105
106
|
_items = []
|
|
106
107
|
if self.volume_mounts:
|
|
107
108
|
for _item_volume_mounts in self.volume_mounts:
|
|
108
|
-
if _item_volume_mounts
|
|
109
|
-
_items.append(_item_volume_mounts.to_dict())
|
|
109
|
+
_items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
|
|
110
110
|
_dict['volume_mounts'] = _items
|
|
111
111
|
# override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
|
|
112
112
|
if self.image_pull_secret_credentials:
|
|
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class CreateComputeDeploymentResponse(BaseModel):
|
|
27
28
|
"""
|
|
@@ -34,7 +35,8 @@ class CreateComputeDeploymentResponse(BaseModel):
|
|
|
34
35
|
__properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url", "port"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
38
40
|
validate_assignment=True,
|
|
39
41
|
protected_namespaces=(),
|
|
40
42
|
)
|
|
@@ -46,8 +48,7 @@ class CreateComputeDeploymentResponse(BaseModel):
|
|
|
46
48
|
|
|
47
49
|
def to_json(self) -> str:
|
|
48
50
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
52
|
|
|
52
53
|
@classmethod
|
|
53
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -22,12 +22,14 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing_extensions import Annotated
|
|
23
23
|
from platform_api_python_client.models.backend_protocol import BackendProtocol
|
|
24
24
|
from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput
|
|
25
|
+
from platform_api_python_client.models.dynamo_frontend_config import DynamoFrontendConfig
|
|
25
26
|
from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
|
|
26
27
|
from platform_api_python_client.models.dynamo_weight_transfer_configuration import DynamoWeightTransferConfiguration
|
|
27
28
|
from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
|
|
28
29
|
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
29
30
|
from typing import Optional, Set
|
|
30
31
|
from typing_extensions import Self
|
|
32
|
+
from pydantic_core import to_jsonable_python
|
|
31
33
|
|
|
32
34
|
class CreateDynamoDeploymentRequest(BaseModel):
|
|
33
35
|
"""
|
|
@@ -37,26 +39,26 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
37
39
|
max_unavailable: Optional[StrictInt] = None
|
|
38
40
|
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
|
|
39
41
|
cluster_id: StrictInt
|
|
40
|
-
hardware_instance_id: Optional[StrictInt] = None
|
|
42
|
+
hardware_instance_id: Optional[StrictInt] = Field(default=None, description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
|
|
41
43
|
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
42
44
|
chart_revision: Optional[StrictStr] = None
|
|
43
45
|
volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
|
|
44
|
-
priority: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
|
|
46
|
+
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.")
|
|
45
47
|
serving_mode: Optional[DynamoServingMode] = None
|
|
46
|
-
worker_pools: Optional[DynamoWorkerPools] = None
|
|
47
|
-
communications: Optional[DynamoCommunicationsInput] = None
|
|
48
|
-
weight_transfer: Optional[DynamoWeightTransferConfiguration] = None
|
|
48
|
+
worker_pools: Optional[DynamoWorkerPools] = Field(default=None, description="Hardware and scaling per worker role. Aggregated mode uses exactly `worker`; disaggregated mode uses exactly `prefill` and `decode`. Unused roles are null.")
|
|
49
|
+
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.")
|
|
50
|
+
weight_transfer: Optional[DynamoWeightTransferConfiguration] = Field(default=None, description="Platform-managed weight loading between the workers of a pool (ModelExpress peer transfer), in either serving mode. An empty object opts in and pins model_revision to a commit; omit or set null to keep the native loader.")
|
|
49
51
|
model: StrictStr
|
|
50
|
-
model_revision: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None
|
|
52
|
+
model_revision: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="Hugging Face branch, tag or commit of `model`. The API resolves it to a commit SHA and stores that SHA, so resume and rollback load the same weights. An update keeps the stored commit when it omits this field or sends that commit, as long as `model` is unchanged and extra_args does not set --revision; send a branch or tag to move to its newest commit. With no stored commit, weight_transfer pins the default branch's current commit, and otherwise each worker loads the default branch when it starts.")
|
|
51
53
|
served_model_name: Optional[StrictStr] = None
|
|
52
54
|
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.")
|
|
53
|
-
min_replicas: Optional[StrictInt] = None
|
|
54
|
-
max_replicas: Optional[StrictInt] = None
|
|
55
|
-
concurrency: Optional[StrictInt] = None
|
|
56
|
-
cooldown_period: Optional[StrictInt] = None
|
|
57
|
-
extra_args: Optional[StrictStr] = None
|
|
55
|
+
min_replicas: Optional[StrictInt] = Field(default=None, description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
|
|
56
|
+
max_replicas: Optional[StrictInt] = Field(default=None, description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
|
|
57
|
+
concurrency: Optional[StrictInt] = Field(default=None, description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
|
|
58
|
+
cooldown_period: Optional[StrictInt] = Field(default=None, description="Deprecated aggregated-only spelling; set this under worker_pools.worker instead. Accepted alongside worker_pools when the values agree.")
|
|
59
|
+
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.")
|
|
58
60
|
hf_token: Optional[StrictStr] = None
|
|
59
|
-
hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
|
|
61
|
+
hf_token_ref: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Access-token vault item ID for HF_TOKEN. Cannot be combined with hf_token.")
|
|
60
62
|
env_vars: Optional[Dict[str, StrictStr]] = None
|
|
61
63
|
env_vars_refs: Optional[Dict[str, Any]] = None
|
|
62
64
|
endpoint_bearer_token: Optional[StrictStr] = None
|
|
@@ -66,27 +68,29 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
66
68
|
enable_logging: Optional[StrictBool] = True
|
|
67
69
|
enable_node_model_cache: Optional[StrictBool] = False
|
|
68
70
|
backend_protocol: Optional[BackendProtocol] = None
|
|
69
|
-
|
|
71
|
+
frontend: Optional[DynamoFrontendConfig] = Field(default=None, description="Replica bounds and size of the Frontend (HTTP server and router) pods serving the endpoint, which are placed on separate nodes where possible. Two keep the endpoint serving through a node loss. min_replicas and max_replicas must be equal until Frontend autoscaling is supported. Changing any of these restarts every component of a running deployment.")
|
|
72
|
+
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "serving_mode", "worker_pools", "communications", "weight_transfer", "model", "model_revision", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "hf_token", "hf_token_ref", "env_vars", "env_vars_refs", "endpoint_bearer_token", "bearer_token_ref", "endpoint_certificate_authority", "image_pull_ref", "enable_logging", "enable_node_model_cache", "backend_protocol", "frontend"]
|
|
70
73
|
|
|
71
|
-
@field_validator('name')
|
|
74
|
+
@field_validator('name', mode="before")
|
|
72
75
|
def name_validate_regular_expression(cls, value):
|
|
73
76
|
"""Validates the regular expression"""
|
|
74
|
-
if not re.match(r"^[a-z][a-z0-9-]*$", value):
|
|
77
|
+
if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
|
|
75
78
|
raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
|
|
76
79
|
return value
|
|
77
80
|
|
|
78
|
-
@field_validator('runtime_version')
|
|
81
|
+
@field_validator('runtime_version', mode="before")
|
|
79
82
|
def runtime_version_validate_regular_expression(cls, value):
|
|
80
83
|
"""Validates the regular expression"""
|
|
81
84
|
if value is None:
|
|
82
85
|
return value
|
|
83
86
|
|
|
84
|
-
if not re.match(r"^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$", value):
|
|
87
|
+
if isinstance(value, str) and not re.match(r"^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$", value):
|
|
85
88
|
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$/")
|
|
86
89
|
return value
|
|
87
90
|
|
|
88
91
|
model_config = ConfigDict(
|
|
89
|
-
|
|
92
|
+
validate_by_name=True,
|
|
93
|
+
validate_by_alias=True,
|
|
90
94
|
validate_assignment=True,
|
|
91
95
|
protected_namespaces=(),
|
|
92
96
|
)
|
|
@@ -98,8 +102,7 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
98
102
|
|
|
99
103
|
def to_json(self) -> str:
|
|
100
104
|
"""Returns the JSON representation of the model using alias"""
|
|
101
|
-
|
|
102
|
-
return json.dumps(self.to_dict())
|
|
105
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
103
106
|
|
|
104
107
|
@classmethod
|
|
105
108
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -128,8 +131,7 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
128
131
|
_items = []
|
|
129
132
|
if self.volume_mounts:
|
|
130
133
|
for _item_volume_mounts in self.volume_mounts:
|
|
131
|
-
if _item_volume_mounts
|
|
132
|
-
_items.append(_item_volume_mounts.to_dict())
|
|
134
|
+
_items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
|
|
133
135
|
_dict['volume_mounts'] = _items
|
|
134
136
|
# override the default output from pydantic by calling `to_dict()` of worker_pools
|
|
135
137
|
if self.worker_pools:
|
|
@@ -140,6 +142,9 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
140
142
|
# override the default output from pydantic by calling `to_dict()` of weight_transfer
|
|
141
143
|
if self.weight_transfer:
|
|
142
144
|
_dict['weight_transfer'] = self.weight_transfer.to_dict()
|
|
145
|
+
# override the default output from pydantic by calling `to_dict()` of frontend
|
|
146
|
+
if self.frontend:
|
|
147
|
+
_dict['frontend'] = self.frontend.to_dict()
|
|
143
148
|
# set to None if max_surge (nullable) is None
|
|
144
149
|
# and model_fields_set contains the field
|
|
145
150
|
if self.max_surge is None and "max_surge" in self.model_fields_set:
|
|
@@ -289,7 +294,8 @@ class CreateDynamoDeploymentRequest(BaseModel):
|
|
|
289
294
|
"image_pull_ref": obj.get("image_pull_ref"),
|
|
290
295
|
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
|
|
291
296
|
"enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
|
|
292
|
-
"backend_protocol": obj.get("backend_protocol")
|
|
297
|
+
"backend_protocol": obj.get("backend_protocol"),
|
|
298
|
+
"frontend": DynamoFrontendConfig.from_dict(obj["frontend"]) if obj.get("frontend") is not None else None
|
|
293
299
|
})
|
|
294
300
|
return _obj
|
|
295
301
|
|
|
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class CreateDynamoDeploymentResponse(BaseModel):
|
|
27
28
|
"""
|
|
@@ -33,7 +34,8 @@ class CreateDynamoDeploymentResponse(BaseModel):
|
|
|
33
34
|
__properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url"]
|
|
34
35
|
|
|
35
36
|
model_config = ConfigDict(
|
|
36
|
-
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
37
39
|
validate_assignment=True,
|
|
38
40
|
protected_namespaces=(),
|
|
39
41
|
)
|
|
@@ -45,8 +47,7 @@ class CreateDynamoDeploymentResponse(BaseModel):
|
|
|
45
47
|
|
|
46
48
|
def to_json(self) -> str:
|
|
47
49
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
51
|
|
|
51
52
|
@classmethod
|
|
52
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -22,6 +22,7 @@ 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 CreateFilesystemVolumeRequest(BaseModel):
|
|
27
28
|
"""
|
|
@@ -34,10 +35,10 @@ class CreateFilesystemVolumeRequest(BaseModel):
|
|
|
34
35
|
storage_class: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = None
|
|
35
36
|
__properties: ClassVar[List[str]] = ["name", "cluster_id", "backend", "size_gb", "storage_class"]
|
|
36
37
|
|
|
37
|
-
@field_validator('name')
|
|
38
|
+
@field_validator('name', mode="before")
|
|
38
39
|
def name_validate_regular_expression(cls, value):
|
|
39
40
|
"""Validates the regular expression"""
|
|
40
|
-
if not re.match(r"^[a-z][a-z0-9-]*$", value):
|
|
41
|
+
if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
|
|
41
42
|
raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
|
|
42
43
|
return value
|
|
43
44
|
|
|
@@ -48,18 +49,19 @@ class CreateFilesystemVolumeRequest(BaseModel):
|
|
|
48
49
|
raise ValueError("must be one of enum values ('filesystem')")
|
|
49
50
|
return value
|
|
50
51
|
|
|
51
|
-
@field_validator('storage_class')
|
|
52
|
+
@field_validator('storage_class', mode="before")
|
|
52
53
|
def storage_class_validate_regular_expression(cls, value):
|
|
53
54
|
"""Validates the regular expression"""
|
|
54
55
|
if value is None:
|
|
55
56
|
return value
|
|
56
57
|
|
|
57
|
-
if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value):
|
|
58
|
+
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):
|
|
58
59
|
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])?)*$/")
|
|
59
60
|
return value
|
|
60
61
|
|
|
61
62
|
model_config = ConfigDict(
|
|
62
|
-
|
|
63
|
+
validate_by_name=True,
|
|
64
|
+
validate_by_alias=True,
|
|
63
65
|
validate_assignment=True,
|
|
64
66
|
protected_namespaces=(),
|
|
65
67
|
)
|
|
@@ -71,8 +73,7 @@ class CreateFilesystemVolumeRequest(BaseModel):
|
|
|
71
73
|
|
|
72
74
|
def to_json(self) -> str:
|
|
73
75
|
"""Returns the JSON representation of the model using alias"""
|
|
74
|
-
|
|
75
|
-
return json.dumps(self.to_dict())
|
|
76
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
76
77
|
|
|
77
78
|
@classmethod
|
|
78
79
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, 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 CreateHardwareInstanceRequest(BaseModel):
|
|
26
27
|
"""
|
|
@@ -38,7 +39,8 @@ class CreateHardwareInstanceRequest(BaseModel):
|
|
|
38
39
|
__properties: ClassVar[List[str]] = ["cluster_id", "name", "gpu_type", "num_gpu", "cpu", "memory", "accelerator_resource_key", "node_affinity_labels", "accelerator_memory"]
|
|
39
40
|
|
|
40
41
|
model_config = ConfigDict(
|
|
41
|
-
|
|
42
|
+
validate_by_name=True,
|
|
43
|
+
validate_by_alias=True,
|
|
42
44
|
validate_assignment=True,
|
|
43
45
|
protected_namespaces=(),
|
|
44
46
|
)
|
|
@@ -50,8 +52,7 @@ class CreateHardwareInstanceRequest(BaseModel):
|
|
|
50
52
|
|
|
51
53
|
def to_json(self) -> str:
|
|
52
54
|
"""Returns the JSON representation of the model using alias"""
|
|
53
|
-
|
|
54
|
-
return json.dumps(self.to_dict())
|
|
55
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
55
56
|
|
|
56
57
|
@classmethod
|
|
57
58
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class CreateInferenceDeploymentResponse(BaseModel):
|
|
27
28
|
"""
|
|
@@ -33,7 +34,8 @@ class CreateInferenceDeploymentResponse(BaseModel):
|
|
|
33
34
|
__properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url"]
|
|
34
35
|
|
|
35
36
|
model_config = ConfigDict(
|
|
36
|
-
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
37
39
|
validate_assignment=True,
|
|
38
40
|
protected_namespaces=(),
|
|
39
41
|
)
|
|
@@ -45,8 +47,7 @@ class CreateInferenceDeploymentResponse(BaseModel):
|
|
|
45
47
|
|
|
46
48
|
def to_json(self) -> str:
|
|
47
49
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
51
|
|
|
51
52
|
@classmethod
|
|
52
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|