From 4b9daa4c83706b3b71651780895b7df87687db38 Mon Sep 17 00:00:00 2001 From: platform CI Date: Mon, 31 Aug 2026 19:58:48 +0000 Subject: [PATCH] Update clients to latest platform release (4.27.0) --- README.md | 12 +- docs/CreateJobDeploymentRequest.md | 1 + docs/EXTERNALApi.md | 454 ++++- docs/GetJobDeploymentResponse.md | 1 + docs/ListOrganizationGpuQuotaResponse.md | 29 + docs/OrganizationGpuQuotaRequest.md | 29 + docs/OrganizationGpuQuotaResponse.md | 31 + platform_api_python_client/__init__.py | 5 +- .../api/external_api.py | 1488 ++++++++++++++++- platform_api_python_client/api_client.py | 2 +- platform_api_python_client/configuration.py | 2 +- platform_api_python_client/models/__init__.py | 3 + .../create_compute_deployment_request.py | 2 +- .../models/create_job_deployment_request.py | 14 +- .../models/get_job_deployment_response.py | 14 +- .../list_organization_gpu_quota_response.py | 95 ++ .../models/organization_gpu_quota_request.py | 88 + .../models/organization_gpu_quota_response.py | 91 + pyproject.toml | 2 +- setup.py | 2 +- test/test_create_job_deployment_request.py | 8 +- test/test_external_api.py | 39 +- test/test_get_job_deployment_response.py | 8 +- ...st_list_organization_gpu_quota_response.py | 62 + test/test_organization_gpu_quota_request.py | 52 + test/test_organization_gpu_quota_response.py | 56 + 26 files changed, 2459 insertions(+), 131 deletions(-) create mode 100644 docs/ListOrganizationGpuQuotaResponse.md create mode 100644 docs/OrganizationGpuQuotaRequest.md create mode 100644 docs/OrganizationGpuQuotaResponse.md create mode 100644 platform_api_python_client/models/list_organization_gpu_quota_response.py create mode 100644 platform_api_python_client/models/organization_gpu_quota_request.py create mode 100644 platform_api_python_client/models/organization_gpu_quota_response.py create mode 100644 test/test_list_organization_gpu_quota_response.py create mode 100644 test/test_organization_gpu_quota_request.py create mode 100644 test/test_organization_gpu_quota_response.py diff --git a/README.md b/README.md index abe1838..5c824e4 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.26.1 +- Package version: 4.27.0 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -108,6 +108,7 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**create_volume_endpoint_volumes_post**](docs/EXTERNALApi.md#create_volume_endpoint_volumes_post) | **POST** /volumes | Create Volume Endpoint *EXTERNALApi* | [**delete_cluster_clusters_cluster_id_delete**](docs/EXTERNALApi.md#delete_cluster_clusters_cluster_id_delete) | **DELETE** /clusters/{cluster_id} | Delete Cluster *EXTERNALApi* | [**delete_hardware_instance_hardware_instances_hardware_instance_id_delete**](docs/EXTERNALApi.md#delete_hardware_instance_hardware_instances_hardware_instance_id_delete) | **DELETE** /hardware-instances/{hardware_instance_id} | Delete Hardware Instance +*EXTERNALApi* | [**delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete**](docs/EXTERNALApi.md#delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete) | **DELETE** /clusters/{cluster_id}/organizations/{organization_id}/gpu-quota | Delete Org Gpu Quota On Cluster *EXTERNALApi* | [**delete_service_account_service_accounts_workos_id_delete**](docs/EXTERNALApi.md#delete_service_account_service_accounts_workos_id_delete) | **DELETE** /service-accounts/{workos_id} | Delete Service Account *EXTERNALApi* | [**delete_user_vault_item_by_id_endpoint_user_vault_secret_id_delete**](docs/EXTERNALApi.md#delete_user_vault_item_by_id_endpoint_user_vault_secret_id_delete) | **DELETE** /user_vault/{secret_id} | Delete User Vault Item By Id Endpoint *EXTERNALApi* | [**delete_user_vault_item_endpoint_user_vault_delete**](docs/EXTERNALApi.md#delete_user_vault_item_endpoint_user_vault_delete) | **DELETE** /user_vault | Delete User Vault Item Endpoint @@ -121,6 +122,7 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**get_cserve_recipe_deployments_cserve_recipes_get**](docs/EXTERNALApi.md#get_cserve_recipe_deployments_cserve_recipes_get) | **GET** /deployments/cserve/recipes | Get Cserve Recipe *EXTERNALApi* | [**get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get**](docs/EXTERNALApi.md#get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get) | **GET** /deployments/cserve_v2/{deployment_id} | Get Cserve V2 Deployment *EXTERNALApi* | [**get_cserve_v3_deployment_deployments_cserve_v3_deployment_id_get**](docs/EXTERNALApi.md#get_cserve_v3_deployment_deployments_cserve_v3_deployment_id_get) | **GET** /deployments/cserve_v3/{deployment_id} | Get Cserve V3 Deployment +*EXTERNALApi* | [**get_current_org_gpu_quota_organizations_gpu_quota_get**](docs/EXTERNALApi.md#get_current_org_gpu_quota_organizations_gpu_quota_get) | **GET** /organizations/gpu-quota | Get Current Org Gpu Quota *EXTERNALApi* | [**get_deployment_logs_deployments_logs_deployment_id_get**](docs/EXTERNALApi.md#get_deployment_logs_deployments_logs_deployment_id_get) | **GET** /deployments/logs/{deployment_id} | Get Deployment Logs *EXTERNALApi* | [**get_deployment_logs_v3_deployments_logs_v3_deployment_id_revision_number_get**](docs/EXTERNALApi.md#get_deployment_logs_v3_deployments_logs_v3_deployment_id_revision_number_get) | **GET** /deployments/logs_v3/{deployment_id}/{revision_number} | Get Deployment Logs V3 *EXTERNALApi* | [**get_deployment_logs_v4_logs_deployment_id_revision_number_get**](docs/EXTERNALApi.md#get_deployment_logs_v4_logs_deployment_id_revision_number_get) | **GET** /logs/{deployment_id}/{revision_number} | Get Deployment Logs V4 @@ -132,10 +134,11 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**get_deployments_deployments_get**](docs/EXTERNALApi.md#get_deployments_deployments_get) | **GET** /deployments | Get Deployments *EXTERNALApi* | [**get_dynamo_deployment_deployments_dynamo_deployment_id_get**](docs/EXTERNALApi.md#get_dynamo_deployment_deployments_dynamo_deployment_id_get) | **GET** /deployments/dynamo/{deployment_id} | Get Dynamo Deployment *EXTERNALApi* | [**get_hardware_instances_hardware_instances_get**](docs/EXTERNALApi.md#get_hardware_instances_hardware_instances_get) | **GET** /hardware-instances | Get Hardware Instances -*EXTERNALApi* | [**get_hardware_presets_hardware_presets_get**](docs/EXTERNALApi.md#get_hardware_presets_hardware_presets_get) | **GET** /hardware-presets | Get Hardware Presets +*EXTERNALApi* | [**get_hardware_presets_hardware_instances_presets_get**](docs/EXTERNALApi.md#get_hardware_presets_hardware_instances_presets_get) | **GET** /hardware-instances/presets | Get Hardware Presets *EXTERNALApi* | [**get_inference_deployment_deployments_inference_deployment_id_get**](docs/EXTERNALApi.md#get_inference_deployment_deployments_inference_deployment_id_get) | **GET** /deployments/inference/{deployment_id} | Get Inference Deployment *EXTERNALApi* | [**get_inference_v3_deployment_deployments_inference_v3_deployment_id_get**](docs/EXTERNALApi.md#get_inference_v3_deployment_deployments_inference_v3_deployment_id_get) | **GET** /deployments/inference_v3/{deployment_id} | Get Inference V3 Deployment *EXTERNALApi* | [**get_job_deployment_deployments_job_deployment_id_get**](docs/EXTERNALApi.md#get_job_deployment_deployments_job_deployment_id_get) | **GET** /deployments/job/{deployment_id} | Get Job Deployment +*EXTERNALApi* | [**get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get**](docs/EXTERNALApi.md#get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get) | **GET** /clusters/{cluster_id}/organizations/{organization_id}/gpu-quota | Get Org Gpu Quota On Cluster *EXTERNALApi* | [**get_prebuilt_images_prebuilt_images_get**](docs/EXTERNALApi.md#get_prebuilt_images_prebuilt_images_get) | **GET** /prebuilt-images | Get Prebuilt Images *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 @@ -144,7 +147,9 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**get_volume_status_endpoint_volumes_status_volume_id_get**](docs/EXTERNALApi.md#get_volume_status_endpoint_volumes_status_volume_id_get) | **GET** /volumes/status/{volume_id} | Get Volume Status Endpoint *EXTERNALApi* | [**invite_user_organizations_invite_post**](docs/EXTERNALApi.md#invite_user_organizations_invite_post) | **POST** /organizations/invite | Invite User *EXTERNALApi* | [**list_cluster_capacity_capacity_get**](docs/EXTERNALApi.md#list_cluster_capacity_capacity_get) | **GET** /capacity | List Cluster Capacity +*EXTERNALApi* | [**list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get**](docs/EXTERNALApi.md#list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get) | **GET** /clusters/{cluster_id}/gpu-quota/organizations | List Cluster Org Gpu Quotas *EXTERNALApi* | [**list_service_accounts_service_accounts_get**](docs/EXTERNALApi.md#list_service_accounts_service_accounts_get) | **GET** /service-accounts | List Service Accounts +*EXTERNALApi* | [**put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put**](docs/EXTERNALApi.md#put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put) | **PUT** /clusters/{cluster_id}/organizations/{organization_id}/gpu-quota | Put Org Gpu Quota On Cluster *EXTERNALApi* | [**rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put**](docs/EXTERNALApi.md#rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put) | **PUT** /deployments/revisions/{deployment_id}/{revision_number} | Rollout Existing Revision *EXTERNALApi* | [**setup_stripe_customer_payments_setup_post**](docs/EXTERNALApi.md#setup_stripe_customer_payments_setup_post) | **POST** /payments/setup | Setup Stripe Customer *EXTERNALApi* | [**update_cluster_clusters_cluster_id_put**](docs/EXTERNALApi.md#update_cluster_clusters_cluster_id_put) | **PUT** /clusters/{cluster_id} | Update Cluster @@ -255,6 +260,7 @@ Class | Method | HTTP request | Description - [ListGetDeploymentResponse](docs/ListGetDeploymentResponse.md) - [ListHardwareInstanceResponse](docs/ListHardwareInstanceResponse.md) - [ListHardwarePresetResponse](docs/ListHardwarePresetResponse.md) + - [ListOrganizationGpuQuotaResponse](docs/ListOrganizationGpuQuotaResponse.md) - [ListPrebuiltImageResponse](docs/ListPrebuiltImageResponse.md) - [ListServiceAccountsResponse](docs/ListServiceAccountsResponse.md) - [ListUserVaultItemsResponse](docs/ListUserVaultItemsResponse.md) @@ -266,6 +272,8 @@ Class | Method | HTTP request | Description - [NetworkOperator](docs/NetworkOperator.md) - [ObjectStorageProvider](docs/ObjectStorageProvider.md) - [OpentelemetryCollector](docs/OpentelemetryCollector.md) + - [OrganizationGpuQuotaRequest](docs/OrganizationGpuQuotaRequest.md) + - [OrganizationGpuQuotaResponse](docs/OrganizationGpuQuotaResponse.md) - [PodDetails](docs/PodDetails.md) - [PodStatus](docs/PodStatus.md) - [PrebuiltImageResponse](docs/PrebuiltImageResponse.md) diff --git a/docs/CreateJobDeploymentRequest.md b/docs/CreateJobDeploymentRequest.md index 5439720..2ee08b3 100644 --- a/docs/CreateJobDeploymentRequest.md +++ b/docs/CreateJobDeploymentRequest.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **active_deadline_seconds** | **int** | | [optional] **enable_logging** | **bool** | | [optional] [default to True] **config_file** | [**ConfigFileMount**](ConfigFileMount.md) | | [optional] +**volume_mounts** | [**List[VolumeMount]**](VolumeMount.md) | | [optional] ## Example diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index 0c0f311..f167fd6 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description [**create_volume_endpoint_volumes_post**](EXTERNALApi.md#create_volume_endpoint_volumes_post) | **POST** /volumes | Create Volume Endpoint [**delete_cluster_clusters_cluster_id_delete**](EXTERNALApi.md#delete_cluster_clusters_cluster_id_delete) | **DELETE** /clusters/{cluster_id} | Delete Cluster [**delete_hardware_instance_hardware_instances_hardware_instance_id_delete**](EXTERNALApi.md#delete_hardware_instance_hardware_instances_hardware_instance_id_delete) | **DELETE** /hardware-instances/{hardware_instance_id} | Delete Hardware Instance +[**delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete**](EXTERNALApi.md#delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete) | **DELETE** /clusters/{cluster_id}/organizations/{organization_id}/gpu-quota | Delete Org Gpu Quota On Cluster [**delete_service_account_service_accounts_workos_id_delete**](EXTERNALApi.md#delete_service_account_service_accounts_workos_id_delete) | **DELETE** /service-accounts/{workos_id} | Delete Service Account [**delete_user_vault_item_by_id_endpoint_user_vault_secret_id_delete**](EXTERNALApi.md#delete_user_vault_item_by_id_endpoint_user_vault_secret_id_delete) | **DELETE** /user_vault/{secret_id} | Delete User Vault Item By Id Endpoint [**delete_user_vault_item_endpoint_user_vault_delete**](EXTERNALApi.md#delete_user_vault_item_endpoint_user_vault_delete) | **DELETE** /user_vault | Delete User Vault Item Endpoint @@ -31,6 +32,7 @@ Method | HTTP request | Description [**get_cserve_recipe_deployments_cserve_recipes_get**](EXTERNALApi.md#get_cserve_recipe_deployments_cserve_recipes_get) | **GET** /deployments/cserve/recipes | Get Cserve Recipe [**get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get**](EXTERNALApi.md#get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get) | **GET** /deployments/cserve_v2/{deployment_id} | Get Cserve V2 Deployment [**get_cserve_v3_deployment_deployments_cserve_v3_deployment_id_get**](EXTERNALApi.md#get_cserve_v3_deployment_deployments_cserve_v3_deployment_id_get) | **GET** /deployments/cserve_v3/{deployment_id} | Get Cserve V3 Deployment +[**get_current_org_gpu_quota_organizations_gpu_quota_get**](EXTERNALApi.md#get_current_org_gpu_quota_organizations_gpu_quota_get) | **GET** /organizations/gpu-quota | Get Current Org Gpu Quota [**get_deployment_logs_deployments_logs_deployment_id_get**](EXTERNALApi.md#get_deployment_logs_deployments_logs_deployment_id_get) | **GET** /deployments/logs/{deployment_id} | Get Deployment Logs [**get_deployment_logs_v3_deployments_logs_v3_deployment_id_revision_number_get**](EXTERNALApi.md#get_deployment_logs_v3_deployments_logs_v3_deployment_id_revision_number_get) | **GET** /deployments/logs_v3/{deployment_id}/{revision_number} | Get Deployment Logs V3 [**get_deployment_logs_v4_logs_deployment_id_revision_number_get**](EXTERNALApi.md#get_deployment_logs_v4_logs_deployment_id_revision_number_get) | **GET** /logs/{deployment_id}/{revision_number} | Get Deployment Logs V4 @@ -42,10 +44,11 @@ Method | HTTP request | Description [**get_deployments_deployments_get**](EXTERNALApi.md#get_deployments_deployments_get) | **GET** /deployments | Get Deployments [**get_dynamo_deployment_deployments_dynamo_deployment_id_get**](EXTERNALApi.md#get_dynamo_deployment_deployments_dynamo_deployment_id_get) | **GET** /deployments/dynamo/{deployment_id} | Get Dynamo Deployment [**get_hardware_instances_hardware_instances_get**](EXTERNALApi.md#get_hardware_instances_hardware_instances_get) | **GET** /hardware-instances | Get Hardware Instances -[**get_hardware_presets_hardware_presets_get**](EXTERNALApi.md#get_hardware_presets_hardware_presets_get) | **GET** /hardware-presets | Get Hardware Presets +[**get_hardware_presets_hardware_instances_presets_get**](EXTERNALApi.md#get_hardware_presets_hardware_instances_presets_get) | **GET** /hardware-instances/presets | Get Hardware Presets [**get_inference_deployment_deployments_inference_deployment_id_get**](EXTERNALApi.md#get_inference_deployment_deployments_inference_deployment_id_get) | **GET** /deployments/inference/{deployment_id} | Get Inference Deployment [**get_inference_v3_deployment_deployments_inference_v3_deployment_id_get**](EXTERNALApi.md#get_inference_v3_deployment_deployments_inference_v3_deployment_id_get) | **GET** /deployments/inference_v3/{deployment_id} | Get Inference V3 Deployment [**get_job_deployment_deployments_job_deployment_id_get**](EXTERNALApi.md#get_job_deployment_deployments_job_deployment_id_get) | **GET** /deployments/job/{deployment_id} | Get Job Deployment +[**get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get**](EXTERNALApi.md#get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get) | **GET** /clusters/{cluster_id}/organizations/{organization_id}/gpu-quota | Get Org Gpu Quota On Cluster [**get_prebuilt_images_prebuilt_images_get**](EXTERNALApi.md#get_prebuilt_images_prebuilt_images_get) | **GET** /prebuilt-images | Get Prebuilt Images [**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 @@ -54,7 +57,9 @@ Method | HTTP request | Description [**get_volume_status_endpoint_volumes_status_volume_id_get**](EXTERNALApi.md#get_volume_status_endpoint_volumes_status_volume_id_get) | **GET** /volumes/status/{volume_id} | Get Volume Status Endpoint [**invite_user_organizations_invite_post**](EXTERNALApi.md#invite_user_organizations_invite_post) | **POST** /organizations/invite | Invite User [**list_cluster_capacity_capacity_get**](EXTERNALApi.md#list_cluster_capacity_capacity_get) | **GET** /capacity | List Cluster Capacity +[**list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get**](EXTERNALApi.md#list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get) | **GET** /clusters/{cluster_id}/gpu-quota/organizations | List Cluster Org Gpu Quotas [**list_service_accounts_service_accounts_get**](EXTERNALApi.md#list_service_accounts_service_accounts_get) | **GET** /service-accounts | List Service Accounts +[**put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put**](EXTERNALApi.md#put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put) | **PUT** /clusters/{cluster_id}/organizations/{organization_id}/gpu-quota | Put Org Gpu Quota On Cluster [**rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put**](EXTERNALApi.md#rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put) | **PUT** /deployments/revisions/{deployment_id}/{revision_number} | Rollout Existing Revision [**setup_stripe_customer_payments_setup_post**](EXTERNALApi.md#setup_stripe_customer_payments_setup_post) | **POST** /payments/setup | Setup Stripe Customer [**update_cluster_clusters_cluster_id_put**](EXTERNALApi.md#update_cluster_clusters_cluster_id_put) | **PUT** /clusters/{cluster_id} | Update Cluster @@ -1127,6 +1132,87 @@ void (empty response body) [[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) +# **delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete** +> OrganizationGpuQuotaResponse delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete(cluster_id, organization_id) + +Delete Org Gpu Quota On Cluster + +Set persisted quota to unlimited (-1). Creates a row if none exists. Does not remove the row or the KAI Queue CR. + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse +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 | + organization_id = 56 # int | + + try: + # Delete Org Gpu Quota On Cluster + api_response = api_instance.delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete(cluster_id, organization_id) + print("The response of EXTERNALApi->delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **int**| | + **organization_id** | **int**| | + +### Return type + +[**OrganizationGpuQuotaResponse**](OrganizationGpuQuotaResponse.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) + # **delete_service_account_service_accounts_workos_id_delete** > delete_service_account_service_accounts_workos_id_delete(workos_id) @@ -1825,7 +1911,6 @@ Get Credits ### Example -* Bearer Authentication (HTTPBearer): ```python import platform_api_python_client @@ -1839,15 +1924,6 @@ 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: @@ -1875,7 +1951,7 @@ This endpoint does not need any parameter. ### Authorization -[HTTPBearer](../README.md#HTTPBearer) +No authorization required ### HTTP request headers @@ -2123,6 +2199,85 @@ 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_current_org_gpu_quota_organizations_gpu_quota_get** +> ListOrganizationGpuQuotaResponse get_current_org_gpu_quota_organizations_gpu_quota_get(cluster_id=cluster_id) + +Get Current Org Gpu Quota + +Return persisted GPU quotas for the caller's organization. Usage fields come later. ``cluster_id`` filters to that cluster when it is visible. Unknown or invisible cluster IDs return an empty list rather than 404 so this member endpoint does not leak whether a cluster exists. + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse +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 | (optional) + + try: + # Get Current Org Gpu Quota + api_response = api_instance.get_current_org_gpu_quota_organizations_gpu_quota_get(cluster_id=cluster_id) + print("The response of EXTERNALApi->get_current_org_gpu_quota_organizations_gpu_quota_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_current_org_gpu_quota_organizations_gpu_quota_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **int**| | [optional] + +### Return type + +[**ListOrganizationGpuQuotaResponse**](ListOrganizationGpuQuotaResponse.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_deployment_logs_deployments_logs_deployment_id_get** > GetDeploymentLogResponse get_deployment_logs_deployments_logs_deployment_id_get(deployment_id, start_time, end_time, next_page_token=next_page_token, start_from_head=start_from_head, line_count=line_count) @@ -3021,8 +3176,8 @@ 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_hardware_presets_hardware_presets_get** -> ListHardwarePresetResponse get_hardware_presets_hardware_presets_get() +# **get_hardware_presets_hardware_instances_presets_get** +> ListHardwarePresetResponse get_hardware_presets_hardware_instances_presets_get() Get Hardware Presets @@ -3059,11 +3214,11 @@ with platform_api_python_client.ApiClient(configuration) as api_client: try: # Get Hardware Presets - api_response = api_instance.get_hardware_presets_hardware_presets_get() - print("The response of EXTERNALApi->get_hardware_presets_hardware_presets_get:\n") + api_response = api_instance.get_hardware_presets_hardware_instances_presets_get() + print("The response of EXTERNALApi->get_hardware_presets_hardware_instances_presets_get:\n") pprint(api_response) except Exception as e: - print("Exception when calling EXTERNALApi->get_hardware_presets_hardware_presets_get: %s\n" % e) + print("Exception when calling EXTERNALApi->get_hardware_presets_hardware_instances_presets_get: %s\n" % e) ``` @@ -3324,6 +3479,85 @@ 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_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get** +> OrganizationGpuQuotaResponse get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get(cluster_id, organization_id) + +Get Org Gpu Quota On Cluster + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse +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 | + organization_id = 56 # int | + + try: + # Get Org Gpu Quota On Cluster + api_response = api_instance.get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get(cluster_id, organization_id) + print("The response of EXTERNALApi->get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **int**| | + **organization_id** | **int**| | + +### Return type + +[**OrganizationGpuQuotaResponse**](OrganizationGpuQuotaResponse.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_prebuilt_images_prebuilt_images_get** > ListPrebuiltImageResponse get_prebuilt_images_prebuilt_images_get(type=type) @@ -3403,13 +3637,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) # **get_usage_daily_bills_get** -> ListDailyBillResponse get_usage_daily_bills_get(start_date, end_date) +> ListDailyBillResponse get_usage_daily_bills_get() Get Usage ### Example -* Bearer Authentication (HTTPBearer): ```python import platform_api_python_client @@ -3423,26 +3656,15 @@ 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) - start_date = '2013-10-20' # date | - end_date = '2013-10-20' # date | try: # Get Usage - api_response = api_instance.get_usage_daily_bills_get(start_date, end_date) + api_response = api_instance.get_usage_daily_bills_get() print("The response of EXTERNALApi->get_usage_daily_bills_get:\n") pprint(api_response) except Exception as e: @@ -3453,11 +3675,7 @@ with platform_api_python_client.ApiClient(configuration) as api_client: ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **start_date** | **date**| | - **end_date** | **date**| | +This endpoint does not need any parameter. ### Return type @@ -3465,7 +3683,7 @@ Name | Type | Description | Notes ### Authorization -[HTTPBearer](../README.md#HTTPBearer) +No authorization required ### HTTP request headers @@ -3477,7 +3695,6 @@ Name | Type | Description | Notes | 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) @@ -3960,6 +4177,83 @@ 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) +# **list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get** +> ListOrganizationGpuQuotaResponse list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get(cluster_id) + +List Cluster Org Gpu Quotas + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse +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: + # List Cluster Org Gpu Quotas + api_response = api_instance.list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get(cluster_id) + print("The response of EXTERNALApi->list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **int**| | + +### Return type + +[**ListOrganizationGpuQuotaResponse**](ListOrganizationGpuQuotaResponse.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) + # **list_service_accounts_service_accounts_get** > ListServiceAccountsResponse list_service_accounts_service_accounts_get() @@ -4032,6 +4326,90 @@ 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) +# **put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put** +> OrganizationGpuQuotaResponse put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put(cluster_id, organization_id, organization_gpu_quota_request) + +Put Org Gpu Quota On Cluster + +Persist desired organization GPU quota on this cluster. Does not apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited. Rows are never removed. + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.organization_gpu_quota_request import OrganizationGpuQuotaRequest +from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse +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 | + organization_id = 56 # int | + organization_gpu_quota_request = platform_api_python_client.OrganizationGpuQuotaRequest() # OrganizationGpuQuotaRequest | + + try: + # Put Org Gpu Quota On Cluster + api_response = api_instance.put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put(cluster_id, organization_id, organization_gpu_quota_request) + print("The response of EXTERNALApi->put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cluster_id** | **int**| | + **organization_id** | **int**| | + **organization_gpu_quota_request** | [**OrganizationGpuQuotaRequest**](OrganizationGpuQuotaRequest.md)| | + +### Return type + +[**OrganizationGpuQuotaResponse**](OrganizationGpuQuotaResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # **rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put** > UpdateDeploymentResponse rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put(deployment_id, revision_number, rollout_strategy_params=rollout_strategy_params) diff --git a/docs/GetJobDeploymentResponse.md b/docs/GetJobDeploymentResponse.md index a06831c..02cab7f 100644 --- a/docs/GetJobDeploymentResponse.md +++ b/docs/GetJobDeploymentResponse.md @@ -28,6 +28,7 @@ Name | Type | Description | Notes **image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional] **enable_logging** | **bool** | | [optional] [default to True] **config_file** | [**ConfigFileMount**](ConfigFileMount.md) | | [optional] +**volume_mounts** | [**List[VolumeMount]**](VolumeMount.md) | | [optional] ## Example diff --git a/docs/ListOrganizationGpuQuotaResponse.md b/docs/ListOrganizationGpuQuotaResponse.md new file mode 100644 index 0000000..c040526 --- /dev/null +++ b/docs/ListOrganizationGpuQuotaResponse.md @@ -0,0 +1,29 @@ +# ListOrganizationGpuQuotaResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[OrganizationGpuQuotaResponse]**](OrganizationGpuQuotaResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizationGpuQuotaResponse from a JSON string +list_organization_gpu_quota_response_instance = ListOrganizationGpuQuotaResponse.from_json(json) +# print the JSON string representation of the object +print(ListOrganizationGpuQuotaResponse.to_json()) + +# convert the object into a dict +list_organization_gpu_quota_response_dict = list_organization_gpu_quota_response_instance.to_dict() +# create an instance of ListOrganizationGpuQuotaResponse from a dict +list_organization_gpu_quota_response_from_dict = ListOrganizationGpuQuotaResponse.from_dict(list_organization_gpu_quota_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/OrganizationGpuQuotaRequest.md b/docs/OrganizationGpuQuotaRequest.md new file mode 100644 index 0000000..4c8db2e --- /dev/null +++ b/docs/OrganizationGpuQuotaRequest.md @@ -0,0 +1,29 @@ +# OrganizationGpuQuotaRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gpu_quota** | **int** | | + +## Example + +```python +from platform_api_python_client.models.organization_gpu_quota_request import OrganizationGpuQuotaRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of OrganizationGpuQuotaRequest from a JSON string +organization_gpu_quota_request_instance = OrganizationGpuQuotaRequest.from_json(json) +# print the JSON string representation of the object +print(OrganizationGpuQuotaRequest.to_json()) + +# convert the object into a dict +organization_gpu_quota_request_dict = organization_gpu_quota_request_instance.to_dict() +# create an instance of OrganizationGpuQuotaRequest from a dict +organization_gpu_quota_request_from_dict = OrganizationGpuQuotaRequest.from_dict(organization_gpu_quota_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/docs/OrganizationGpuQuotaResponse.md b/docs/OrganizationGpuQuotaResponse.md new file mode 100644 index 0000000..8173d89 --- /dev/null +++ b/docs/OrganizationGpuQuotaResponse.md @@ -0,0 +1,31 @@ +# OrganizationGpuQuotaResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **int** | | +**cluster_id** | **int** | | +**gpu_quota** | **int** | | + +## Example + +```python +from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of OrganizationGpuQuotaResponse from a JSON string +organization_gpu_quota_response_instance = OrganizationGpuQuotaResponse.from_json(json) +# print the JSON string representation of the object +print(OrganizationGpuQuotaResponse.to_json()) + +# convert the object into a dict +organization_gpu_quota_response_dict = organization_gpu_quota_response_instance.to_dict() +# create an instance of OrganizationGpuQuotaResponse from a dict +organization_gpu_quota_response_from_dict = OrganizationGpuQuotaResponse.from_dict(organization_gpu_quota_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/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index cf964a8..9f8aa3b 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.26.1" +__version__ = "4.27.0" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -123,6 +123,7 @@ from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse from platform_api_python_client.models.list_hardware_preset_response import ListHardwarePresetResponse +from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse @@ -134,6 +135,8 @@ from platform_api_python_client.models.network_operator import NetworkOperator from platform_api_python_client.models.object_storage_provider import ObjectStorageProvider from platform_api_python_client.models.opentelemetry_collector import OpentelemetryCollector +from platform_api_python_client.models.organization_gpu_quota_request import OrganizationGpuQuotaRequest +from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse from platform_api_python_client.models.pod_details import PodDetails from platform_api_python_client.models.pod_status import PodStatus from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index 3bf3981..97b40a1 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -16,7 +16,6 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from datetime import date from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, Optional from typing_extensions import Annotated @@ -71,11 +70,14 @@ from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse from platform_api_python_client.models.list_hardware_preset_response import ListHardwarePresetResponse +from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse from platform_api_python_client.models.list_volumes_response import ListVolumesResponse from platform_api_python_client.models.metric import Metric +from platform_api_python_client.models.organization_gpu_quota_request import OrganizationGpuQuotaRequest +from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse from platform_api_python_client.models.rollout_strategy_params import RolloutStrategyParams from platform_api_python_client.models.service_account_response import ServiceAccountResponse from platform_api_python_client.models.update_cluster_metadata_request import UpdateClusterMetadataRequest @@ -3860,6 +3862,285 @@ def _delete_hardware_instance_hardware_instances_hardware_instance_id_delete_ser + @validate_call + def delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete( + self, + cluster_id: StrictInt, + organization_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, + ) -> OrganizationGpuQuotaResponse: + """Delete Org Gpu Quota On Cluster + + Set persisted quota to unlimited (-1). Creates a row if none exists. Does not remove the row or the KAI Queue CR. + + :param cluster_id: (required) + :type cluster_id: int + :param organization_id: (required) + :type organization_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._delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_serialize( + cluster_id=cluster_id, + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationGpuQuotaResponse", + '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 delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_with_http_info( + self, + cluster_id: StrictInt, + organization_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[OrganizationGpuQuotaResponse]: + """Delete Org Gpu Quota On Cluster + + Set persisted quota to unlimited (-1). Creates a row if none exists. Does not remove the row or the KAI Queue CR. + + :param cluster_id: (required) + :type cluster_id: int + :param organization_id: (required) + :type organization_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._delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_serialize( + cluster_id=cluster_id, + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationGpuQuotaResponse", + '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 delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_without_preload_content( + self, + cluster_id: StrictInt, + organization_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: + """Delete Org Gpu Quota On Cluster + + Set persisted quota to unlimited (-1). Creates a row if none exists. Does not remove the row or the KAI Queue CR. + + :param cluster_id: (required) + :type cluster_id: int + :param organization_id: (required) + :type organization_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._delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_serialize( + cluster_id=cluster_id, + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationGpuQuotaResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete_serialize( + self, + cluster_id, + organization_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 + if organization_id is not None: + _path_params['organization_id'] = organization_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='DELETE', + resource_path='/clusters/{cluster_id}/organizations/{organization_id}/gpu-quota', + 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 delete_service_account_service_accounts_workos_id_delete( self, @@ -6448,7 +6729,6 @@ def _get_credits_credits_get_serialize( # authentication setting _auth_settings: List[str] = [ - 'HTTPBearer' ] return self.api_client.param_serialize( @@ -7272,14 +7552,9 @@ def _get_cserve_v3_deployment_deployments_cserve_v3_deployment_id_get_serialize( @validate_call - def get_deployment_logs_deployments_logs_deployment_id_get( + def get_current_org_gpu_quota_organizations_gpu_quota_get( self, - deployment_id: StrictInt, - start_time: StrictInt, - end_time: StrictInt, - next_page_token: Optional[StrictStr] = None, - start_from_head: Optional[StrictBool] = None, - line_count: Optional[StrictInt] = None, + cluster_id: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7292,8 +7567,279 @@ def get_deployment_logs_deployments_logs_deployment_id_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetDeploymentLogResponse: - """Get Deployment Logs + ) -> ListOrganizationGpuQuotaResponse: + """Get Current Org Gpu Quota + + Return persisted GPU quotas for the caller's organization. Usage fields come later. ``cluster_id`` filters to that cluster when it is visible. Unknown or invisible cluster IDs return an empty list rather than 404 so this member endpoint does not leak whether a cluster exists. + + :param cluster_id: + :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_current_org_gpu_quota_organizations_gpu_quota_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': "ListOrganizationGpuQuotaResponse", + '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_current_org_gpu_quota_organizations_gpu_quota_get_with_http_info( + self, + cluster_id: Optional[StrictInt] = None, + _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[ListOrganizationGpuQuotaResponse]: + """Get Current Org Gpu Quota + + Return persisted GPU quotas for the caller's organization. Usage fields come later. ``cluster_id`` filters to that cluster when it is visible. Unknown or invisible cluster IDs return an empty list rather than 404 so this member endpoint does not leak whether a cluster exists. + + :param cluster_id: + :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_current_org_gpu_quota_organizations_gpu_quota_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': "ListOrganizationGpuQuotaResponse", + '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_current_org_gpu_quota_organizations_gpu_quota_get_without_preload_content( + self, + cluster_id: Optional[StrictInt] = None, + _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 Current Org Gpu Quota + + Return persisted GPU quotas for the caller's organization. Usage fields come later. ``cluster_id`` filters to that cluster when it is visible. Unknown or invisible cluster IDs return an empty list rather than 404 so this member endpoint does not leak whether a cluster exists. + + :param cluster_id: + :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_current_org_gpu_quota_organizations_gpu_quota_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': "ListOrganizationGpuQuotaResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_current_org_gpu_quota_organizations_gpu_quota_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 + # process the query parameters + if cluster_id is not None: + + _query_params.append(('cluster_id', cluster_id)) + + # 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='/organizations/gpu-quota', + 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_deployment_logs_deployments_logs_deployment_id_get( + self, + deployment_id: StrictInt, + start_time: StrictInt, + end_time: StrictInt, + next_page_token: Optional[StrictStr] = None, + start_from_head: Optional[StrictBool] = None, + line_count: Optional[StrictInt] = None, + _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, + ) -> GetDeploymentLogResponse: + """Get Deployment Logs :param deployment_id: (required) @@ -10508,7 +11054,7 @@ def _get_hardware_instances_hardware_instances_get_serialize( @validate_call - def get_hardware_presets_hardware_presets_get( + def get_hardware_presets_hardware_instances_presets_get( self, _request_timeout: Union[ None, @@ -10548,7 +11094,7 @@ def get_hardware_presets_hardware_presets_get( :return: Returns the result object. """ # noqa: E501 - _param = self._get_hardware_presets_hardware_presets_get_serialize( + _param = self._get_hardware_presets_hardware_instances_presets_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10570,7 +11116,7 @@ def get_hardware_presets_hardware_presets_get( @validate_call - def get_hardware_presets_hardware_presets_get_with_http_info( + def get_hardware_presets_hardware_instances_presets_get_with_http_info( self, _request_timeout: Union[ None, @@ -10610,7 +11156,7 @@ def get_hardware_presets_hardware_presets_get_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_hardware_presets_hardware_presets_get_serialize( + _param = self._get_hardware_presets_hardware_instances_presets_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10632,7 +11178,7 @@ def get_hardware_presets_hardware_presets_get_with_http_info( @validate_call - def get_hardware_presets_hardware_presets_get_without_preload_content( + def get_hardware_presets_hardware_instances_presets_get_without_preload_content( self, _request_timeout: Union[ None, @@ -10672,7 +11218,7 @@ def get_hardware_presets_hardware_presets_get_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_hardware_presets_hardware_presets_get_serialize( + _param = self._get_hardware_presets_hardware_instances_presets_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10689,7 +11235,7 @@ def get_hardware_presets_hardware_presets_get_without_preload_content( return response_data.response - def _get_hardware_presets_hardware_presets_get_serialize( + def _get_hardware_presets_hardware_instances_presets_get_serialize( self, _request_auth, _content_type, @@ -10734,7 +11280,7 @@ def _get_hardware_presets_hardware_presets_get_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/hardware-presets', + resource_path='/hardware-instances/presets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11534,7 +12080,283 @@ def _get_job_deployment_deployments_job_deployment_id_get_serialize( @validate_call - def get_prebuilt_images_prebuilt_images_get( + def get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get( + self, + cluster_id: StrictInt, + organization_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, + ) -> OrganizationGpuQuotaResponse: + """Get Org Gpu Quota On Cluster + + + :param cluster_id: (required) + :type cluster_id: int + :param organization_id: (required) + :type organization_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_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get_serialize( + cluster_id=cluster_id, + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationGpuQuotaResponse", + '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_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get_with_http_info( + self, + cluster_id: StrictInt, + organization_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[OrganizationGpuQuotaResponse]: + """Get Org Gpu Quota On Cluster + + + :param cluster_id: (required) + :type cluster_id: int + :param organization_id: (required) + :type organization_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_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get_serialize( + cluster_id=cluster_id, + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationGpuQuotaResponse", + '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_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get_without_preload_content( + self, + cluster_id: StrictInt, + organization_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 Org Gpu Quota On Cluster + + + :param cluster_id: (required) + :type cluster_id: int + :param organization_id: (required) + :type organization_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_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get_serialize( + cluster_id=cluster_id, + organization_id=organization_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationGpuQuotaResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get_serialize( + self, + cluster_id, + organization_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 + if organization_id is not None: + _path_params['organization_id'] = organization_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}/organizations/{organization_id}/gpu-quota', + 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_prebuilt_images_prebuilt_images_get( self, type: Optional[DeploymentType] = None, _request_timeout: Union[ @@ -11799,8 +12621,6 @@ def _get_prebuilt_images_prebuilt_images_get_serialize( @validate_call def get_usage_daily_bills_get( self, - start_date: date, - end_date: date, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11817,10 +12637,6 @@ def get_usage_daily_bills_get( """(Deprecated) Get Usage - :param start_date: (required) - :type start_date: date - :param end_date: (required) - :type end_date: date :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 @@ -11845,8 +12661,6 @@ def get_usage_daily_bills_get( warnings.warn("GET /daily_bills is deprecated.", DeprecationWarning) _param = self._get_usage_daily_bills_get_serialize( - start_date=start_date, - end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11855,7 +12669,6 @@ def get_usage_daily_bills_get( _response_types_map: Dict[str, Optional[str]] = { '200': "ListDailyBillResponse", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -11871,8 +12684,6 @@ def get_usage_daily_bills_get( @validate_call def get_usage_daily_bills_get_with_http_info( self, - start_date: date, - end_date: date, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11889,10 +12700,6 @@ def get_usage_daily_bills_get_with_http_info( """(Deprecated) Get Usage - :param start_date: (required) - :type start_date: date - :param end_date: (required) - :type end_date: date :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 @@ -11917,8 +12724,6 @@ def get_usage_daily_bills_get_with_http_info( warnings.warn("GET /daily_bills is deprecated.", DeprecationWarning) _param = self._get_usage_daily_bills_get_serialize( - start_date=start_date, - end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11927,7 +12732,6 @@ def get_usage_daily_bills_get_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ListDailyBillResponse", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -11943,8 +12747,6 @@ def get_usage_daily_bills_get_with_http_info( @validate_call def get_usage_daily_bills_get_without_preload_content( self, - start_date: date, - end_date: date, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11961,10 +12763,6 @@ def get_usage_daily_bills_get_without_preload_content( """(Deprecated) Get Usage - :param start_date: (required) - :type start_date: date - :param end_date: (required) - :type end_date: date :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 @@ -11989,8 +12787,6 @@ def get_usage_daily_bills_get_without_preload_content( warnings.warn("GET /daily_bills is deprecated.", DeprecationWarning) _param = self._get_usage_daily_bills_get_serialize( - start_date=start_date, - end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11999,7 +12795,6 @@ def get_usage_daily_bills_get_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ListDailyBillResponse", - '422': "HTTPValidationError", } response_data = self.api_client.call_api( *_param, @@ -12010,8 +12805,6 @@ def get_usage_daily_bills_get_without_preload_content( def _get_usage_daily_bills_get_serialize( self, - start_date, - end_date, _request_auth, _content_type, _headers, @@ -12034,32 +12827,6 @@ def _get_usage_daily_bills_get_serialize( # process the path parameters # process the query parameters - if start_date is not None: - if isinstance(start_date, date): - _query_params.append( - ( - 'start_date', - start_date.strftime( - self.api_client.configuration.date_format - ) - ) - ) - else: - _query_params.append(('start_date', start_date)) - - if end_date is not None: - if isinstance(end_date, date): - _query_params.append( - ( - 'end_date', - end_date.strftime( - self.api_client.configuration.date_format - ) - ) - ) - else: - _query_params.append(('end_date', end_date)) - # process the header parameters # process the form parameters # process the body parameter @@ -12076,7 +12843,6 @@ def _get_usage_daily_bills_get_serialize( # authentication setting _auth_settings: List[str] = [ - 'HTTPBearer' ] return self.api_client.param_serialize( @@ -13759,7 +14525,268 @@ def _list_cluster_capacity_capacity_get_serialize( @validate_call - def list_service_accounts_service_accounts_get( + def list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_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, + ) -> ListOrganizationGpuQuotaResponse: + """List Cluster Org Gpu Quotas + + + :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._list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_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': "ListOrganizationGpuQuotaResponse", + '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 list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_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[ListOrganizationGpuQuotaResponse]: + """List Cluster Org Gpu Quotas + + + :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._list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_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': "ListOrganizationGpuQuotaResponse", + '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 list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_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: + """List Cluster Org Gpu Quotas + + + :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._list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_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': "ListOrganizationGpuQuotaResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_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}/gpu-quota/organizations', + 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 list_service_accounts_service_accounts_get( self, _request_timeout: Union[ None, @@ -14001,6 +15028,313 @@ def _list_service_accounts_service_accounts_get_serialize( + @validate_call + def put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put( + self, + cluster_id: StrictInt, + organization_id: StrictInt, + organization_gpu_quota_request: OrganizationGpuQuotaRequest, + _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, + ) -> OrganizationGpuQuotaResponse: + """Put Org Gpu Quota On Cluster + + Persist desired organization GPU quota on this cluster. Does not apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited. Rows are never removed. + + :param cluster_id: (required) + :type cluster_id: int + :param organization_id: (required) + :type organization_id: int + :param organization_gpu_quota_request: (required) + :type organization_gpu_quota_request: OrganizationGpuQuotaRequest + :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._put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put_serialize( + cluster_id=cluster_id, + organization_id=organization_id, + organization_gpu_quota_request=organization_gpu_quota_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationGpuQuotaResponse", + '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 put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put_with_http_info( + self, + cluster_id: StrictInt, + organization_id: StrictInt, + organization_gpu_quota_request: OrganizationGpuQuotaRequest, + _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[OrganizationGpuQuotaResponse]: + """Put Org Gpu Quota On Cluster + + Persist desired organization GPU quota on this cluster. Does not apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited. Rows are never removed. + + :param cluster_id: (required) + :type cluster_id: int + :param organization_id: (required) + :type organization_id: int + :param organization_gpu_quota_request: (required) + :type organization_gpu_quota_request: OrganizationGpuQuotaRequest + :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._put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put_serialize( + cluster_id=cluster_id, + organization_id=organization_id, + organization_gpu_quota_request=organization_gpu_quota_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationGpuQuotaResponse", + '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 put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put_without_preload_content( + self, + cluster_id: StrictInt, + organization_id: StrictInt, + organization_gpu_quota_request: OrganizationGpuQuotaRequest, + _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: + """Put Org Gpu Quota On Cluster + + Persist desired organization GPU quota on this cluster. Does not apply KAI Queue CRs. ``gpu_quota`` of -1 is unlimited. Rows are never removed. + + :param cluster_id: (required) + :type cluster_id: int + :param organization_id: (required) + :type organization_id: int + :param organization_gpu_quota_request: (required) + :type organization_gpu_quota_request: OrganizationGpuQuotaRequest + :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._put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put_serialize( + cluster_id=cluster_id, + organization_id=organization_id, + organization_gpu_quota_request=organization_gpu_quota_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OrganizationGpuQuotaResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put_serialize( + self, + cluster_id, + organization_id, + organization_gpu_quota_request, + _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 + if organization_id is not None: + _path_params['organization_id'] = organization_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if organization_gpu_quota_request is not None: + _body_params = organization_gpu_quota_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/clusters/{cluster_id}/organizations/{organization_id}/gpu-quota', + 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 rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put( self, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 68804be..3eb8d30 100644 --- a/platform_api_python_client/api_client.py +++ b/platform_api_python_client/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/4.26.1/python' + self.user_agent = 'OpenAPI-Generator/4.27.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 7a0ea28..ab660f9 100644 --- a/platform_api_python_client/configuration.py +++ b/platform_api_python_client/configuration.py @@ -392,7 +392,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.1.0\n"\ - "SDK Package Version: 4.26.1".\ + "SDK Package Version: 4.27.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/platform_api_python_client/models/__init__.py b/platform_api_python_client/models/__init__.py index a2b7dee..017a122 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -106,6 +106,7 @@ from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse from platform_api_python_client.models.list_hardware_preset_response import ListHardwarePresetResponse +from platform_api_python_client.models.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse @@ -117,6 +118,8 @@ from platform_api_python_client.models.network_operator import NetworkOperator from platform_api_python_client.models.object_storage_provider import ObjectStorageProvider from platform_api_python_client.models.opentelemetry_collector import OpentelemetryCollector +from platform_api_python_client.models.organization_gpu_quota_request import OrganizationGpuQuotaRequest +from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse from platform_api_python_client.models.pod_details import PodDetails from platform_api_python_client.models.pod_status import PodStatus from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse diff --git a/platform_api_python_client/models/create_compute_deployment_request.py b/platform_api_python_client/models/create_compute_deployment_request.py index 9499943..e39e508 100644 --- a/platform_api_python_client/models/create_compute_deployment_request.py +++ b/platform_api_python_client/models/create_compute_deployment_request.py @@ -38,7 +38,7 @@ class CreateComputeDeploymentRequest(BaseModel): image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None ssh_public_key: StrictStr enable_logging: Optional[StrictBool] = False - volume_mounts: Optional[List[VolumeMount]] = None + volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "ssh_public_key", "enable_logging", "volume_mounts"] @field_validator('name') diff --git a/platform_api_python_client/models/create_job_deployment_request.py b/platform_api_python_client/models/create_job_deployment_request.py index c906188..07deeca 100644 --- a/platform_api_python_client/models/create_job_deployment_request.py +++ b/platform_api_python_client/models/create_job_deployment_request.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from platform_api_python_client.models.config_file_mount import ConfigFileMount from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials +from platform_api_python_client.models.volume_mount import VolumeMount from typing import Optional, Set from typing_extensions import Self @@ -44,7 +45,8 @@ class CreateJobDeploymentRequest(BaseModel): active_deadline_seconds: Optional[StrictInt] = None enable_logging: Optional[StrictBool] = True config_file: Optional[ConfigFileMount] = None - __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "env_vars", "command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "enable_logging", "config_file"] + volume_mounts: Optional[Annotated[List[VolumeMount], Field(max_length=10)]] = None + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "image_url", "image_pull_secret_credentials", "env_vars", "command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "enable_logging", "config_file", "volume_mounts"] @field_validator('name') def name_validate_regular_expression(cls, value): @@ -98,6 +100,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of config_file if self.config_file: _dict['config_file'] = self.config_file.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list) + _items = [] + if self.volume_mounts: + for _item_volume_mounts in self.volume_mounts: + if _item_volume_mounts: + _items.append(_item_volume_mounts.to_dict()) + _dict['volume_mounts'] = _items # set to None if user_annotations (nullable) is None # and model_fields_set contains the field if self.user_annotations is None and "user_annotations" in self.model_fields_set: @@ -154,7 +163,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "backoff_limit": obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 3, "active_deadline_seconds": obj.get("active_deadline_seconds"), "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True, - "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None + "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None, + "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None }) return _obj diff --git a/platform_api_python_client/models/get_job_deployment_response.py b/platform_api_python_client/models/get_job_deployment_response.py index 59e90e2..1d1bdaa 100644 --- a/platform_api_python_client/models/get_job_deployment_response.py +++ b/platform_api_python_client/models/get_job_deployment_response.py @@ -24,6 +24,7 @@ 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.image_pull_secret_credentials import ImagePullSecretCredentials +from platform_api_python_client.models.volume_mount import VolumeMount from typing import Optional, Set from typing_extensions import Self @@ -54,7 +55,8 @@ class GetJobDeploymentResponse(BaseModel): image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None enable_logging: Optional[StrictBool] = True config_file: Optional[ConfigFileMount] = None - __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "enable_logging", "config_file"] + volume_mounts: Optional[List[VolumeMount]] = None + __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "enable_logging", "config_file", "volume_mounts"] model_config = ConfigDict( populate_by_name=True, @@ -101,6 +103,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of config_file if self.config_file: _dict['config_file'] = self.config_file.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in volume_mounts (list) + _items = [] + if self.volume_mounts: + for _item_volume_mounts in self.volume_mounts: + if _item_volume_mounts: + _items.append(_item_volume_mounts.to_dict()) + _dict['volume_mounts'] = _items # set to None if image_url (nullable) is None # and model_fields_set contains the field if self.image_url is None and "image_url" in self.model_fields_set: @@ -180,7 +189,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "active_deadline_seconds": obj.get("active_deadline_seconds"), "image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None, "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True, - "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None + "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None, + "volume_mounts": [VolumeMount.from_dict(_item) for _item in obj["volume_mounts"]] if obj.get("volume_mounts") is not None else None }) return _obj diff --git a/platform_api_python_client/models/list_organization_gpu_quota_response.py b/platform_api_python_client/models/list_organization_gpu_quota_response.py new file mode 100644 index 0000000..a8bea34 --- /dev/null +++ b/platform_api_python_client/models/list_organization_gpu_quota_response.py @@ -0,0 +1,95 @@ +# 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.organization_gpu_quota_response import OrganizationGpuQuotaResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizationGpuQuotaResponse(BaseModel): + """ + ListOrganizationGpuQuotaResponse + """ # noqa: E501 + results: List[OrganizationGpuQuotaResponse] + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=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""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListOrganizationGpuQuotaResponse 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 results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListOrganizationGpuQuotaResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [OrganizationGpuQuotaResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/models/organization_gpu_quota_request.py b/platform_api_python_client/models/organization_gpu_quota_request.py new file mode 100644 index 0000000..4569eca --- /dev/null +++ b/platform_api_python_client/models/organization_gpu_quota_request.py @@ -0,0 +1,88 @@ +# 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationGpuQuotaRequest(BaseModel): + """ + OrganizationGpuQuotaRequest + """ # noqa: E501 + gpu_quota: Annotated[int, Field(strict=True, ge=-1)] + __properties: ClassVar[List[str]] = ["gpu_quota"] + + model_config = ConfigDict( + populate_by_name=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""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationGpuQuotaRequest 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 OrganizationGpuQuotaRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "gpu_quota": obj.get("gpu_quota") + }) + return _obj + + diff --git a/platform_api_python_client/models/organization_gpu_quota_response.py b/platform_api_python_client/models/organization_gpu_quota_response.py new file mode 100644 index 0000000..4e7f1c1 --- /dev/null +++ b/platform_api_python_client/models/organization_gpu_quota_response.py @@ -0,0 +1,91 @@ +# 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, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationGpuQuotaResponse(BaseModel): + """ + OrganizationGpuQuotaResponse + """ # noqa: E501 + organization_id: StrictInt + cluster_id: StrictInt + gpu_quota: StrictInt + __properties: ClassVar[List[str]] = ["organization_id", "cluster_id", "gpu_quota"] + + model_config = ConfigDict( + populate_by_name=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""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationGpuQuotaResponse 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 OrganizationGpuQuotaResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "cluster_id": obj.get("cluster_id"), + "gpu_quota": obj.get("gpu_quota") + }) + return _obj + + diff --git a/pyproject.toml b/pyproject.toml index 17c096d..12c7130 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.26.1" +version = "4.27.0" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 55d7007..ef95474 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "platform-api-python-client" -VERSION = "4.26.1" +VERSION = "4.27.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_create_job_deployment_request.py b/test/test_create_job_deployment_request.py index d162711..99c9758 100644 --- a/test/test_create_job_deployment_request.py +++ b/test/test_create_job_deployment_request.py @@ -58,7 +58,13 @@ def make_instance(self, include_optional) -> CreateJobDeploymentRequest: config_file = platform_api_python_client.models.config_file_mount.ConfigFileMount( filename = '20', mount_path = '0', - content = '0', ) + content = '0', ), + volume_mounts = [ + platform_api_python_client.models.volume_mount.VolumeMount( + volume_id = 56, + mount_path = '0', + read_only = True, ) + ] ) else: return CreateJobDeploymentRequest( diff --git a/test/test_external_api.py b/test/test_external_api.py index 6be082e..40a166e 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -124,6 +124,13 @@ def test_delete_hardware_instance_hardware_instances_hardware_instance_id_delete """ pass + def test_delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete(self) -> None: + """Test case for delete_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_delete + + Delete Org Gpu Quota On Cluster + """ + pass + def test_delete_service_account_service_accounts_workos_id_delete(self) -> None: """Test case for delete_service_account_service_accounts_workos_id_delete @@ -215,6 +222,13 @@ def test_get_cserve_v3_deployment_deployments_cserve_v3_deployment_id_get(self) """ pass + def test_get_current_org_gpu_quota_organizations_gpu_quota_get(self) -> None: + """Test case for get_current_org_gpu_quota_organizations_gpu_quota_get + + Get Current Org Gpu Quota + """ + pass + def test_get_deployment_logs_deployments_logs_deployment_id_get(self) -> None: """Test case for get_deployment_logs_deployments_logs_deployment_id_get @@ -292,8 +306,8 @@ def test_get_hardware_instances_hardware_instances_get(self) -> None: """ pass - def test_get_hardware_presets_hardware_presets_get(self) -> None: - """Test case for get_hardware_presets_hardware_presets_get + def test_get_hardware_presets_hardware_instances_presets_get(self) -> None: + """Test case for get_hardware_presets_hardware_instances_presets_get Get Hardware Presets """ @@ -320,6 +334,13 @@ def test_get_job_deployment_deployments_job_deployment_id_get(self) -> None: """ pass + def test_get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get(self) -> None: + """Test case for get_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_get + + Get Org Gpu Quota On Cluster + """ + pass + def test_get_prebuilt_images_prebuilt_images_get(self) -> None: """Test case for get_prebuilt_images_prebuilt_images_get @@ -376,6 +397,13 @@ def test_list_cluster_capacity_capacity_get(self) -> None: """ pass + def test_list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get(self) -> None: + """Test case for list_cluster_org_gpu_quotas_clusters_cluster_id_gpu_quota_organizations_get + + List Cluster Org Gpu Quotas + """ + pass + def test_list_service_accounts_service_accounts_get(self) -> None: """Test case for list_service_accounts_service_accounts_get @@ -383,6 +411,13 @@ def test_list_service_accounts_service_accounts_get(self) -> None: """ pass + def test_put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put(self) -> None: + """Test case for put_org_gpu_quota_on_cluster_clusters_cluster_id_organizations_organization_id_gpu_quota_put + + Put Org Gpu Quota On Cluster + """ + pass + def test_rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put(self) -> None: """Test case for rollout_existing_revision_deployments_revisions_deployment_id_revision_number_put diff --git a/test/test_get_job_deployment_response.py b/test/test_get_job_deployment_response.py index d0311d0..441564b 100644 --- a/test/test_get_job_deployment_response.py +++ b/test/test_get_job_deployment_response.py @@ -70,7 +70,13 @@ def make_instance(self, include_optional) -> GetJobDeploymentResponse: config_file = platform_api_python_client.models.config_file_mount.ConfigFileMount( filename = '20', mount_path = '0', - content = '0', ) + content = '0', ), + volume_mounts = [ + platform_api_python_client.models.volume_mount.VolumeMount( + volume_id = 56, + mount_path = '0', + read_only = True, ) + ] ) else: return GetJobDeploymentResponse( diff --git a/test/test_list_organization_gpu_quota_response.py b/test/test_list_organization_gpu_quota_response.py new file mode 100644 index 0000000..38302b6 --- /dev/null +++ b/test/test_list_organization_gpu_quota_response.py @@ -0,0 +1,62 @@ +# 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.list_organization_gpu_quota_response import ListOrganizationGpuQuotaResponse + +class TestListOrganizationGpuQuotaResponse(unittest.TestCase): + """ListOrganizationGpuQuotaResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizationGpuQuotaResponse: + """Test ListOrganizationGpuQuotaResponse + 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 `ListOrganizationGpuQuotaResponse` + """ + model = ListOrganizationGpuQuotaResponse() + if include_optional: + return ListOrganizationGpuQuotaResponse( + results = [ + platform_api_python_client.models.organization_gpu_quota_response.OrganizationGpuQuotaResponse( + organization_id = 56, + cluster_id = 56, + gpu_quota = 56, ) + ] + ) + else: + return ListOrganizationGpuQuotaResponse( + results = [ + platform_api_python_client.models.organization_gpu_quota_response.OrganizationGpuQuotaResponse( + organization_id = 56, + cluster_id = 56, + gpu_quota = 56, ) + ], + ) + """ + + def testListOrganizationGpuQuotaResponse(self): + """Test ListOrganizationGpuQuotaResponse""" + # 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_organization_gpu_quota_request.py b/test/test_organization_gpu_quota_request.py new file mode 100644 index 0000000..3d2e5d6 --- /dev/null +++ b/test/test_organization_gpu_quota_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.organization_gpu_quota_request import OrganizationGpuQuotaRequest + +class TestOrganizationGpuQuotaRequest(unittest.TestCase): + """OrganizationGpuQuotaRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrganizationGpuQuotaRequest: + """Test OrganizationGpuQuotaRequest + 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 `OrganizationGpuQuotaRequest` + """ + model = OrganizationGpuQuotaRequest() + if include_optional: + return OrganizationGpuQuotaRequest( + gpu_quota = -1.0 + ) + else: + return OrganizationGpuQuotaRequest( + gpu_quota = -1.0, + ) + """ + + def testOrganizationGpuQuotaRequest(self): + """Test OrganizationGpuQuotaRequest""" + # 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_organization_gpu_quota_response.py b/test/test_organization_gpu_quota_response.py new file mode 100644 index 0000000..e38d214 --- /dev/null +++ b/test/test_organization_gpu_quota_response.py @@ -0,0 +1,56 @@ +# 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.organization_gpu_quota_response import OrganizationGpuQuotaResponse + +class TestOrganizationGpuQuotaResponse(unittest.TestCase): + """OrganizationGpuQuotaResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrganizationGpuQuotaResponse: + """Test OrganizationGpuQuotaResponse + 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 `OrganizationGpuQuotaResponse` + """ + model = OrganizationGpuQuotaResponse() + if include_optional: + return OrganizationGpuQuotaResponse( + organization_id = 56, + cluster_id = 56, + gpu_quota = 56 + ) + else: + return OrganizationGpuQuotaResponse( + organization_id = 56, + cluster_id = 56, + gpu_quota = 56, + ) + """ + + def testOrganizationGpuQuotaResponse(self): + """Test OrganizationGpuQuotaResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()