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
|
@@ -19,19 +19,21 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from platform_api_python_client.models.
|
|
22
|
+
from platform_api_python_client.models.unified_get_deployment_revision_response import UnifiedGetDeploymentRevisionResponse
|
|
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
|
-
class
|
|
27
|
+
class UnifiedListDeploymentRevisionsResponse(BaseModel):
|
|
27
28
|
"""
|
|
28
|
-
|
|
29
|
+
UnifiedListDeploymentRevisionsResponse
|
|
29
30
|
""" # noqa: E501
|
|
30
|
-
results: List[
|
|
31
|
+
results: List[UnifiedGetDeploymentRevisionResponse]
|
|
31
32
|
__properties: ClassVar[List[str]] = ["results"]
|
|
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 ListCServeRecipeResponse(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 UnifiedListDeploymentRevisionsResponse 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,14 +74,13 @@ class ListCServeRecipeResponse(BaseModel):
|
|
|
73
74
|
_items = []
|
|
74
75
|
if self.results:
|
|
75
76
|
for _item_results in self.results:
|
|
76
|
-
if _item_results
|
|
77
|
-
_items.append(_item_results.to_dict())
|
|
77
|
+
_items.append(_item_results.to_dict() if _item_results is not None else None)
|
|
78
78
|
_dict['results'] = _items
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
81
81
|
@classmethod
|
|
82
82
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
-
"""Create an instance of
|
|
83
|
+
"""Create an instance of UnifiedListDeploymentRevisionsResponse from a dict"""
|
|
84
84
|
if obj is None:
|
|
85
85
|
return None
|
|
86
86
|
|
|
@@ -88,7 +88,7 @@ class ListCServeRecipeResponse(BaseModel):
|
|
|
88
88
|
return cls.model_validate(obj)
|
|
89
89
|
|
|
90
90
|
_obj = cls.model_validate({
|
|
91
|
-
"results": [
|
|
91
|
+
"results": [UnifiedGetDeploymentRevisionResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
92
92
|
})
|
|
93
93
|
return _obj
|
|
94
94
|
|
|
@@ -18,20 +18,21 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictBool
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
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
|
-
class
|
|
26
|
+
class UnifiedUpdateDeploymentRolloutRequest(BaseModel):
|
|
26
27
|
"""
|
|
27
|
-
|
|
28
|
+
UnifiedUpdateDeploymentRolloutRequest
|
|
28
29
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__properties: ClassVar[List[str]] = ["enabled", "values"]
|
|
30
|
+
paused: StrictBool
|
|
31
|
+
__properties: ClassVar[List[str]] = ["paused"]
|
|
32
32
|
|
|
33
33
|
model_config = ConfigDict(
|
|
34
|
-
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
35
36
|
validate_assignment=True,
|
|
36
37
|
protected_namespaces=(),
|
|
37
38
|
)
|
|
@@ -43,12 +44,11 @@ class Spire(BaseModel):
|
|
|
43
44
|
|
|
44
45
|
def to_json(self) -> str:
|
|
45
46
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
48
|
|
|
49
49
|
@classmethod
|
|
50
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of UnifiedUpdateDeploymentRolloutRequest from a JSON string"""
|
|
52
52
|
return cls.from_dict(json.loads(json_str))
|
|
53
53
|
|
|
54
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,7 +73,7 @@ class Spire(BaseModel):
|
|
|
73
73
|
|
|
74
74
|
@classmethod
|
|
75
75
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
76
|
+
"""Create an instance of UnifiedUpdateDeploymentRolloutRequest from a dict"""
|
|
77
77
|
if obj is None:
|
|
78
78
|
return None
|
|
79
79
|
|
|
@@ -81,8 +81,7 @@ class Spire(BaseModel):
|
|
|
81
81
|
return cls.model_validate(obj)
|
|
82
82
|
|
|
83
83
|
_obj = cls.model_validate({
|
|
84
|
-
"
|
|
85
|
-
"values": obj.get("values")
|
|
84
|
+
"paused": obj.get("paused")
|
|
86
85
|
})
|
|
87
86
|
return _obj
|
|
88
87
|
|
|
@@ -0,0 +1,154 @@
|
|
|
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, StrictBool, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from platform_api_python_client.models.ccl_main_pools import CclMainPools
|
|
24
|
+
from platform_api_python_client.models.env import Env
|
|
25
|
+
from platform_api_python_client.models.image import Image
|
|
26
|
+
from platform_api_python_client.models.volume_mount import VolumeMount
|
|
27
|
+
from typing import Optional, Set
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
from pydantic_core import to_jsonable_python
|
|
30
|
+
|
|
31
|
+
class UnifiedWriteComputeDeploymentRequest(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
UnifiedWriteComputeDeploymentRequest
|
|
34
|
+
""" # noqa: E501
|
|
35
|
+
type: StrictStr
|
|
36
|
+
name: Annotated[str, Field(min_length=1, strict=True, max_length=20)]
|
|
37
|
+
cluster_id: StrictInt
|
|
38
|
+
user_annotations: Optional[Dict[str, StrictStr]] = None
|
|
39
|
+
chart_revision: Optional[StrictStr] = None
|
|
40
|
+
volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None
|
|
41
|
+
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.")
|
|
42
|
+
pools: CclMainPools
|
|
43
|
+
env: Optional[Env] = None
|
|
44
|
+
image: Image
|
|
45
|
+
ssh_public_key: Annotated[str, Field(min_length=1, strict=True)]
|
|
46
|
+
enable_logging: Optional[StrictBool] = False
|
|
47
|
+
__properties: ClassVar[List[str]] = ["type", "name", "cluster_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "pools", "env", "image", "ssh_public_key", "enable_logging"]
|
|
48
|
+
|
|
49
|
+
@field_validator('type')
|
|
50
|
+
def type_validate_enum(cls, value):
|
|
51
|
+
"""Validates the enum"""
|
|
52
|
+
if value not in set(['ccl_compute']):
|
|
53
|
+
raise ValueError("must be one of enum values ('ccl_compute')")
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
@field_validator('name', mode="before")
|
|
57
|
+
def name_validate_regular_expression(cls, value):
|
|
58
|
+
"""Validates the regular expression"""
|
|
59
|
+
if isinstance(value, str) and not re.match(r"^[a-z][a-z0-9-]*$", value):
|
|
60
|
+
raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/")
|
|
61
|
+
return value
|
|
62
|
+
|
|
63
|
+
model_config = ConfigDict(
|
|
64
|
+
validate_by_name=True,
|
|
65
|
+
validate_by_alias=True,
|
|
66
|
+
validate_assignment=True,
|
|
67
|
+
protected_namespaces=(),
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def to_str(self) -> str:
|
|
72
|
+
"""Returns the string representation of the model using alias"""
|
|
73
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
74
|
+
|
|
75
|
+
def to_json(self) -> str:
|
|
76
|
+
"""Returns the JSON representation of the model using alias"""
|
|
77
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of UnifiedWriteComputeDeploymentRequest from a JSON string"""
|
|
82
|
+
return cls.from_dict(json.loads(json_str))
|
|
83
|
+
|
|
84
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
85
|
+
"""Return the dictionary representation of the model using alias.
|
|
86
|
+
|
|
87
|
+
This has the following differences from calling pydantic's
|
|
88
|
+
`self.model_dump(by_alias=True)`:
|
|
89
|
+
|
|
90
|
+
* `None` is only added to the output dict for nullable fields that
|
|
91
|
+
were set at model initialization. Other fields with value `None`
|
|
92
|
+
are ignored.
|
|
93
|
+
"""
|
|
94
|
+
excluded_fields: Set[str] = set([
|
|
95
|
+
])
|
|
96
|
+
|
|
97
|
+
_dict = self.model_dump(
|
|
98
|
+
by_alias=True,
|
|
99
|
+
exclude=excluded_fields,
|
|
100
|
+
exclude_none=True,
|
|
101
|
+
)
|
|
102
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list)
|
|
103
|
+
_items = []
|
|
104
|
+
if self.volume_mounts:
|
|
105
|
+
for _item_volume_mounts in self.volume_mounts:
|
|
106
|
+
_items.append(_item_volume_mounts.to_dict() if _item_volume_mounts is not None else None)
|
|
107
|
+
_dict['volume_mounts'] = _items
|
|
108
|
+
# override the default output from pydantic by calling `to_dict()` of pools
|
|
109
|
+
if self.pools:
|
|
110
|
+
_dict['pools'] = self.pools.to_dict()
|
|
111
|
+
# override the default output from pydantic by calling `to_dict()` of env
|
|
112
|
+
if self.env:
|
|
113
|
+
_dict['env'] = self.env.to_dict()
|
|
114
|
+
# override the default output from pydantic by calling `to_dict()` of image
|
|
115
|
+
if self.image:
|
|
116
|
+
_dict['image'] = self.image.to_dict()
|
|
117
|
+
# set to None if user_annotations (nullable) is None
|
|
118
|
+
# and model_fields_set contains the field
|
|
119
|
+
if self.user_annotations is None and "user_annotations" in self.model_fields_set:
|
|
120
|
+
_dict['user_annotations'] = None
|
|
121
|
+
|
|
122
|
+
# set to None if priority (nullable) is None
|
|
123
|
+
# and model_fields_set contains the field
|
|
124
|
+
if self.priority is None and "priority" in self.model_fields_set:
|
|
125
|
+
_dict['priority'] = None
|
|
126
|
+
|
|
127
|
+
return _dict
|
|
128
|
+
|
|
129
|
+
@classmethod
|
|
130
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
131
|
+
"""Create an instance of UnifiedWriteComputeDeploymentRequest from a dict"""
|
|
132
|
+
if obj is None:
|
|
133
|
+
return None
|
|
134
|
+
|
|
135
|
+
if not isinstance(obj, dict):
|
|
136
|
+
return cls.model_validate(obj)
|
|
137
|
+
|
|
138
|
+
_obj = cls.model_validate({
|
|
139
|
+
"type": obj.get("type"),
|
|
140
|
+
"name": obj.get("name"),
|
|
141
|
+
"cluster_id": obj.get("cluster_id"),
|
|
142
|
+
"user_annotations": obj.get("user_annotations"),
|
|
143
|
+
"chart_revision": obj.get("chart_revision"),
|
|
144
|
+
"volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None,
|
|
145
|
+
"priority": obj.get("priority"),
|
|
146
|
+
"pools": CclMainPools.from_dict(obj["pools"]) if obj.get("pools") is not None else None,
|
|
147
|
+
"env": Env.from_dict(obj["env"]) if obj.get("env") is not None else None,
|
|
148
|
+
"image": Image.from_dict(obj["image"]) if obj.get("image") is not None else None,
|
|
149
|
+
"ssh_public_key": obj.get("ssh_public_key"),
|
|
150
|
+
"enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else False
|
|
151
|
+
})
|
|
152
|
+
return _obj
|
|
153
|
+
|
|
154
|
+
|
|
@@ -0,0 +1,164 @@
|
|
|
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
|
+
from inspect import getfullargspec
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
21
|
+
from typing import Optional
|
|
22
|
+
from platform_api_python_client.models.unified_write_compute_deployment_request import UnifiedWriteComputeDeploymentRequest
|
|
23
|
+
from platform_api_python_client.models.unified_write_dynamo_deployment_request import UnifiedWriteDynamoDeploymentRequest
|
|
24
|
+
from platform_api_python_client.models.unified_write_inference_v3_deployment_request import UnifiedWriteInferenceV3DeploymentRequest
|
|
25
|
+
from platform_api_python_client.models.unified_write_job_deployment_request import UnifiedWriteJobDeploymentRequest
|
|
26
|
+
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
27
|
+
from typing_extensions import Literal, Self
|
|
28
|
+
from pydantic import Field
|
|
29
|
+
|
|
30
|
+
UNIFIEDWRITEDEPLOYMENTREQUEST_ANY_OF_SCHEMAS = ["UnifiedWriteComputeDeploymentRequest", "UnifiedWriteDynamoDeploymentRequest", "UnifiedWriteInferenceV3DeploymentRequest", "UnifiedWriteJobDeploymentRequest"]
|
|
31
|
+
|
|
32
|
+
class UnifiedWriteDeploymentRequest(BaseModel):
|
|
33
|
+
"""
|
|
34
|
+
UnifiedWriteDeploymentRequest
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
# data type: UnifiedWriteComputeDeploymentRequest
|
|
38
|
+
anyof_schema_1_validator: Optional[UnifiedWriteComputeDeploymentRequest] = None
|
|
39
|
+
# data type: UnifiedWriteInferenceV3DeploymentRequest
|
|
40
|
+
anyof_schema_2_validator: Optional[UnifiedWriteInferenceV3DeploymentRequest] = None
|
|
41
|
+
# data type: UnifiedWriteJobDeploymentRequest
|
|
42
|
+
anyof_schema_3_validator: Optional[UnifiedWriteJobDeploymentRequest] = None
|
|
43
|
+
# data type: UnifiedWriteDynamoDeploymentRequest
|
|
44
|
+
anyof_schema_4_validator: Optional[UnifiedWriteDynamoDeploymentRequest] = None
|
|
45
|
+
if TYPE_CHECKING:
|
|
46
|
+
actual_instance: Optional[Union[UnifiedWriteComputeDeploymentRequest, UnifiedWriteDynamoDeploymentRequest, UnifiedWriteInferenceV3DeploymentRequest, UnifiedWriteJobDeploymentRequest]] = None
|
|
47
|
+
else:
|
|
48
|
+
actual_instance: Any = None
|
|
49
|
+
any_of_schemas: Set[str] = { "UnifiedWriteComputeDeploymentRequest", "UnifiedWriteDynamoDeploymentRequest", "UnifiedWriteInferenceV3DeploymentRequest", "UnifiedWriteJobDeploymentRequest" }
|
|
50
|
+
|
|
51
|
+
model_config = {
|
|
52
|
+
"validate_assignment": True,
|
|
53
|
+
"protected_namespaces": (),
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
57
|
+
if args:
|
|
58
|
+
if len(args) > 1:
|
|
59
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
60
|
+
if kwargs:
|
|
61
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
62
|
+
super().__init__(actual_instance=args[0])
|
|
63
|
+
else:
|
|
64
|
+
super().__init__(**kwargs)
|
|
65
|
+
|
|
66
|
+
@field_validator('actual_instance')
|
|
67
|
+
def actual_instance_must_validate_anyof(cls, v):
|
|
68
|
+
instance = UnifiedWriteDeploymentRequest.model_construct()
|
|
69
|
+
error_messages = []
|
|
70
|
+
# validate data type: UnifiedWriteComputeDeploymentRequest
|
|
71
|
+
if not isinstance(v, UnifiedWriteComputeDeploymentRequest):
|
|
72
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `UnifiedWriteComputeDeploymentRequest`")
|
|
73
|
+
else:
|
|
74
|
+
return v
|
|
75
|
+
|
|
76
|
+
# validate data type: UnifiedWriteInferenceV3DeploymentRequest
|
|
77
|
+
if not isinstance(v, UnifiedWriteInferenceV3DeploymentRequest):
|
|
78
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `UnifiedWriteInferenceV3DeploymentRequest`")
|
|
79
|
+
else:
|
|
80
|
+
return v
|
|
81
|
+
|
|
82
|
+
# validate data type: UnifiedWriteJobDeploymentRequest
|
|
83
|
+
if not isinstance(v, UnifiedWriteJobDeploymentRequest):
|
|
84
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `UnifiedWriteJobDeploymentRequest`")
|
|
85
|
+
else:
|
|
86
|
+
return v
|
|
87
|
+
|
|
88
|
+
# validate data type: UnifiedWriteDynamoDeploymentRequest
|
|
89
|
+
if not isinstance(v, UnifiedWriteDynamoDeploymentRequest):
|
|
90
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `UnifiedWriteDynamoDeploymentRequest`")
|
|
91
|
+
else:
|
|
92
|
+
return v
|
|
93
|
+
|
|
94
|
+
if error_messages:
|
|
95
|
+
# no match
|
|
96
|
+
raise ValueError("No match found when setting the actual_instance in UnifiedWriteDeploymentRequest with anyOf schemas: UnifiedWriteComputeDeploymentRequest, UnifiedWriteDynamoDeploymentRequest, UnifiedWriteInferenceV3DeploymentRequest, UnifiedWriteJobDeploymentRequest. Details: " + ", ".join(error_messages))
|
|
97
|
+
else:
|
|
98
|
+
return v
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def from_dict(cls, obj: Dict[str, Any]) -> Self:
|
|
102
|
+
return cls.from_json(json.dumps(obj))
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
def from_json(cls, json_str: str) -> Self:
|
|
106
|
+
"""Returns the object represented by the json string"""
|
|
107
|
+
instance = cls.model_construct()
|
|
108
|
+
error_messages = []
|
|
109
|
+
# anyof_schema_1_validator: Optional[UnifiedWriteComputeDeploymentRequest] = None
|
|
110
|
+
try:
|
|
111
|
+
instance.actual_instance = UnifiedWriteComputeDeploymentRequest.from_json(json_str)
|
|
112
|
+
return instance
|
|
113
|
+
except (ValidationError, ValueError) as e:
|
|
114
|
+
error_messages.append(str(e))
|
|
115
|
+
# anyof_schema_2_validator: Optional[UnifiedWriteInferenceV3DeploymentRequest] = None
|
|
116
|
+
try:
|
|
117
|
+
instance.actual_instance = UnifiedWriteInferenceV3DeploymentRequest.from_json(json_str)
|
|
118
|
+
return instance
|
|
119
|
+
except (ValidationError, ValueError) as e:
|
|
120
|
+
error_messages.append(str(e))
|
|
121
|
+
# anyof_schema_3_validator: Optional[UnifiedWriteJobDeploymentRequest] = None
|
|
122
|
+
try:
|
|
123
|
+
instance.actual_instance = UnifiedWriteJobDeploymentRequest.from_json(json_str)
|
|
124
|
+
return instance
|
|
125
|
+
except (ValidationError, ValueError) as e:
|
|
126
|
+
error_messages.append(str(e))
|
|
127
|
+
# anyof_schema_4_validator: Optional[UnifiedWriteDynamoDeploymentRequest] = None
|
|
128
|
+
try:
|
|
129
|
+
instance.actual_instance = UnifiedWriteDynamoDeploymentRequest.from_json(json_str)
|
|
130
|
+
return instance
|
|
131
|
+
except (ValidationError, ValueError) as e:
|
|
132
|
+
error_messages.append(str(e))
|
|
133
|
+
|
|
134
|
+
if error_messages:
|
|
135
|
+
# no match
|
|
136
|
+
raise ValueError("No match found when deserializing the JSON string into UnifiedWriteDeploymentRequest with anyOf schemas: UnifiedWriteComputeDeploymentRequest, UnifiedWriteDynamoDeploymentRequest, UnifiedWriteInferenceV3DeploymentRequest, UnifiedWriteJobDeploymentRequest. Details: " + ", ".join(error_messages))
|
|
137
|
+
else:
|
|
138
|
+
return instance
|
|
139
|
+
|
|
140
|
+
def to_json(self) -> str:
|
|
141
|
+
"""Returns the JSON representation of the actual instance"""
|
|
142
|
+
if self.actual_instance is None:
|
|
143
|
+
return "null"
|
|
144
|
+
|
|
145
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
146
|
+
return self.actual_instance.to_json()
|
|
147
|
+
else:
|
|
148
|
+
return json.dumps(self.actual_instance)
|
|
149
|
+
|
|
150
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], UnifiedWriteComputeDeploymentRequest, UnifiedWriteDynamoDeploymentRequest, UnifiedWriteInferenceV3DeploymentRequest, UnifiedWriteJobDeploymentRequest]]:
|
|
151
|
+
"""Returns the dict representation of the actual instance"""
|
|
152
|
+
if self.actual_instance is None:
|
|
153
|
+
return None
|
|
154
|
+
|
|
155
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
156
|
+
return self.actual_instance.to_dict()
|
|
157
|
+
else:
|
|
158
|
+
return self.actual_instance
|
|
159
|
+
|
|
160
|
+
def to_str(self) -> str:
|
|
161
|
+
"""Returns the string representation of the actual instance"""
|
|
162
|
+
return pprint.pformat(self.model_dump())
|
|
163
|
+
|
|
164
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Platform External API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
27
|
+
|
|
28
|
+
class UnifiedWriteDeploymentResponse(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
UnifiedWriteDeploymentResponse
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
id: StrictInt
|
|
33
|
+
type: DeploymentType
|
|
34
|
+
created_at: datetime
|
|
35
|
+
updated_at: datetime
|
|
36
|
+
endpoint_url: Optional[StrictStr]
|
|
37
|
+
port: Optional[StrictInt]
|
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "type", "created_at", "updated_at", "endpoint_url", "port"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
validate_by_name=True,
|
|
42
|
+
validate_by_alias=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of UnifiedWriteDeploymentResponse from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# set to None if endpoint_url (nullable) is None
|
|
80
|
+
# and model_fields_set contains the field
|
|
81
|
+
if self.endpoint_url is None and "endpoint_url" in self.model_fields_set:
|
|
82
|
+
_dict['endpoint_url'] = None
|
|
83
|
+
|
|
84
|
+
# set to None if port (nullable) is None
|
|
85
|
+
# and model_fields_set contains the field
|
|
86
|
+
if self.port is None and "port" in self.model_fields_set:
|
|
87
|
+
_dict['port'] = 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 UnifiedWriteDeploymentResponse 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
|
+
"id": obj.get("id"),
|
|
102
|
+
"type": obj.get("type"),
|
|
103
|
+
"created_at": obj.get("created_at"),
|
|
104
|
+
"updated_at": obj.get("updated_at"),
|
|
105
|
+
"endpoint_url": obj.get("endpoint_url"),
|
|
106
|
+
"port": obj.get("port")
|
|
107
|
+
})
|
|
108
|
+
return _obj
|
|
109
|
+
|
|
110
|
+
|