diff --git a/README.md b/README.md index 8d3e32e..32e1391 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.1.0 -- Package version: 4.41.0 +- Package version: 4.42.0 - Generator version: 7.26.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -123,6 +123,7 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**generate_service_account_secret_service_accounts_workos_id_secrets_post**](docs/EXTERNALApi.md#generate_service_account_secret_service_accounts_workos_id_secrets_post) | **POST** /service-accounts/{workos_id}/secrets | Generate Service Account Secret *EXTERNALApi* | [**get_all_user_vault_items_endpoint_user_vault_get**](docs/EXTERNALApi.md#get_all_user_vault_items_endpoint_user_vault_get) | **GET** /user_vault | Get All User Vault Items Endpoint *EXTERNALApi* | [**get_all_volumes_endpoint_volumes_get**](docs/EXTERNALApi.md#get_all_volumes_endpoint_volumes_get) | **GET** /volumes | Get All Volumes Endpoint +*EXTERNALApi* | [**get_cluster_status_clusters_cluster_id_status_get**](docs/EXTERNALApi.md#get_cluster_status_clusters_cluster_id_status_get) | **GET** /clusters/{cluster_id}/status | Get Cluster Status *EXTERNALApi* | [**get_clusters_clusters_get**](docs/EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters *EXTERNALApi* | [**get_compute_deployment_deployments_compute_deployment_id_get**](docs/EXTERNALApi.md#get_compute_deployment_deployments_compute_deployment_id_get) | **GET** /deployments/compute/{deployment_id} | Get Compute Deployment *EXTERNALApi* | [**get_credits_credits_get**](docs/EXTERNALApi.md#get_credits_credits_get) | **GET** /credits | Get Credits @@ -153,6 +154,7 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**get_unified_deployment_pods_deployments_deployment_id_revisions_revision_number_pods_get**](docs/EXTERNALApi.md#get_unified_deployment_pods_deployments_deployment_id_revisions_revision_number_pods_get) | **GET** /deployments/{deployment_id}/revisions/{revision_number}/pods | Get Unified Deployment Pods *EXTERNALApi* | [**get_unified_deployment_revision_deployments_deployment_id_revisions_revision_number_get**](docs/EXTERNALApi.md#get_unified_deployment_revision_deployments_deployment_id_revisions_revision_number_get) | **GET** /deployments/{deployment_id}/revisions/{revision_number} | Get Unified Deployment Revision *EXTERNALApi* | [**get_unified_deployment_rollout_deployments_deployment_id_rollout_get**](docs/EXTERNALApi.md#get_unified_deployment_rollout_deployments_deployment_id_rollout_get) | **GET** /deployments/{deployment_id}/rollout | Get Unified Deployment Rollout +*EXTERNALApi* | [**get_unified_deployment_status_deployments_deployment_id_status_get**](docs/EXTERNALApi.md#get_unified_deployment_status_deployments_deployment_id_status_get) | **GET** /deployments/{deployment_id}/status | Get Unified Deployment Status *EXTERNALApi* | [**get_unified_deployment_usage_deployments_deployment_id_usage_get**](docs/EXTERNALApi.md#get_unified_deployment_usage_deployments_deployment_id_usage_get) | **GET** /deployments/{deployment_id}/usage | Get Unified Deployment Usage *EXTERNALApi* | [**get_usage_daily_bills_get**](docs/EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage *EXTERNALApi* | [**get_usage_deployments_usage_deployment_id_get**](docs/EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage @@ -202,6 +204,7 @@ Class | Method | HTTP request | Description - [CclusterCatalogsClusterBaseArgoRolloutsValues](docs/CclusterCatalogsClusterBaseArgoRolloutsValues.md) - [CclusterCatalogsClusterBaseCertManagerChartValues](docs/CclusterCatalogsClusterBaseCertManagerChartValues.md) - [CclusterCatalogsClusterBaseCertManagerValues](docs/CclusterCatalogsClusterBaseCertManagerValues.md) + - [CclusterCatalogsClusterBaseDynamoPlatformValues](docs/CclusterCatalogsClusterBaseDynamoPlatformValues.md) - [CclusterCatalogsClusterBaseGpuOperatorChartValues](docs/CclusterCatalogsClusterBaseGpuOperatorChartValues.md) - [CclusterCatalogsClusterBaseGpuOperatorValues](docs/CclusterCatalogsClusterBaseGpuOperatorValues.md) - [CclusterCatalogsClusterBaseIngressNginxChartValues](docs/CclusterCatalogsClusterBaseIngressNginxChartValues.md) @@ -222,6 +225,8 @@ Class | Method | HTTP request | Description - [ClusterCredential](docs/ClusterCredential.md) - [ClusterRegistrationRequest](docs/ClusterRegistrationRequest.md) - [ClusterRegistrationResponse](docs/ClusterRegistrationResponse.md) + - [ClusterStatus](docs/ClusterStatus.md) + - [ComponentHealth](docs/ComponentHealth.md) - [ConfigFileMount](docs/ConfigFileMount.md) - [CreateComputeDeploymentRequest](docs/CreateComputeDeploymentRequest.md) - [CreateComputeDeploymentResponse](docs/CreateComputeDeploymentResponse.md) @@ -269,6 +274,7 @@ Class | Method | HTTP request | Description - [Env](docs/Env.md) - [GenerateServiceAccountSecretResponse](docs/GenerateServiceAccountSecretResponse.md) - [GetClusterResponse](docs/GetClusterResponse.md) + - [GetClusterStatusResponse](docs/GetClusterStatusResponse.md) - [GetComputeDeploymentResponse](docs/GetComputeDeploymentResponse.md) - [GetDeploymentLogResponse](docs/GetDeploymentLogResponse.md) - [GetDeploymentLogV4Response](docs/GetDeploymentLogV4Response.md) @@ -345,18 +351,21 @@ Class | Method | HTTP request | Description - [ServiceStatus](docs/ServiceStatus.md) - [Toggle](docs/Toggle.md) - [Toleration](docs/Toleration.md) + - [UnifiedComponentStatus](docs/UnifiedComponentStatus.md) - [UnifiedGetComputeDeploymentResponse](docs/UnifiedGetComputeDeploymentResponse.md) - [UnifiedGetDeploymentLogsResponse](docs/UnifiedGetDeploymentLogsResponse.md) - [UnifiedGetDeploymentPodsResponse](docs/UnifiedGetDeploymentPodsResponse.md) - [UnifiedGetDeploymentResponse](docs/UnifiedGetDeploymentResponse.md) - [UnifiedGetDeploymentRevisionResponse](docs/UnifiedGetDeploymentRevisionResponse.md) - [UnifiedGetDeploymentRolloutResponse](docs/UnifiedGetDeploymentRolloutResponse.md) + - [UnifiedGetDeploymentStatusResponse](docs/UnifiedGetDeploymentStatusResponse.md) - [UnifiedGetDeploymentUsageResponse](docs/UnifiedGetDeploymentUsageResponse.md) - [UnifiedGetDynamoDeploymentResponse](docs/UnifiedGetDynamoDeploymentResponse.md) - [UnifiedGetInferenceV3DeploymentResponse](docs/UnifiedGetInferenceV3DeploymentResponse.md) - [UnifiedGetJobDeploymentResponse](docs/UnifiedGetJobDeploymentResponse.md) - [UnifiedListDeploymentRevisionsResponse](docs/UnifiedListDeploymentRevisionsResponse.md) - [UnifiedUpdateDeploymentRolloutRequest](docs/UnifiedUpdateDeploymentRolloutRequest.md) + - [UnifiedUpdateDeploymentStatusRequest](docs/UnifiedUpdateDeploymentStatusRequest.md) - [UnifiedWriteComputeDeploymentRequest](docs/UnifiedWriteComputeDeploymentRequest.md) - [UnifiedWriteDeploymentRequest](docs/UnifiedWriteDeploymentRequest.md) - [UnifiedWriteDeploymentResponse](docs/UnifiedWriteDeploymentResponse.md) diff --git a/docs/CclusterCatalogsClusterBaseDynamoPlatformValues.md b/docs/CclusterCatalogsClusterBaseDynamoPlatformValues.md new file mode 100644 index 0000000..2e33d8a --- /dev/null +++ b/docs/CclusterCatalogsClusterBaseDynamoPlatformValues.md @@ -0,0 +1,30 @@ +# CclusterCatalogsClusterBaseDynamoPlatformValues + +Values of the catalogs/cluster_base/dynamo_platform chart, generated from its Go package. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dynamo_platform** | **Dict[str, object]** | ChartValues are the upstream dynamo-platform values worth setting per cluster. It is empty: no per-cluster tunable has been identified yet, and the chart's values.yaml fixes the upstream values the catalog relies on. It exists as a named struct rather than an anonymous one so that adding the first field later is a narrow change. | [optional] + +## Example + +```python +from platform_api_python_client.models.ccluster_catalogs_cluster_base_dynamo_platform_values import CclusterCatalogsClusterBaseDynamoPlatformValues + +# TODO update the JSON string below +json = "{}" +# create an instance of CclusterCatalogsClusterBaseDynamoPlatformValues from a JSON string +ccluster_catalogs_cluster_base_dynamo_platform_values_instance = CclusterCatalogsClusterBaseDynamoPlatformValues.from_json(json) +# print the JSON string representation of the object +print(CclusterCatalogsClusterBaseDynamoPlatformValues.to_json()) + +# convert the object into a dict +ccluster_catalogs_cluster_base_dynamo_platform_values_dict = ccluster_catalogs_cluster_base_dynamo_platform_values_instance.to_dict() +# create an instance of CclusterCatalogsClusterBaseDynamoPlatformValues from a dict +ccluster_catalogs_cluster_base_dynamo_platform_values_from_dict = CclusterCatalogsClusterBaseDynamoPlatformValues.from_dict(ccluster_catalogs_cluster_base_dynamo_platform_values_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterBaseComponents.md b/docs/ClusterBaseComponents.md index 7db3575..497882f 100644 --- a/docs/ClusterBaseComponents.md +++ b/docs/ClusterBaseComponents.md @@ -1,6 +1,6 @@ # ClusterBaseComponents -The cluster_base components to install on a ccluster cluster, each as its chart's values. A component is installed only when its field is set (``{}`` for the catalog defaults), with exactly the values given. One left out is not installed, and is uninstalled if an earlier update installed it. final_stack is required. The values use the chart's own keys and may include keys the typed model doesn't list; they reach the chart unchanged. Inference deployments on GKE need ingress_nginx's `ingress-nginx.controller.podLabels` (`sidecar.istio.io/inject: \"true\"`), istio's CNI paths and gpu_operator's GKE driver paths. An unknown component name is rejected rather than read as one left out, which would uninstall it. With the generated Python client, build the request with `UpdateClusterRequest.from_dict(...)`: its model constructors drop the keys a typed model doesn't list (CentML/platform#4946). +The cluster_base components to install on a ccluster cluster, each as its chart's values. A component is installed only when its field is set (``{}`` for the catalog defaults), with exactly the values given. One left out is not installed, and is uninstalled if an earlier update installed it. final_stack is required. The values use the chart's own keys and may include keys the typed model doesn't list; they reach the chart unchanged. Inference deployments on GKE need ingress_nginx's `ingress-nginx.controller.podLabels` (`sidecar.istio.io/inject: \"true\"`), istio's CNI paths and gpu_operator's GKE driver paths. Dynamo deployments need dynamo_platform, whose NATS volume claims the cluster's default StorageClass. An unknown component name is rejected rather than read as one left out, which would uninstall it. With the generated Python client, build the request with `UpdateClusterRequest.from_dict(...)`: its model constructors drop the keys a typed model doesn't list (CentML/platform#4946). ## Properties @@ -15,6 +15,7 @@ Name | Type | Description | Notes **gpu_operator** | [**CclusterCatalogsClusterBaseGpuOperatorValues**](CclusterCatalogsClusterBaseGpuOperatorValues.md) | | [optional] **kai_scheduler** | [**CclusterCatalogsClusterBaseKaiSchedulerValues**](CclusterCatalogsClusterBaseKaiSchedulerValues.md) | | [optional] **metrics_server** | [**CclusterCatalogsClusterBaseMetricsServerValues**](CclusterCatalogsClusterBaseMetricsServerValues.md) | | [optional] +**dynamo_platform** | [**CclusterCatalogsClusterBaseDynamoPlatformValues**](CclusterCatalogsClusterBaseDynamoPlatformValues.md) | | [optional] **final_stack** | **Dict[str, object]** | Values of the catalogs/cluster_base/final_stack chart, generated from its Go package. | ## Example diff --git a/docs/ClusterStatus.md b/docs/ClusterStatus.md new file mode 100644 index 0000000..87def4d --- /dev/null +++ b/docs/ClusterStatus.md @@ -0,0 +1,16 @@ +# ClusterStatus + + +## Enum + +* `READY` (value: `'ready'`) + +* `PENDING` (value: `'pending'`) + +* `UNKNOWN` (value: `'unknown'`) + +* `DELETING` (value: `'deleting'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ComponentHealth.md b/docs/ComponentHealth.md new file mode 100644 index 0000000..61eca22 --- /dev/null +++ b/docs/ComponentHealth.md @@ -0,0 +1,25 @@ +# ComponentHealth + +A component's health as ccluster reports it: Argo CD's health statuses, plus Succeeded and Failed for a component that runs to completion, such as a job. + +## Enum + +* `HEALTHY` (value: `'Healthy'`) + +* `PROGRESSING` (value: `'Progressing'`) + +* `DEGRADED` (value: `'Degraded'`) + +* `SUSPENDED` (value: `'Suspended'`) + +* `MISSING` (value: `'Missing'`) + +* `UNKNOWN` (value: `'Unknown'`) + +* `SUCCEEDED` (value: `'Succeeded'`) + +* `FAILED` (value: `'Failed'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index 4157bef..782553b 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -28,6 +28,7 @@ Method | HTTP request | Description [**generate_service_account_secret_service_accounts_workos_id_secrets_post**](EXTERNALApi.md#generate_service_account_secret_service_accounts_workos_id_secrets_post) | **POST** /service-accounts/{workos_id}/secrets | Generate Service Account Secret [**get_all_user_vault_items_endpoint_user_vault_get**](EXTERNALApi.md#get_all_user_vault_items_endpoint_user_vault_get) | **GET** /user_vault | Get All User Vault Items Endpoint [**get_all_volumes_endpoint_volumes_get**](EXTERNALApi.md#get_all_volumes_endpoint_volumes_get) | **GET** /volumes | Get All Volumes Endpoint +[**get_cluster_status_clusters_cluster_id_status_get**](EXTERNALApi.md#get_cluster_status_clusters_cluster_id_status_get) | **GET** /clusters/{cluster_id}/status | Get Cluster Status [**get_clusters_clusters_get**](EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters [**get_compute_deployment_deployments_compute_deployment_id_get**](EXTERNALApi.md#get_compute_deployment_deployments_compute_deployment_id_get) | **GET** /deployments/compute/{deployment_id} | Get Compute Deployment [**get_credits_credits_get**](EXTERNALApi.md#get_credits_credits_get) | **GET** /credits | Get Credits @@ -58,6 +59,7 @@ Method | HTTP request | Description [**get_unified_deployment_pods_deployments_deployment_id_revisions_revision_number_pods_get**](EXTERNALApi.md#get_unified_deployment_pods_deployments_deployment_id_revisions_revision_number_pods_get) | **GET** /deployments/{deployment_id}/revisions/{revision_number}/pods | Get Unified Deployment Pods [**get_unified_deployment_revision_deployments_deployment_id_revisions_revision_number_get**](EXTERNALApi.md#get_unified_deployment_revision_deployments_deployment_id_revisions_revision_number_get) | **GET** /deployments/{deployment_id}/revisions/{revision_number} | Get Unified Deployment Revision [**get_unified_deployment_rollout_deployments_deployment_id_rollout_get**](EXTERNALApi.md#get_unified_deployment_rollout_deployments_deployment_id_rollout_get) | **GET** /deployments/{deployment_id}/rollout | Get Unified Deployment Rollout +[**get_unified_deployment_status_deployments_deployment_id_status_get**](EXTERNALApi.md#get_unified_deployment_status_deployments_deployment_id_status_get) | **GET** /deployments/{deployment_id}/status | Get Unified Deployment Status [**get_unified_deployment_usage_deployments_deployment_id_usage_get**](EXTERNALApi.md#get_unified_deployment_usage_deployments_deployment_id_usage_get) | **GET** /deployments/{deployment_id}/usage | Get Unified Deployment Usage [**get_usage_daily_bills_get**](EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage [**get_usage_deployments_usage_deployment_id_get**](EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage @@ -1891,6 +1893,85 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_cluster_status_clusters_cluster_id_status_get** +> GetClusterStatusResponse get_cluster_status_clusters_cluster_id_status_get(cluster_id) + +Get Cluster Status + +Return whether an org-owned ccluster cluster is ready, and if not, why; any member may read it. + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.get_cluster_status_response import GetClusterStatusResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + cluster_id = 56 # int | + + try: + # Get Cluster Status + api_response = api_instance.get_cluster_status_clusters_cluster_id_status_get(cluster_id) + print("The response of EXTERNALApi->get_cluster_status_clusters_cluster_id_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_cluster_status_clusters_cluster_id_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **int**| | + +### Return type + +[**GetClusterStatusResponse**](GetClusterStatusResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_clusters_clusters_get** > ListGetClusterResponse get_clusters_clusters_get() @@ -4178,7 +4259,8 @@ Name | Type | Description | Notes Get Unified Deployment Rollout -Get whether the in-flight rollout is paused, and its status. Not implemented yet. +Get whether a ccl_inference deployment's rollout is paused, and its status. A deployment that is not ACTIVE has +no rollout: it reads as not paused and Missing. ### Example @@ -4252,6 +4334,86 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_unified_deployment_status_deployments_deployment_id_status_get** +> UnifiedGetDeploymentStatusResponse get_unified_deployment_status_deployments_deployment_id_status_get(deployment_id) + +Get Unified Deployment Status + +Get a deployment's desired status and, when it is ACTIVE, whether its latest apply is live and the health of +each component. Take the pods from GET /deployments/{deployment_id}/revisions/{revision_number}/pods. + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.unified_get_deployment_status_response import UnifiedGetDeploymentStatusResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + deployment_id = 56 # int | + + try: + # Get Unified Deployment Status + api_response = api_instance.get_unified_deployment_status_deployments_deployment_id_status_get(deployment_id) + print("The response of EXTERNALApi->get_unified_deployment_status_deployments_deployment_id_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_unified_deployment_status_deployments_deployment_id_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **int**| | + +### Return type + +[**UnifiedGetDeploymentStatusResponse**](UnifiedGetDeploymentStatusResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_unified_deployment_usage_deployments_deployment_id_usage_get** > UnifiedGetDeploymentUsageResponse get_unified_deployment_usage_deployments_deployment_id_usage_get(deployment_id, metric, start_time_in_seconds, end_time_in_seconds, step=step, revision_number=revision_number, component=component, pod=pod) @@ -6620,7 +6782,11 @@ Name | Type | Description | Notes Update Unified Deployment Rollout -Pause or resume the in-flight rollout; not stored. Not implemented yet. +Pause or resume a ccl_inference deployment's rollout, as PUT /deployments/status_v3/{deployment_id} does with +rollout_status. Not stored: the next update, revision rollout or resume clears a pause. + +A pause takes effect only while the rollout is Progressing or Degraded, and a resume only while it is paused; +anything else, and a deployment that is not ACTIVE, changes nothing. ### Example @@ -6698,11 +6864,12 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_unified_deployment_status_deployments_deployment_id_status_put** -> DeploymentStatusResponse update_unified_deployment_status_deployments_deployment_id_status_put(deployment_id, deployment_status_request) +> UnifiedGetDeploymentStatusResponse update_unified_deployment_status_deployments_deployment_id_status_put(deployment_id, unified_update_deployment_status_request) Update Unified Deployment Status -Pause or resume a deployment, as PUT /deployments/status/{deployment_id} does. +Pause or resume a deployment, as PUT /deployments/status/{deployment_id} does, and return its status as +GET /deployments/{deployment_id}/status does. Pauses and resumes ccl_compute, ccl_inference, ccl_job and ccl_dynamo deployments through ccluster. DELETE /deployments/{deployment_id} deletes them. @@ -6713,8 +6880,8 @@ DELETE /deployments/{deployment_id} deletes them. ```python import platform_api_python_client -from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest -from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse +from platform_api_python_client.models.unified_get_deployment_status_response import UnifiedGetDeploymentStatusResponse +from platform_api_python_client.models.unified_update_deployment_status_request import UnifiedUpdateDeploymentStatusRequest from platform_api_python_client.rest import ApiException from pprint import pprint @@ -6739,11 +6906,11 @@ with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = platform_api_python_client.EXTERNALApi(api_client) deployment_id = 56 # int | - deployment_status_request = platform_api_python_client.DeploymentStatusRequest() # DeploymentStatusRequest | + unified_update_deployment_status_request = platform_api_python_client.UnifiedUpdateDeploymentStatusRequest() # UnifiedUpdateDeploymentStatusRequest | try: # Update Unified Deployment Status - api_response = api_instance.update_unified_deployment_status_deployments_deployment_id_status_put(deployment_id, deployment_status_request) + api_response = api_instance.update_unified_deployment_status_deployments_deployment_id_status_put(deployment_id, unified_update_deployment_status_request) print("The response of EXTERNALApi->update_unified_deployment_status_deployments_deployment_id_status_put:\n") pprint(api_response) except Exception as e: @@ -6758,11 +6925,11 @@ with platform_api_python_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **deployment_id** | **int**| | - **deployment_status_request** | [**DeploymentStatusRequest**](DeploymentStatusRequest.md)| | + **unified_update_deployment_status_request** | [**UnifiedUpdateDeploymentStatusRequest**](UnifiedUpdateDeploymentStatusRequest.md)| | ### Return type -[**DeploymentStatusResponse**](DeploymentStatusResponse.md) +[**UnifiedGetDeploymentStatusResponse**](UnifiedGetDeploymentStatusResponse.md) ### Authorization diff --git a/docs/GetClusterStatusResponse.md b/docs/GetClusterStatusResponse.md new file mode 100644 index 0000000..672966e --- /dev/null +++ b/docs/GetClusterStatusResponse.md @@ -0,0 +1,30 @@ +# GetClusterStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**ClusterStatus**](ClusterStatus.md) | deleting while the cluster's infra plane is being deleted, whatever its conditions. Otherwise ready when the Available, ClusterConfigApplied, Verified and DNSReady conditions are all True, and if not, the first of them, in that order, that is not True decides: pending when it is False or not reported yet, unknown when it is Unknown. | +**message** | **str** | Why the cluster is not ready; null when ready. | + +## Example + +```python +from platform_api_python_client.models.get_cluster_status_response import GetClusterStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetClusterStatusResponse from a JSON string +get_cluster_status_response_instance = GetClusterStatusResponse.from_json(json) +# print the JSON string representation of the object +print(GetClusterStatusResponse.to_json()) + +# convert the object into a dict +get_cluster_status_response_dict = get_cluster_status_response_instance.to_dict() +# create an instance of GetClusterStatusResponse from a dict +get_cluster_status_response_from_dict = GetClusterStatusResponse.from_dict(get_cluster_status_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedComponentStatus.md b/docs/UnifiedComponentStatus.md new file mode 100644 index 0000000..7e4a932 --- /dev/null +++ b/docs/UnifiedComponentStatus.md @@ -0,0 +1,32 @@ +# UnifiedComponentStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**health** | [**ComponentHealth**](ComponentHealth.md) | | +**reason** | **str** | | +**message** | **str** | | + +## Example + +```python +from platform_api_python_client.models.unified_component_status import UnifiedComponentStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of UnifiedComponentStatus from a JSON string +unified_component_status_instance = UnifiedComponentStatus.from_json(json) +# print the JSON string representation of the object +print(UnifiedComponentStatus.to_json()) + +# convert the object into a dict +unified_component_status_dict = unified_component_status_instance.to_dict() +# create an instance of UnifiedComponentStatus from a dict +unified_component_status_from_dict = UnifiedComponentStatus.from_dict(unified_component_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedGetDeploymentStatusResponse.md b/docs/UnifiedGetDeploymentStatusResponse.md new file mode 100644 index 0000000..d5d2e45 --- /dev/null +++ b/docs/UnifiedGetDeploymentStatusResponse.md @@ -0,0 +1,35 @@ +# UnifiedGetDeploymentStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**type** | [**DeploymentType**](DeploymentType.md) | | +**status** | [**DeploymentStatus**](DeploymentStatus.md) | The desired status, as stored. | +**endpoint_url** | **str** | | +**applied** | **str** | Whether the latest apply, of the selected revision, is live: complete once the cluster runs it and every component is healthy; failed when the rollout cannot go on without a change; progressing otherwise, also when a component degrades after the rollout completed. Null when the deployment is not ACTIVE. | +**message** | **str** | What the rollout waits on, or why it failed. | +**components** | [**List[UnifiedComponentStatus]**](UnifiedComponentStatus.md) | The health of each released component's running objects. Empty when the deployment is not ACTIVE. | + +## Example + +```python +from platform_api_python_client.models.unified_get_deployment_status_response import UnifiedGetDeploymentStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UnifiedGetDeploymentStatusResponse from a JSON string +unified_get_deployment_status_response_instance = UnifiedGetDeploymentStatusResponse.from_json(json) +# print the JSON string representation of the object +print(UnifiedGetDeploymentStatusResponse.to_json()) + +# convert the object into a dict +unified_get_deployment_status_response_dict = unified_get_deployment_status_response_instance.to_dict() +# create an instance of UnifiedGetDeploymentStatusResponse from a dict +unified_get_deployment_status_response_from_dict = UnifiedGetDeploymentStatusResponse.from_dict(unified_get_deployment_status_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnifiedUpdateDeploymentStatusRequest.md b/docs/UnifiedUpdateDeploymentStatusRequest.md new file mode 100644 index 0000000..e68c6bd --- /dev/null +++ b/docs/UnifiedUpdateDeploymentStatusRequest.md @@ -0,0 +1,29 @@ +# UnifiedUpdateDeploymentStatusRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**DeploymentStatus**](DeploymentStatus.md) | | + +## Example + +```python +from platform_api_python_client.models.unified_update_deployment_status_request import UnifiedUpdateDeploymentStatusRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnifiedUpdateDeploymentStatusRequest from a JSON string +unified_update_deployment_status_request_instance = UnifiedUpdateDeploymentStatusRequest.from_json(json) +# print the JSON string representation of the object +print(UnifiedUpdateDeploymentStatusRequest.to_json()) + +# convert the object into a dict +unified_update_deployment_status_request_dict = unified_update_deployment_status_request_instance.to_dict() +# create an instance of UnifiedUpdateDeploymentStatusRequest from a dict +unified_update_deployment_status_request_from_dict = UnifiedUpdateDeploymentStatusRequest.from_dict(unified_update_deployment_status_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index e8a1b97..2c3f76d 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.41.0" +__version__ = "4.42.0" # Define package exports __all__ = [ @@ -40,6 +40,7 @@ "CclusterCatalogsClusterBaseArgoRolloutsValues", "CclusterCatalogsClusterBaseCertManagerChartValues", "CclusterCatalogsClusterBaseCertManagerValues", + "CclusterCatalogsClusterBaseDynamoPlatformValues", "CclusterCatalogsClusterBaseGpuOperatorChartValues", "CclusterCatalogsClusterBaseGpuOperatorValues", "CclusterCatalogsClusterBaseIngressNginxChartValues", @@ -60,6 +61,8 @@ "ClusterCredential", "ClusterRegistrationRequest", "ClusterRegistrationResponse", + "ClusterStatus", + "ComponentHealth", "ConfigFileMount", "CreateComputeDeploymentRequest", "CreateComputeDeploymentResponse", @@ -107,6 +110,7 @@ "Env", "GenerateServiceAccountSecretResponse", "GetClusterResponse", + "GetClusterStatusResponse", "GetComputeDeploymentResponse", "GetDeploymentLogResponse", "GetDeploymentLogV4Response", @@ -183,18 +187,21 @@ "ServiceStatus", "Toggle", "Toleration", + "UnifiedComponentStatus", "UnifiedGetComputeDeploymentResponse", "UnifiedGetDeploymentLogsResponse", "UnifiedGetDeploymentPodsResponse", "UnifiedGetDeploymentResponse", "UnifiedGetDeploymentRevisionResponse", "UnifiedGetDeploymentRolloutResponse", + "UnifiedGetDeploymentStatusResponse", "UnifiedGetDeploymentUsageResponse", "UnifiedGetDynamoDeploymentResponse", "UnifiedGetInferenceV3DeploymentResponse", "UnifiedGetJobDeploymentResponse", "UnifiedListDeploymentRevisionsResponse", "UnifiedUpdateDeploymentRolloutRequest", + "UnifiedUpdateDeploymentStatusRequest", "UnifiedWriteComputeDeploymentRequest", "UnifiedWriteDeploymentRequest", "UnifiedWriteDeploymentResponse", @@ -249,6 +256,7 @@ from platform_api_python_client.models.ccluster_catalogs_cluster_base_argo_rollouts_values import CclusterCatalogsClusterBaseArgoRolloutsValues as CclusterCatalogsClusterBaseArgoRolloutsValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_cert_manager_chart_values import CclusterCatalogsClusterBaseCertManagerChartValues as CclusterCatalogsClusterBaseCertManagerChartValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_cert_manager_values import CclusterCatalogsClusterBaseCertManagerValues as CclusterCatalogsClusterBaseCertManagerValues +from platform_api_python_client.models.ccluster_catalogs_cluster_base_dynamo_platform_values import CclusterCatalogsClusterBaseDynamoPlatformValues as CclusterCatalogsClusterBaseDynamoPlatformValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_gpu_operator_chart_values import CclusterCatalogsClusterBaseGpuOperatorChartValues as CclusterCatalogsClusterBaseGpuOperatorChartValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_gpu_operator_values import CclusterCatalogsClusterBaseGpuOperatorValues as CclusterCatalogsClusterBaseGpuOperatorValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_ingress_nginx_chart_values import CclusterCatalogsClusterBaseIngressNginxChartValues as CclusterCatalogsClusterBaseIngressNginxChartValues @@ -269,6 +277,8 @@ from platform_api_python_client.models.cluster_credential import ClusterCredential as ClusterCredential from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest as ClusterRegistrationRequest from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse as ClusterRegistrationResponse +from platform_api_python_client.models.cluster_status import ClusterStatus as ClusterStatus +from platform_api_python_client.models.component_health import ComponentHealth as ComponentHealth from platform_api_python_client.models.config_file_mount import ConfigFileMount as ConfigFileMount from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest as CreateComputeDeploymentRequest from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse as CreateComputeDeploymentResponse @@ -316,6 +326,7 @@ from platform_api_python_client.models.env import Env as Env from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse as GenerateServiceAccountSecretResponse from platform_api_python_client.models.get_cluster_response import GetClusterResponse as GetClusterResponse +from platform_api_python_client.models.get_cluster_status_response import GetClusterStatusResponse as GetClusterStatusResponse from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse as GetComputeDeploymentResponse from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse as GetDeploymentLogResponse from platform_api_python_client.models.get_deployment_log_v4_response import GetDeploymentLogV4Response as GetDeploymentLogV4Response @@ -392,18 +403,21 @@ from platform_api_python_client.models.service_status import ServiceStatus as ServiceStatus from platform_api_python_client.models.toggle import Toggle as Toggle from platform_api_python_client.models.toleration import Toleration as Toleration +from platform_api_python_client.models.unified_component_status import UnifiedComponentStatus as UnifiedComponentStatus from platform_api_python_client.models.unified_get_compute_deployment_response import UnifiedGetComputeDeploymentResponse as UnifiedGetComputeDeploymentResponse from platform_api_python_client.models.unified_get_deployment_logs_response import UnifiedGetDeploymentLogsResponse as UnifiedGetDeploymentLogsResponse from platform_api_python_client.models.unified_get_deployment_pods_response import UnifiedGetDeploymentPodsResponse as UnifiedGetDeploymentPodsResponse from platform_api_python_client.models.unified_get_deployment_response import UnifiedGetDeploymentResponse as UnifiedGetDeploymentResponse from platform_api_python_client.models.unified_get_deployment_revision_response import UnifiedGetDeploymentRevisionResponse as UnifiedGetDeploymentRevisionResponse from platform_api_python_client.models.unified_get_deployment_rollout_response import UnifiedGetDeploymentRolloutResponse as UnifiedGetDeploymentRolloutResponse +from platform_api_python_client.models.unified_get_deployment_status_response import UnifiedGetDeploymentStatusResponse as UnifiedGetDeploymentStatusResponse from platform_api_python_client.models.unified_get_deployment_usage_response import UnifiedGetDeploymentUsageResponse as UnifiedGetDeploymentUsageResponse from platform_api_python_client.models.unified_get_dynamo_deployment_response import UnifiedGetDynamoDeploymentResponse as UnifiedGetDynamoDeploymentResponse from platform_api_python_client.models.unified_get_inference_v3_deployment_response import UnifiedGetInferenceV3DeploymentResponse as UnifiedGetInferenceV3DeploymentResponse from platform_api_python_client.models.unified_get_job_deployment_response import UnifiedGetJobDeploymentResponse as UnifiedGetJobDeploymentResponse from platform_api_python_client.models.unified_list_deployment_revisions_response import UnifiedListDeploymentRevisionsResponse as UnifiedListDeploymentRevisionsResponse from platform_api_python_client.models.unified_update_deployment_rollout_request import UnifiedUpdateDeploymentRolloutRequest as UnifiedUpdateDeploymentRolloutRequest +from platform_api_python_client.models.unified_update_deployment_status_request import UnifiedUpdateDeploymentStatusRequest as UnifiedUpdateDeploymentStatusRequest from platform_api_python_client.models.unified_write_compute_deployment_request import UnifiedWriteComputeDeploymentRequest as UnifiedWriteComputeDeploymentRequest from platform_api_python_client.models.unified_write_deployment_request import UnifiedWriteDeploymentRequest as UnifiedWriteDeploymentRequest from platform_api_python_client.models.unified_write_deployment_response import UnifiedWriteDeploymentResponse as UnifiedWriteDeploymentResponse diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index 319706b..980426f 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -42,6 +42,7 @@ from platform_api_python_client.models.deployment_status_v3_response import DeploymentStatusV3Response from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse from platform_api_python_client.models.get_cluster_response import GetClusterResponse +from platform_api_python_client.models.get_cluster_status_response import GetClusterStatusResponse from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse from platform_api_python_client.models.get_deployment_log_v4_response import GetDeploymentLogV4Response @@ -80,9 +81,11 @@ from platform_api_python_client.models.unified_get_deployment_response import UnifiedGetDeploymentResponse from platform_api_python_client.models.unified_get_deployment_revision_response import UnifiedGetDeploymentRevisionResponse from platform_api_python_client.models.unified_get_deployment_rollout_response import UnifiedGetDeploymentRolloutResponse +from platform_api_python_client.models.unified_get_deployment_status_response import UnifiedGetDeploymentStatusResponse from platform_api_python_client.models.unified_get_deployment_usage_response import UnifiedGetDeploymentUsageResponse from platform_api_python_client.models.unified_list_deployment_revisions_response import UnifiedListDeploymentRevisionsResponse from platform_api_python_client.models.unified_update_deployment_rollout_request import UnifiedUpdateDeploymentRolloutRequest +from platform_api_python_client.models.unified_update_deployment_status_request import UnifiedUpdateDeploymentStatusRequest from platform_api_python_client.models.unified_write_deployment_request import UnifiedWriteDeploymentRequest from platform_api_python_client.models.unified_write_deployment_response import UnifiedWriteDeploymentResponse from platform_api_python_client.models.update_cluster_metadata_request import UpdateClusterMetadataRequest @@ -6487,6 +6490,270 @@ def _get_all_volumes_endpoint_volumes_get_serialize( + @validate_call + def get_cluster_status_clusters_cluster_id_status_get( + self, + cluster_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetClusterStatusResponse: + """Get Cluster Status + + Return whether an org-owned ccluster cluster is ready, and if not, why; any member may read it. + + :param cluster_id: (required) + :type cluster_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_cluster_status_clusters_cluster_id_status_get_serialize( + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetClusterStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_cluster_status_clusters_cluster_id_status_get_with_http_info( + self, + cluster_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetClusterStatusResponse]: + """Get Cluster Status + + Return whether an org-owned ccluster cluster is ready, and if not, why; any member may read it. + + :param cluster_id: (required) + :type cluster_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_cluster_status_clusters_cluster_id_status_get_serialize( + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetClusterStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_cluster_status_clusters_cluster_id_status_get_without_preload_content( + self, + cluster_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Cluster Status + + Return whether an org-owned ccluster cluster is ready, and if not, why; any member may read it. + + :param cluster_id: (required) + :type cluster_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_cluster_status_clusters_cluster_id_status_get_serialize( + cluster_id=cluster_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetClusterStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_cluster_status_clusters_cluster_id_status_get_serialize( + self, + cluster_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if cluster_id is not None: + _path_params['cluster_id'] = cluster_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/clusters/{cluster_id}/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_clusters_clusters_get( self, @@ -14547,7 +14814,7 @@ def get_unified_deployment_rollout_deployments_deployment_id_rollout_get( ) -> UnifiedGetDeploymentRolloutResponse: """Get Unified Deployment Rollout - Get whether the in-flight rollout is paused, and its status. Not implemented yet. + Get whether a ccl_inference deployment's rollout is paused, and its status. A deployment that is not ACTIVE has no rollout: it reads as not paused and Missing. :param deployment_id: (required) :type deployment_id: int @@ -14615,7 +14882,7 @@ def get_unified_deployment_rollout_deployments_deployment_id_rollout_get_with_ht ) -> ApiResponse[UnifiedGetDeploymentRolloutResponse]: """Get Unified Deployment Rollout - Get whether the in-flight rollout is paused, and its status. Not implemented yet. + Get whether a ccl_inference deployment's rollout is paused, and its status. A deployment that is not ACTIVE has no rollout: it reads as not paused and Missing. :param deployment_id: (required) :type deployment_id: int @@ -14683,7 +14950,7 @@ def get_unified_deployment_rollout_deployments_deployment_id_rollout_get_without ) -> RESTResponseType: """Get Unified Deployment Rollout - Get whether the in-flight rollout is paused, and its status. Not implemented yet. + Get whether a ccl_inference deployment's rollout is paused, and its status. A deployment that is not ACTIVE has no rollout: it reads as not paused and Missing. :param deployment_id: (required) :type deployment_id: int @@ -14792,6 +15059,270 @@ def _get_unified_deployment_rollout_deployments_deployment_id_rollout_get_serial + @validate_call + def get_unified_deployment_status_deployments_deployment_id_status_get( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UnifiedGetDeploymentStatusResponse: + """Get Unified Deployment Status + + Get a deployment's desired status and, when it is ACTIVE, whether its latest apply is live and the health of each component. Take the pods from GET /deployments/{deployment_id}/revisions/{revision_number}/pods. + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_unified_deployment_status_deployments_deployment_id_status_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnifiedGetDeploymentStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_unified_deployment_status_deployments_deployment_id_status_get_with_http_info( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UnifiedGetDeploymentStatusResponse]: + """Get Unified Deployment Status + + Get a deployment's desired status and, when it is ACTIVE, whether its latest apply is live and the health of each component. Take the pods from GET /deployments/{deployment_id}/revisions/{revision_number}/pods. + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_unified_deployment_status_deployments_deployment_id_status_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnifiedGetDeploymentStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_unified_deployment_status_deployments_deployment_id_status_get_without_preload_content( + self, + deployment_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Unified Deployment Status + + Get a deployment's desired status and, when it is ACTIVE, whether its latest apply is live and the health of each component. Take the pods from GET /deployments/{deployment_id}/revisions/{revision_number}/pods. + + :param deployment_id: (required) + :type deployment_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_unified_deployment_status_deployments_deployment_id_status_get_serialize( + deployment_id=deployment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UnifiedGetDeploymentStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_unified_deployment_status_deployments_deployment_id_status_get_serialize( + self, + deployment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if deployment_id is not None: + _path_params['deployment_id'] = deployment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/deployments/{deployment_id}/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_unified_deployment_usage_deployments_deployment_id_usage_get( self, @@ -23401,7 +23932,7 @@ def update_unified_deployment_rollout_deployments_deployment_id_rollout_put( ) -> UnifiedGetDeploymentRolloutResponse: """Update Unified Deployment Rollout - Pause or resume the in-flight rollout; not stored. Not implemented yet. + Pause or resume a ccl_inference deployment's rollout, as PUT /deployments/status_v3/{deployment_id} does with rollout_status. Not stored: the next update, revision rollout or resume clears a pause. A pause takes effect only while the rollout is Progressing or Degraded, and a resume only while it is paused; anything else, and a deployment that is not ACTIVE, changes nothing. :param deployment_id: (required) :type deployment_id: int @@ -23473,7 +24004,7 @@ def update_unified_deployment_rollout_deployments_deployment_id_rollout_put_with ) -> ApiResponse[UnifiedGetDeploymentRolloutResponse]: """Update Unified Deployment Rollout - Pause or resume the in-flight rollout; not stored. Not implemented yet. + Pause or resume a ccl_inference deployment's rollout, as PUT /deployments/status_v3/{deployment_id} does with rollout_status. Not stored: the next update, revision rollout or resume clears a pause. A pause takes effect only while the rollout is Progressing or Degraded, and a resume only while it is paused; anything else, and a deployment that is not ACTIVE, changes nothing. :param deployment_id: (required) :type deployment_id: int @@ -23545,7 +24076,7 @@ def update_unified_deployment_rollout_deployments_deployment_id_rollout_put_with ) -> RESTResponseType: """Update Unified Deployment Rollout - Pause or resume the in-flight rollout; not stored. Not implemented yet. + Pause or resume a ccl_inference deployment's rollout, as PUT /deployments/status_v3/{deployment_id} does with rollout_status. Not stored: the next update, revision rollout or resume clears a pause. A pause takes effect only while the rollout is Progressing or Degraded, and a resume only while it is paused; anything else, and a deployment that is not ACTIVE, changes nothing. :param deployment_id: (required) :type deployment_id: int @@ -23677,7 +24208,7 @@ def _update_unified_deployment_rollout_deployments_deployment_id_rollout_put_ser def update_unified_deployment_status_deployments_deployment_id_status_put( self, deployment_id: StrictInt, - deployment_status_request: DeploymentStatusRequest, + unified_update_deployment_status_request: UnifiedUpdateDeploymentStatusRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23690,15 +24221,15 @@ def update_unified_deployment_status_deployments_deployment_id_status_put( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DeploymentStatusResponse: + ) -> UnifiedGetDeploymentStatusResponse: """Update Unified Deployment Status - Pause or resume a deployment, as PUT /deployments/status/{deployment_id} does. Pauses and resumes ccl_compute, ccl_inference, ccl_job and ccl_dynamo deployments through ccluster. DELETE /deployments/{deployment_id} deletes them. + Pause or resume a deployment, as PUT /deployments/status/{deployment_id} does, and return its status as GET /deployments/{deployment_id}/status does. Pauses and resumes ccl_compute, ccl_inference, ccl_job and ccl_dynamo deployments through ccluster. DELETE /deployments/{deployment_id} deletes them. :param deployment_id: (required) :type deployment_id: int - :param deployment_status_request: (required) - :type deployment_status_request: DeploymentStatusRequest + :param unified_update_deployment_status_request: (required) + :type unified_update_deployment_status_request: UnifiedUpdateDeploymentStatusRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23723,7 +24254,7 @@ def update_unified_deployment_status_deployments_deployment_id_status_put( _param = self._update_unified_deployment_status_deployments_deployment_id_status_put_serialize( deployment_id=deployment_id, - deployment_status_request=deployment_status_request, + unified_update_deployment_status_request=unified_update_deployment_status_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23731,7 +24262,7 @@ def update_unified_deployment_status_deployments_deployment_id_status_put( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", + '200': "UnifiedGetDeploymentStatusResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -23749,7 +24280,7 @@ def update_unified_deployment_status_deployments_deployment_id_status_put( def update_unified_deployment_status_deployments_deployment_id_status_put_with_http_info( self, deployment_id: StrictInt, - deployment_status_request: DeploymentStatusRequest, + unified_update_deployment_status_request: UnifiedUpdateDeploymentStatusRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23762,15 +24293,15 @@ def update_unified_deployment_status_deployments_deployment_id_status_put_with_h _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DeploymentStatusResponse]: + ) -> ApiResponse[UnifiedGetDeploymentStatusResponse]: """Update Unified Deployment Status - Pause or resume a deployment, as PUT /deployments/status/{deployment_id} does. Pauses and resumes ccl_compute, ccl_inference, ccl_job and ccl_dynamo deployments through ccluster. DELETE /deployments/{deployment_id} deletes them. + Pause or resume a deployment, as PUT /deployments/status/{deployment_id} does, and return its status as GET /deployments/{deployment_id}/status does. Pauses and resumes ccl_compute, ccl_inference, ccl_job and ccl_dynamo deployments through ccluster. DELETE /deployments/{deployment_id} deletes them. :param deployment_id: (required) :type deployment_id: int - :param deployment_status_request: (required) - :type deployment_status_request: DeploymentStatusRequest + :param unified_update_deployment_status_request: (required) + :type unified_update_deployment_status_request: UnifiedUpdateDeploymentStatusRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23795,7 +24326,7 @@ def update_unified_deployment_status_deployments_deployment_id_status_put_with_h _param = self._update_unified_deployment_status_deployments_deployment_id_status_put_serialize( deployment_id=deployment_id, - deployment_status_request=deployment_status_request, + unified_update_deployment_status_request=unified_update_deployment_status_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23803,7 +24334,7 @@ def update_unified_deployment_status_deployments_deployment_id_status_put_with_h ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", + '200': "UnifiedGetDeploymentStatusResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -23821,7 +24352,7 @@ def update_unified_deployment_status_deployments_deployment_id_status_put_with_h def update_unified_deployment_status_deployments_deployment_id_status_put_without_preload_content( self, deployment_id: StrictInt, - deployment_status_request: DeploymentStatusRequest, + unified_update_deployment_status_request: UnifiedUpdateDeploymentStatusRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23837,12 +24368,12 @@ def update_unified_deployment_status_deployments_deployment_id_status_put_withou ) -> RESTResponseType: """Update Unified Deployment Status - Pause or resume a deployment, as PUT /deployments/status/{deployment_id} does. Pauses and resumes ccl_compute, ccl_inference, ccl_job and ccl_dynamo deployments through ccluster. DELETE /deployments/{deployment_id} deletes them. + Pause or resume a deployment, as PUT /deployments/status/{deployment_id} does, and return its status as GET /deployments/{deployment_id}/status does. Pauses and resumes ccl_compute, ccl_inference, ccl_job and ccl_dynamo deployments through ccluster. DELETE /deployments/{deployment_id} deletes them. :param deployment_id: (required) :type deployment_id: int - :param deployment_status_request: (required) - :type deployment_status_request: DeploymentStatusRequest + :param unified_update_deployment_status_request: (required) + :type unified_update_deployment_status_request: UnifiedUpdateDeploymentStatusRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23867,7 +24398,7 @@ def update_unified_deployment_status_deployments_deployment_id_status_put_withou _param = self._update_unified_deployment_status_deployments_deployment_id_status_put_serialize( deployment_id=deployment_id, - deployment_status_request=deployment_status_request, + unified_update_deployment_status_request=unified_update_deployment_status_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23875,7 +24406,7 @@ def update_unified_deployment_status_deployments_deployment_id_status_put_withou ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", + '200': "UnifiedGetDeploymentStatusResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -23888,7 +24419,7 @@ def update_unified_deployment_status_deployments_deployment_id_status_put_withou def _update_unified_deployment_status_deployments_deployment_id_status_put_serialize( self, deployment_id, - deployment_status_request, + unified_update_deployment_status_request, _request_auth, _content_type, _headers, @@ -23916,8 +24447,8 @@ def _update_unified_deployment_status_deployments_deployment_id_status_put_seria # process the header parameters # process the form parameters # process the body parameter - if deployment_status_request is not None: - _body_params = deployment_status_request + if unified_update_deployment_status_request is not None: + _body_params = unified_update_deployment_status_request # set the HTTP header `Accept` diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index e1dbce2..a477941 100644 --- a/platform_api_python_client/api_client.py +++ b/platform_api_python_client/api_client.py @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/4.41.0/python' + self.user_agent = 'OpenAPI-Generator/4.42.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/platform_api_python_client/configuration.py b/platform_api_python_client/configuration.py index 253ff1e..890eddb 100644 --- a/platform_api_python_client/configuration.py +++ b/platform_api_python_client/configuration.py @@ -562,7 +562,7 @@ def to_debug_report(self) -> str: "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.1.0\n"\ - "SDK Package Version: 4.41.0".\ + "SDK Package Version: 4.42.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/platform_api_python_client/models/__init__.py b/platform_api_python_client/models/__init__.py index 594e69d..7814e08 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -25,6 +25,7 @@ from platform_api_python_client.models.ccluster_catalogs_cluster_base_argo_rollouts_values import CclusterCatalogsClusterBaseArgoRolloutsValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_cert_manager_chart_values import CclusterCatalogsClusterBaseCertManagerChartValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_cert_manager_values import CclusterCatalogsClusterBaseCertManagerValues +from platform_api_python_client.models.ccluster_catalogs_cluster_base_dynamo_platform_values import CclusterCatalogsClusterBaseDynamoPlatformValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_gpu_operator_chart_values import CclusterCatalogsClusterBaseGpuOperatorChartValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_gpu_operator_values import CclusterCatalogsClusterBaseGpuOperatorValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_ingress_nginx_chart_values import CclusterCatalogsClusterBaseIngressNginxChartValues @@ -45,6 +46,8 @@ from platform_api_python_client.models.cluster_credential import ClusterCredential from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse +from platform_api_python_client.models.cluster_status import ClusterStatus +from platform_api_python_client.models.component_health import ComponentHealth from platform_api_python_client.models.config_file_mount import ConfigFileMount from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse @@ -92,6 +95,7 @@ from platform_api_python_client.models.env import Env from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse from platform_api_python_client.models.get_cluster_response import GetClusterResponse +from platform_api_python_client.models.get_cluster_status_response import GetClusterStatusResponse from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse from platform_api_python_client.models.get_deployment_log_v4_response import GetDeploymentLogV4Response @@ -168,18 +172,21 @@ from platform_api_python_client.models.service_status import ServiceStatus from platform_api_python_client.models.toggle import Toggle from platform_api_python_client.models.toleration import Toleration +from platform_api_python_client.models.unified_component_status import UnifiedComponentStatus from platform_api_python_client.models.unified_get_compute_deployment_response import UnifiedGetComputeDeploymentResponse from platform_api_python_client.models.unified_get_deployment_logs_response import UnifiedGetDeploymentLogsResponse from platform_api_python_client.models.unified_get_deployment_pods_response import UnifiedGetDeploymentPodsResponse from platform_api_python_client.models.unified_get_deployment_response import UnifiedGetDeploymentResponse from platform_api_python_client.models.unified_get_deployment_revision_response import UnifiedGetDeploymentRevisionResponse from platform_api_python_client.models.unified_get_deployment_rollout_response import UnifiedGetDeploymentRolloutResponse +from platform_api_python_client.models.unified_get_deployment_status_response import UnifiedGetDeploymentStatusResponse from platform_api_python_client.models.unified_get_deployment_usage_response import UnifiedGetDeploymentUsageResponse from platform_api_python_client.models.unified_get_dynamo_deployment_response import UnifiedGetDynamoDeploymentResponse from platform_api_python_client.models.unified_get_inference_v3_deployment_response import UnifiedGetInferenceV3DeploymentResponse from platform_api_python_client.models.unified_get_job_deployment_response import UnifiedGetJobDeploymentResponse from platform_api_python_client.models.unified_list_deployment_revisions_response import UnifiedListDeploymentRevisionsResponse from platform_api_python_client.models.unified_update_deployment_rollout_request import UnifiedUpdateDeploymentRolloutRequest +from platform_api_python_client.models.unified_update_deployment_status_request import UnifiedUpdateDeploymentStatusRequest from platform_api_python_client.models.unified_write_compute_deployment_request import UnifiedWriteComputeDeploymentRequest from platform_api_python_client.models.unified_write_deployment_request import UnifiedWriteDeploymentRequest from platform_api_python_client.models.unified_write_deployment_response import UnifiedWriteDeploymentResponse diff --git a/platform_api_python_client/models/ccluster_catalogs_cluster_base_dynamo_platform_values.py b/platform_api_python_client/models/ccluster_catalogs_cluster_base_dynamo_platform_values.py new file mode 100644 index 0000000..7c4e3fd --- /dev/null +++ b/platform_api_python_client/models/ccluster_catalogs_cluster_base_dynamo_platform_values.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CclusterCatalogsClusterBaseDynamoPlatformValues(BaseModel): + """ + Values of the catalogs/cluster_base/dynamo_platform chart, generated from its Go package. + """ # noqa: E501 + dynamo_platform: Optional[Dict[str, Any]] = Field(default=None, description="ChartValues are the upstream dynamo-platform values worth setting per cluster. It is empty: no per-cluster tunable has been identified yet, and the chart's values.yaml fixes the upstream values the catalog relies on. It exists as a named struct rather than an anonymous one so that adding the first field later is a narrow change.", alias="dynamo-platform") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["dynamo-platform"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CclusterCatalogsClusterBaseDynamoPlatformValues from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if dynamo_platform (nullable) is None + # and model_fields_set contains the field + if self.dynamo_platform is None and "dynamo_platform" in self.model_fields_set: + _dict['dynamo-platform'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CclusterCatalogsClusterBaseDynamoPlatformValues from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dynamo-platform": obj.get("dynamo-platform") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/platform_api_python_client/models/cluster_base_components.py b/platform_api_python_client/models/cluster_base_components.py index dd53ded..d45fe30 100644 --- a/platform_api_python_client/models/cluster_base_components.py +++ b/platform_api_python_client/models/cluster_base_components.py @@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional from platform_api_python_client.models.ccluster_catalogs_cluster_base_argo_rollouts_values import CclusterCatalogsClusterBaseArgoRolloutsValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_cert_manager_values import CclusterCatalogsClusterBaseCertManagerValues +from platform_api_python_client.models.ccluster_catalogs_cluster_base_dynamo_platform_values import CclusterCatalogsClusterBaseDynamoPlatformValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_gpu_operator_values import CclusterCatalogsClusterBaseGpuOperatorValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_ingress_nginx_values import CclusterCatalogsClusterBaseIngressNginxValues from platform_api_python_client.models.ccluster_catalogs_cluster_base_istio_values import CclusterCatalogsClusterBaseIstioValues @@ -34,7 +35,7 @@ class ClusterBaseComponents(BaseModel): """ - The cluster_base components to install on a ccluster cluster, each as its chart's values. A component is installed only when its field is set (``{}`` for the catalog defaults), with exactly the values given. One left out is not installed, and is uninstalled if an earlier update installed it. final_stack is required. The values use the chart's own keys and may include keys the typed model doesn't list; they reach the chart unchanged. Inference deployments on GKE need ingress_nginx's `ingress-nginx.controller.podLabels` (`sidecar.istio.io/inject: \"true\"`), istio's CNI paths and gpu_operator's GKE driver paths. An unknown component name is rejected rather than read as one left out, which would uninstall it. With the generated Python client, build the request with `UpdateClusterRequest.from_dict(...)`: its model constructors drop the keys a typed model doesn't list (CentML/platform#4946). + The cluster_base components to install on a ccluster cluster, each as its chart's values. A component is installed only when its field is set (``{}`` for the catalog defaults), with exactly the values given. One left out is not installed, and is uninstalled if an earlier update installed it. final_stack is required. The values use the chart's own keys and may include keys the typed model doesn't list; they reach the chart unchanged. Inference deployments on GKE need ingress_nginx's `ingress-nginx.controller.podLabels` (`sidecar.istio.io/inject: \"true\"`), istio's CNI paths and gpu_operator's GKE driver paths. Dynamo deployments need dynamo_platform, whose NATS volume claims the cluster's default StorageClass. An unknown component name is rejected rather than read as one left out, which would uninstall it. With the generated Python client, build the request with `UpdateClusterRequest.from_dict(...)`: its model constructors drop the keys a typed model doesn't list (CentML/platform#4946). """ # noqa: E501 kube_prometheus_stack: Optional[CclusterCatalogsClusterBaseKubePrometheusStackValues] = None istio: Optional[CclusterCatalogsClusterBaseIstioValues] = None @@ -45,8 +46,9 @@ class ClusterBaseComponents(BaseModel): gpu_operator: Optional[CclusterCatalogsClusterBaseGpuOperatorValues] = None kai_scheduler: Optional[CclusterCatalogsClusterBaseKaiSchedulerValues] = None metrics_server: Optional[CclusterCatalogsClusterBaseMetricsServerValues] = None + dynamo_platform: Optional[CclusterCatalogsClusterBaseDynamoPlatformValues] = None final_stack: Dict[str, Any] = Field(description="Values of the catalogs/cluster_base/final_stack chart, generated from its Go package.") - __properties: ClassVar[List[str]] = ["kube_prometheus_stack", "istio", "cert_manager", "ingress_nginx", "keda", "argo_rollouts", "gpu_operator", "kai_scheduler", "metrics_server", "final_stack"] + __properties: ClassVar[List[str]] = ["kube_prometheus_stack", "istio", "cert_manager", "ingress_nginx", "keda", "argo_rollouts", "gpu_operator", "kai_scheduler", "metrics_server", "dynamo_platform", "final_stack"] model_config = ConfigDict( validate_by_name=True, @@ -114,6 +116,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of metrics_server if self.metrics_server: _dict['metrics_server'] = self.metrics_server.to_dict() + # override the default output from pydantic by calling `to_dict()` of dynamo_platform + if self.dynamo_platform: + _dict['dynamo_platform'] = self.dynamo_platform.to_dict() # set to None if kube_prometheus_stack (nullable) is None # and model_fields_set contains the field if self.kube_prometheus_stack is None and "kube_prometheus_stack" in self.model_fields_set: @@ -159,6 +164,11 @@ def to_dict(self) -> Dict[str, Any]: if self.metrics_server is None and "metrics_server" in self.model_fields_set: _dict['metrics_server'] = None + # set to None if dynamo_platform (nullable) is None + # and model_fields_set contains the field + if self.dynamo_platform is None and "dynamo_platform" in self.model_fields_set: + _dict['dynamo_platform'] = None + return _dict @classmethod @@ -180,6 +190,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "gpu_operator": CclusterCatalogsClusterBaseGpuOperatorValues.from_dict(obj["gpu_operator"]) if obj.get("gpu_operator") is not None else None, "kai_scheduler": CclusterCatalogsClusterBaseKaiSchedulerValues.from_dict(obj["kai_scheduler"]) if obj.get("kai_scheduler") is not None else None, "metrics_server": CclusterCatalogsClusterBaseMetricsServerValues.from_dict(obj["metrics_server"]) if obj.get("metrics_server") is not None else None, + "dynamo_platform": CclusterCatalogsClusterBaseDynamoPlatformValues.from_dict(obj["dynamo_platform"]) if obj.get("dynamo_platform") is not None else None, "final_stack": obj.get("final_stack") }) return _obj diff --git a/platform_api_python_client/models/cluster_status.py b/platform_api_python_client/models/cluster_status.py new file mode 100644 index 0000000..ce9575e --- /dev/null +++ b/platform_api_python_client/models/cluster_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ClusterStatus(str, Enum): + """ + ClusterStatus + """ + + """ + allowed enum values + """ + READY = 'ready' + PENDING = 'pending' + UNKNOWN = 'unknown' + DELETING = 'deleting' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ClusterStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/models/component_health.py b/platform_api_python_client/models/component_health.py new file mode 100644 index 0000000..fb4d142 --- /dev/null +++ b/platform_api_python_client/models/component_health.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ComponentHealth(str, Enum): + """ + A component's health as ccluster reports it: Argo CD's health statuses, plus Succeeded and Failed for a component that runs to completion, such as a job. + """ + + """ + allowed enum values + """ + HEALTHY = 'Healthy' + PROGRESSING = 'Progressing' + DEGRADED = 'Degraded' + SUSPENDED = 'Suspended' + MISSING = 'Missing' + UNKNOWN = 'Unknown' + SUCCEEDED = 'Succeeded' + FAILED = 'Failed' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ComponentHealth from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/models/get_cluster_status_response.py b/platform_api_python_client/models/get_cluster_status_response.py new file mode 100644 index 0000000..2dc5655 --- /dev/null +++ b/platform_api_python_client/models/get_cluster_status_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.cluster_status import ClusterStatus +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GetClusterStatusResponse(BaseModel): + """ + GetClusterStatusResponse + """ # noqa: E501 + status: ClusterStatus = Field(description="deleting while the cluster's infra plane is being deleted, whatever its conditions. Otherwise ready when the Available, ClusterConfigApplied, Verified and DNSReady conditions are all True, and if not, the first of them, in that order, that is not True decides: pending when it is False or not reported yet, unknown when it is Unknown.") + message: Optional[StrictStr] = Field(description="Why the cluster is not ready; null when ready.") + __properties: ClassVar[List[str]] = ["status", "message"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetClusterStatusResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetClusterStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message") + }) + return _obj + + diff --git a/platform_api_python_client/models/unified_component_status.py b/platform_api_python_client/models/unified_component_status.py new file mode 100644 index 0000000..2131baf --- /dev/null +++ b/platform_api_python_client/models/unified_component_status.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.component_health import ComponentHealth +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UnifiedComponentStatus(BaseModel): + """ + UnifiedComponentStatus + """ # noqa: E501 + name: StrictStr + health: ComponentHealth + reason: Optional[StrictStr] + message: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["name", "health", "reason", "message"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnifiedComponentStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if reason (nullable) is None + # and model_fields_set contains the field + if self.reason is None and "reason" in self.model_fields_set: + _dict['reason'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnifiedComponentStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "health": obj.get("health"), + "reason": obj.get("reason"), + "message": obj.get("message") + }) + return _obj + + diff --git a/platform_api_python_client/models/unified_get_deployment_status_response.py b/platform_api_python_client/models/unified_get_deployment_status_response.py new file mode 100644 index 0000000..3543b01 --- /dev/null +++ b/platform_api_python_client/models/unified_get_deployment_status_response.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.deployment_status import DeploymentStatus +from platform_api_python_client.models.deployment_type import DeploymentType +from platform_api_python_client.models.unified_component_status import UnifiedComponentStatus +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UnifiedGetDeploymentStatusResponse(BaseModel): + """ + UnifiedGetDeploymentStatusResponse + """ # noqa: E501 + id: StrictInt + type: DeploymentType + status: DeploymentStatus = Field(description="The desired status, as stored.") + endpoint_url: Optional[StrictStr] + applied: Optional[StrictStr] = Field(description="Whether the latest apply, of the selected revision, is live: complete once the cluster runs it and every component is healthy; failed when the rollout cannot go on without a change; progressing otherwise, also when a component degrades after the rollout completed. Null when the deployment is not ACTIVE.") + message: Optional[StrictStr] = Field(description="What the rollout waits on, or why it failed.") + components: List[UnifiedComponentStatus] = Field(description="The health of each released component's running objects. Empty when the deployment is not ACTIVE.") + __properties: ClassVar[List[str]] = ["id", "type", "status", "endpoint_url", "applied", "message", "components"] + + @field_validator('applied') + def applied_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['progressing', 'complete', 'failed']): + raise ValueError("must be one of enum values ('progressing', 'complete', 'failed')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnifiedGetDeploymentStatusResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in components (list) + _items = [] + if self.components: + for _item_components in self.components: + _items.append(_item_components.to_dict() if _item_components is not None else None) + _dict['components'] = _items + # set to None if endpoint_url (nullable) is None + # and model_fields_set contains the field + if self.endpoint_url is None and "endpoint_url" in self.model_fields_set: + _dict['endpoint_url'] = None + + # set to None if applied (nullable) is None + # and model_fields_set contains the field + if self.applied is None and "applied" in self.model_fields_set: + _dict['applied'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnifiedGetDeploymentStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "status": obj.get("status"), + "endpoint_url": obj.get("endpoint_url"), + "applied": obj.get("applied"), + "message": obj.get("message"), + "components": [UnifiedComponentStatus.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/models/unified_update_deployment_status_request.py b/platform_api_python_client/models/unified_update_deployment_status_request.py new file mode 100644 index 0000000..f113b6b --- /dev/null +++ b/platform_api_python_client/models/unified_update_deployment_status_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.deployment_status import DeploymentStatus +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UnifiedUpdateDeploymentStatusRequest(BaseModel): + """ + UnifiedUpdateDeploymentStatusRequest + """ # noqa: E501 + status: DeploymentStatus + __properties: ClassVar[List[str]] = ["status"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnifiedUpdateDeploymentStatusRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnifiedUpdateDeploymentStatusRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + return _obj + + diff --git a/pyproject.toml b/pyproject.toml index 22ff17f..f64e808 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "platform_api_python_client" -version = "4.41.0" +version = "4.42.0" description = "Platform External API" authors = [ {name = "OpenAPI Generator Community",email = "team@openapitools.org"}, diff --git a/setup.py b/setup.py index 7b10fbd..76d9152 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "platform-api-python-client" -VERSION = "4.41.0" +VERSION = "4.42.0" PYTHON_REQUIRES = ">= 3.10" REQUIRES = [ "urllib3 >= 2.7.0, < 3.0.0", diff --git a/test/test_ccluster_catalogs_cluster_base_dynamo_platform_values.py b/test/test_ccluster_catalogs_cluster_base_dynamo_platform_values.py new file mode 100644 index 0000000..8721cc9 --- /dev/null +++ b/test/test_ccluster_catalogs_cluster_base_dynamo_platform_values.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.ccluster_catalogs_cluster_base_dynamo_platform_values import CclusterCatalogsClusterBaseDynamoPlatformValues + +class TestCclusterCatalogsClusterBaseDynamoPlatformValues(unittest.TestCase): + """CclusterCatalogsClusterBaseDynamoPlatformValues unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CclusterCatalogsClusterBaseDynamoPlatformValues: + """Test CclusterCatalogsClusterBaseDynamoPlatformValues + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CclusterCatalogsClusterBaseDynamoPlatformValues` + """ + model = CclusterCatalogsClusterBaseDynamoPlatformValues() + if include_optional: + return CclusterCatalogsClusterBaseDynamoPlatformValues( + dynamo_platform = { } + ) + else: + return CclusterCatalogsClusterBaseDynamoPlatformValues( + ) + """ + + def testCclusterCatalogsClusterBaseDynamoPlatformValues(self): + """Test CclusterCatalogsClusterBaseDynamoPlatformValues""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_base_components.py b/test/test_cluster_base_components.py index 7b3461e..6ee003a 100644 --- a/test/test_cluster_base_components.py +++ b/test/test_cluster_base_components.py @@ -44,6 +44,7 @@ def make_instance(self, include_optional) -> ClusterBaseComponents: gpu_operator = { }, kai_scheduler = { }, metrics_server = { }, + dynamo_platform = { }, final_stack = { } ) else: diff --git a/test/test_cluster_status.py b/test/test_cluster_status.py new file mode 100644 index 0000000..7368653 --- /dev/null +++ b/test/test_cluster_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.cluster_status import ClusterStatus + +class TestClusterStatus(unittest.TestCase): + """ClusterStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClusterStatus(self): + """Test ClusterStatus""" + # inst = ClusterStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_component_health.py b/test/test_component_health.py new file mode 100644 index 0000000..8160b50 --- /dev/null +++ b/test/test_component_health.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.component_health import ComponentHealth + +class TestComponentHealth(unittest.TestCase): + """ComponentHealth unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testComponentHealth(self): + """Test ComponentHealth""" + # inst = ComponentHealth() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_api.py b/test/test_external_api.py index 0e1e656..01326e0 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -194,6 +194,13 @@ def test_get_all_volumes_endpoint_volumes_get(self) -> None: """ pass + def test_get_cluster_status_clusters_cluster_id_status_get(self) -> None: + """Test case for get_cluster_status_clusters_cluster_id_status_get + + Get Cluster Status + """ + pass + def test_get_clusters_clusters_get(self) -> None: """Test case for get_clusters_clusters_get @@ -404,6 +411,13 @@ def test_get_unified_deployment_rollout_deployments_deployment_id_rollout_get(se """ pass + def test_get_unified_deployment_status_deployments_deployment_id_status_get(self) -> None: + """Test case for get_unified_deployment_status_deployments_deployment_id_status_get + + Get Unified Deployment Status + """ + pass + def test_get_unified_deployment_usage_deployments_deployment_id_usage_get(self) -> None: """Test case for get_unified_deployment_usage_deployments_deployment_id_usage_get diff --git a/test/test_get_cluster_status_response.py b/test/test_get_cluster_status_response.py new file mode 100644 index 0000000..12eed7d --- /dev/null +++ b/test/test_get_cluster_status_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_cluster_status_response import GetClusterStatusResponse + +class TestGetClusterStatusResponse(unittest.TestCase): + """GetClusterStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetClusterStatusResponse: + """Test GetClusterStatusResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetClusterStatusResponse` + """ + model = GetClusterStatusResponse() + if include_optional: + return GetClusterStatusResponse( + status = 'ready', + message = '' + ) + else: + return GetClusterStatusResponse( + status = 'ready', + message = '', + ) + """ + + def testGetClusterStatusResponse(self): + """Test GetClusterStatusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unified_component_status.py b/test/test_unified_component_status.py new file mode 100644 index 0000000..f537d3a --- /dev/null +++ b/test/test_unified_component_status.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.unified_component_status import UnifiedComponentStatus + +class TestUnifiedComponentStatus(unittest.TestCase): + """UnifiedComponentStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnifiedComponentStatus: + """Test UnifiedComponentStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnifiedComponentStatus` + """ + model = UnifiedComponentStatus() + if include_optional: + return UnifiedComponentStatus( + name = '', + health = 'Healthy', + reason = '', + message = '' + ) + else: + return UnifiedComponentStatus( + name = '', + health = 'Healthy', + reason = '', + message = '', + ) + """ + + def testUnifiedComponentStatus(self): + """Test UnifiedComponentStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unified_get_deployment_status_response.py b/test/test_unified_get_deployment_status_response.py new file mode 100644 index 0000000..c14d957 --- /dev/null +++ b/test/test_unified_get_deployment_status_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.unified_get_deployment_status_response import UnifiedGetDeploymentStatusResponse + +class TestUnifiedGetDeploymentStatusResponse(unittest.TestCase): + """UnifiedGetDeploymentStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnifiedGetDeploymentStatusResponse: + """Test UnifiedGetDeploymentStatusResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnifiedGetDeploymentStatusResponse` + """ + model = UnifiedGetDeploymentStatusResponse() + if include_optional: + return UnifiedGetDeploymentStatusResponse( + id = 56, + type = 'inference', + status = 'active', + endpoint_url = '', + applied = 'progressing', + message = '', + components = [ + platform_api_python_client.models.unified_component_status.UnifiedComponentStatus( + name = '', + health = 'Healthy', + reason = '', + message = '', ) + ] + ) + else: + return UnifiedGetDeploymentStatusResponse( + id = 56, + type = 'inference', + status = 'active', + endpoint_url = '', + applied = 'progressing', + message = '', + components = [ + platform_api_python_client.models.unified_component_status.UnifiedComponentStatus( + name = '', + health = 'Healthy', + reason = '', + message = '', ) + ], + ) + """ + + def testUnifiedGetDeploymentStatusResponse(self): + """Test UnifiedGetDeploymentStatusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unified_update_deployment_status_request.py b/test/test_unified_update_deployment_status_request.py new file mode 100644 index 0000000..e907c3c --- /dev/null +++ b/test/test_unified_update_deployment_status_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.unified_update_deployment_status_request import UnifiedUpdateDeploymentStatusRequest + +class TestUnifiedUpdateDeploymentStatusRequest(unittest.TestCase): + """UnifiedUpdateDeploymentStatusRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnifiedUpdateDeploymentStatusRequest: + """Test UnifiedUpdateDeploymentStatusRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnifiedUpdateDeploymentStatusRequest` + """ + model = UnifiedUpdateDeploymentStatusRequest() + if include_optional: + return UnifiedUpdateDeploymentStatusRequest( + status = 'active' + ) + else: + return UnifiedUpdateDeploymentStatusRequest( + status = 'active', + ) + """ + + def testUnifiedUpdateDeploymentStatusRequest(self): + """Test UnifiedUpdateDeploymentStatusRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_cluster_request.py b/test/test_update_cluster_request.py index 95ba7e7..26908de 100644 --- a/test/test_update_cluster_request.py +++ b/test/test_update_cluster_request.py @@ -45,6 +45,7 @@ def make_instance(self, include_optional) -> UpdateClusterRequest: gpu_operator = null, kai_scheduler = null, metrics_server = null, + dynamo_platform = null, final_stack = { }, ) ) else: @@ -59,6 +60,7 @@ def make_instance(self, include_optional) -> UpdateClusterRequest: gpu_operator = null, kai_scheduler = null, metrics_server = null, + dynamo_platform = null, final_stack = { }, ), ) """