From 94336d7034838df6ec7f2da8820789a72dc8c2e9 Mon Sep 17 00:00:00 2001 From: platform CI Date: Wed, 23 Apr 2025 17:09:40 +0000 Subject: [PATCH] Update clients to latest platform release (4.0.0) --- README.md | 2 +- docs/CreateCServeV2DeploymentRequest.md | 2 ++ docs/CreateInferenceDeploymentRequest.md | 2 ++ docs/CreateRagDeploymentRequest.md | 2 ++ docs/GetCServeV2DeploymentResponse.md | 1 + docs/GetInferenceDeploymentResponse.md | 1 + docs/GetRagDeploymentResponse.md | 1 + docs/UserVaultType.md | 2 ++ platform_api_python_client/__init__.py | 2 +- platform_api_python_client/api_client.py | 2 +- platform_api_python_client/configuration.py | 2 +- .../create_c_serve_v2_deployment_request.py | 16 +++++++++++++++- .../create_inference_deployment_request.py | 16 +++++++++++++++- .../models/create_rag_deployment_request.py | 16 +++++++++++++++- .../models/create_url_response.py | 5 +++-- .../models/get_c_serve_v2_deployment_response.py | 9 ++++++++- .../models/get_inference_deployment_response.py | 9 ++++++++- .../models/get_rag_deployment_response.py | 9 ++++++++- .../models/user_vault_type.py | 1 + pyproject.toml | 2 +- setup.py | 2 +- .../test_create_c_serve_v2_deployment_request.py | 2 ++ test/test_create_inference_deployment_request.py | 2 ++ test/test_create_rag_deployment_request.py | 2 ++ test/test_create_url_response.py | 4 ++-- test/test_get_c_serve_v2_deployment_response.py | 1 + test/test_get_inference_deployment_response.py | 1 + test/test_get_rag_deployment_response.py | 1 + 28 files changed, 101 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ca08c69..462cf02 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: 3.2.10 +- Package version: 4.0.0 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen diff --git a/docs/CreateCServeV2DeploymentRequest.md b/docs/CreateCServeV2DeploymentRequest.md index ebc647b..7a4fb17 100644 --- a/docs/CreateCServeV2DeploymentRequest.md +++ b/docs/CreateCServeV2DeploymentRequest.md @@ -10,9 +10,11 @@ Name | Type | Description | Notes **hardware_instance_id** | **int** | | **recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | | **hf_token** | **str** | | [optional] +**endpoint_bearer_token** | **str** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] **min_scale** | **int** | | **max_scale** | **int** | | +**initial_scale** | **int** | | [optional] **concurrency** | **int** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] diff --git a/docs/CreateInferenceDeploymentRequest.md b/docs/CreateInferenceDeploymentRequest.md index 14dc2af..4e53614 100644 --- a/docs/CreateInferenceDeploymentRequest.md +++ b/docs/CreateInferenceDeploymentRequest.md @@ -12,10 +12,12 @@ Name | Type | Description | Notes **port** | **int** | | **min_scale** | **int** | | **max_scale** | **int** | | +**initial_scale** | **int** | | [optional] **concurrency** | **int** | | [optional] **healthcheck** | **str** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] **command** | **str** | | [optional] +**endpoint_bearer_token** | **str** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] ## Example diff --git a/docs/CreateRagDeploymentRequest.md b/docs/CreateRagDeploymentRequest.md index 6fd4a20..07360ba 100644 --- a/docs/CreateRagDeploymentRequest.md +++ b/docs/CreateRagDeploymentRequest.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **centml_api_key** | **str** | | **min_scale** | **int** | | [optional] [default to 1] **max_scale** | **int** | | [optional] [default to 1] +**initial_scale** | **int** | | [optional] +**endpoint_bearer_token** | **str** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] **concurrency** | **int** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] diff --git a/docs/GetCServeV2DeploymentResponse.md b/docs/GetCServeV2DeploymentResponse.md index 87e91d7..b4c29ac 100644 --- a/docs/GetCServeV2DeploymentResponse.md +++ b/docs/GetCServeV2DeploymentResponse.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | | **min_scale** | **int** | | **max_scale** | **int** | | +**initial_scale** | **int** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] **concurrency** | **int** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] diff --git a/docs/GetInferenceDeploymentResponse.md b/docs/GetInferenceDeploymentResponse.md index ae2c724..ce9dd2a 100644 --- a/docs/GetInferenceDeploymentResponse.md +++ b/docs/GetInferenceDeploymentResponse.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **container_port** | **int** | | **min_scale** | **int** | | **max_scale** | **int** | | +**initial_scale** | **int** | | [optional] **concurrency** | **int** | | [optional] **healthcheck** | **str** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] diff --git a/docs/GetRagDeploymentResponse.md b/docs/GetRagDeploymentResponse.md index d866ae8..4717dca 100644 --- a/docs/GetRagDeploymentResponse.md +++ b/docs/GetRagDeploymentResponse.md @@ -19,6 +19,7 @@ Name | Type | Description | Notes **centml_api_key** | **str** | | **min_scale** | **int** | | [optional] [default to 1] **max_scale** | **int** | | [optional] [default to 1] +**initial_scale** | **int** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] **concurrency** | **int** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] diff --git a/docs/UserVaultType.md b/docs/UserVaultType.md index 2c74e78..b2c240c 100644 --- a/docs/UserVaultType.md +++ b/docs/UserVaultType.md @@ -7,6 +7,8 @@ * `SSH_KEYS` (value: `'ssh_keys'`) +* `BEARER_TOKENS` (value: `'bearer_tokens'`) + * `ACCESS_TOKENS` (value: `'access_tokens'`) * `CERTIFICATES` (value: `'certificates'`) diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index e64ca31..dde0863 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "3.2.10" +__version__ = "4.0.0" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 0a25671..4841bf8 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/3.2.10/python' + self.user_agent = 'OpenAPI-Generator/4.0.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 0fea4a8..f6c1825 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: 3.2.10".\ + "SDK Package Version: 4.0.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/platform_api_python_client/models/create_c_serve_v2_deployment_request.py b/platform_api_python_client/models/create_c_serve_v2_deployment_request.py index 56cedae..b4aca9c 100644 --- a/platform_api_python_client/models/create_c_serve_v2_deployment_request.py +++ b/platform_api_python_client/models/create_c_serve_v2_deployment_request.py @@ -33,12 +33,14 @@ class CreateCServeV2DeploymentRequest(BaseModel): hardware_instance_id: StrictInt recipe: CServeV2Recipe hf_token: Optional[StrictStr] = None + endpoint_bearer_token: Optional[StrictStr] = None endpoint_certificate_authority: Optional[StrictStr] = None min_scale: StrictInt max_scale: StrictInt + initial_scale: Optional[StrictInt] = None concurrency: Optional[StrictInt] = None env_vars: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "endpoint_certificate_authority", "min_scale", "max_scale", "concurrency", "env_vars"] + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_scale", "max_scale", "initial_scale", "concurrency", "env_vars"] @field_validator('name') def name_validate_regular_expression(cls, value): @@ -94,11 +96,21 @@ def to_dict(self) -> Dict[str, Any]: if self.hf_token is None and "hf_token" in self.model_fields_set: _dict['hf_token'] = None + # set to None if endpoint_bearer_token (nullable) is None + # and model_fields_set contains the field + if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set: + _dict['endpoint_bearer_token'] = None + # set to None if endpoint_certificate_authority (nullable) is None # and model_fields_set contains the field if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: _dict['endpoint_certificate_authority'] = None + # set to None if initial_scale (nullable) is None + # and model_fields_set contains the field + if self.initial_scale is None and "initial_scale" in self.model_fields_set: + _dict['initial_scale'] = None + # set to None if concurrency (nullable) is None # and model_fields_set contains the field if self.concurrency is None and "concurrency" in self.model_fields_set: @@ -121,9 +133,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "hardware_instance_id": obj.get("hardware_instance_id"), "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, "hf_token": obj.get("hf_token"), + "endpoint_bearer_token": obj.get("endpoint_bearer_token"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), "min_scale": obj.get("min_scale"), "max_scale": obj.get("max_scale"), + "initial_scale": obj.get("initial_scale"), "concurrency": obj.get("concurrency"), "env_vars": obj.get("env_vars") }) diff --git a/platform_api_python_client/models/create_inference_deployment_request.py b/platform_api_python_client/models/create_inference_deployment_request.py index acd5edb..12eef58 100644 --- a/platform_api_python_client/models/create_inference_deployment_request.py +++ b/platform_api_python_client/models/create_inference_deployment_request.py @@ -34,12 +34,14 @@ class CreateInferenceDeploymentRequest(BaseModel): port: StrictInt min_scale: StrictInt max_scale: StrictInt + initial_scale: Optional[StrictInt] = None concurrency: Optional[StrictInt] = None healthcheck: Optional[StrictStr] = None env_vars: Optional[Dict[str, StrictStr]] = None command: Optional[StrictStr] = None + endpoint_bearer_token: Optional[StrictStr] = None endpoint_certificate_authority: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "port", "min_scale", "max_scale", "concurrency", "healthcheck", "env_vars", "command", "endpoint_certificate_authority"] + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "port", "min_scale", "max_scale", "initial_scale", "concurrency", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority"] @field_validator('name') def name_validate_regular_expression(cls, value): @@ -87,6 +89,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if initial_scale (nullable) is None + # and model_fields_set contains the field + if self.initial_scale is None and "initial_scale" in self.model_fields_set: + _dict['initial_scale'] = None + # set to None if concurrency (nullable) is None # and model_fields_set contains the field if self.concurrency is None and "concurrency" in self.model_fields_set: @@ -107,6 +114,11 @@ def to_dict(self) -> Dict[str, Any]: if self.command is None and "command" in self.model_fields_set: _dict['command'] = None + # set to None if endpoint_bearer_token (nullable) is None + # and model_fields_set contains the field + if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set: + _dict['endpoint_bearer_token'] = None + # set to None if endpoint_certificate_authority (nullable) is None # and model_fields_set contains the field if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: @@ -131,10 +143,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "port": obj.get("port"), "min_scale": obj.get("min_scale"), "max_scale": obj.get("max_scale"), + "initial_scale": obj.get("initial_scale"), "concurrency": obj.get("concurrency"), "healthcheck": obj.get("healthcheck"), "env_vars": obj.get("env_vars"), "command": obj.get("command"), + "endpoint_bearer_token": obj.get("endpoint_bearer_token"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority") }) return _obj diff --git a/platform_api_python_client/models/create_rag_deployment_request.py b/platform_api_python_client/models/create_rag_deployment_request.py index c541be1..3d424c1 100644 --- a/platform_api_python_client/models/create_rag_deployment_request.py +++ b/platform_api_python_client/models/create_rag_deployment_request.py @@ -37,10 +37,12 @@ class CreateRagDeploymentRequest(BaseModel): centml_api_key: StrictStr min_scale: Optional[StrictInt] = 1 max_scale: Optional[StrictInt] = 1 + initial_scale: Optional[StrictInt] = None + endpoint_bearer_token: Optional[StrictStr] = None endpoint_certificate_authority: Optional[StrictStr] = None concurrency: Optional[StrictInt] = None env_vars: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "llm_model", "centml_api_key", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "llm_model", "centml_api_key", "min_scale", "max_scale", "initial_scale", "endpoint_bearer_token", "endpoint_certificate_authority", "concurrency", "env_vars"] @field_validator('name') def name_validate_regular_expression(cls, value): @@ -96,6 +98,16 @@ def to_dict(self) -> Dict[str, Any]: if self.hf_token is None and "hf_token" in self.model_fields_set: _dict['hf_token'] = None + # set to None if initial_scale (nullable) is None + # and model_fields_set contains the field + if self.initial_scale is None and "initial_scale" in self.model_fields_set: + _dict['initial_scale'] = None + + # set to None if endpoint_bearer_token (nullable) is None + # and model_fields_set contains the field + if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set: + _dict['endpoint_bearer_token'] = None + # set to None if endpoint_certificate_authority (nullable) is None # and model_fields_set contains the field if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: @@ -127,6 +139,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "centml_api_key": obj.get("centml_api_key"), "min_scale": obj.get("min_scale") if obj.get("min_scale") is not None else 1, "max_scale": obj.get("max_scale") if obj.get("max_scale") is not None else 1, + "initial_scale": obj.get("initial_scale"), + "endpoint_bearer_token": obj.get("endpoint_bearer_token"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), "concurrency": obj.get("concurrency"), "env_vars": obj.get("env_vars") diff --git a/platform_api_python_client/models/create_url_response.py b/platform_api_python_client/models/create_url_response.py index ba4602c..367a07f 100644 --- a/platform_api_python_client/models/create_url_response.py +++ b/platform_api_python_client/models/create_url_response.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +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 @@ -26,7 +27,7 @@ class CreateUrlResponse(BaseModel): """ CreateUrlResponse """ # noqa: E501 - url: StrictStr + url: Annotated[str, Field(min_length=1, strict=True)] __properties: ClassVar[List[str]] = ["url"] model_config = ConfigDict( diff --git a/platform_api_python_client/models/get_c_serve_v2_deployment_response.py b/platform_api_python_client/models/get_c_serve_v2_deployment_response.py index d064cef..c6ccc17 100644 --- a/platform_api_python_client/models/get_c_serve_v2_deployment_response.py +++ b/platform_api_python_client/models/get_c_serve_v2_deployment_response.py @@ -42,10 +42,11 @@ class GetCServeV2DeploymentResponse(BaseModel): recipe: CServeV2Recipe min_scale: StrictInt max_scale: StrictInt + initial_scale: Optional[StrictInt] = None endpoint_certificate_authority: Optional[StrictStr] = None concurrency: Optional[StrictInt] = None env_vars: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "recipe", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "recipe", "min_scale", "max_scale", "initial_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] model_config = ConfigDict( populate_by_name=True, @@ -94,6 +95,11 @@ def to_dict(self) -> Dict[str, Any]: if self.image_url is None and "image_url" in self.model_fields_set: _dict['image_url'] = None + # set to None if initial_scale (nullable) is None + # and model_fields_set contains the field + if self.initial_scale is None and "initial_scale" in self.model_fields_set: + _dict['initial_scale'] = None + # set to None if endpoint_certificate_authority (nullable) is None # and model_fields_set contains the field if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: @@ -128,6 +134,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, "min_scale": obj.get("min_scale"), "max_scale": obj.get("max_scale"), + "initial_scale": obj.get("initial_scale"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), "concurrency": obj.get("concurrency"), "env_vars": obj.get("env_vars") diff --git a/platform_api_python_client/models/get_inference_deployment_response.py b/platform_api_python_client/models/get_inference_deployment_response.py index df2a9a0..c16df04 100644 --- a/platform_api_python_client/models/get_inference_deployment_response.py +++ b/platform_api_python_client/models/get_inference_deployment_response.py @@ -41,13 +41,14 @@ class GetInferenceDeploymentResponse(BaseModel): container_port: StrictInt min_scale: StrictInt max_scale: StrictInt + initial_scale: Optional[StrictInt] = None concurrency: Optional[StrictInt] = None healthcheck: Optional[StrictStr] = None endpoint_certificate_authority: Optional[StrictStr] = None env_vars: Optional[Dict[str, StrictStr]] = None command: Optional[List[StrictStr]] = None command_args: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "container_port", "min_scale", "max_scale", "concurrency", "healthcheck", "endpoint_certificate_authority", "env_vars", "command", "command_args"] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "container_port", "min_scale", "max_scale", "initial_scale", "concurrency", "healthcheck", "endpoint_certificate_authority", "env_vars", "command", "command_args"] model_config = ConfigDict( populate_by_name=True, @@ -93,6 +94,11 @@ def to_dict(self) -> Dict[str, Any]: if self.image_url is None and "image_url" in self.model_fields_set: _dict['image_url'] = None + # set to None if initial_scale (nullable) is None + # and model_fields_set contains the field + if self.initial_scale is None and "initial_scale" in self.model_fields_set: + _dict['initial_scale'] = None + # set to None if concurrency (nullable) is None # and model_fields_set contains the field if self.concurrency is None and "concurrency" in self.model_fields_set: @@ -147,6 +153,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "container_port": obj.get("container_port"), "min_scale": obj.get("min_scale"), "max_scale": obj.get("max_scale"), + "initial_scale": obj.get("initial_scale"), "concurrency": obj.get("concurrency"), "healthcheck": obj.get("healthcheck"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), diff --git a/platform_api_python_client/models/get_rag_deployment_response.py b/platform_api_python_client/models/get_rag_deployment_response.py index 2e98029..97cc284 100644 --- a/platform_api_python_client/models/get_rag_deployment_response.py +++ b/platform_api_python_client/models/get_rag_deployment_response.py @@ -44,10 +44,11 @@ class GetRagDeploymentResponse(BaseModel): centml_api_key: StrictStr min_scale: Optional[StrictInt] = 1 max_scale: Optional[StrictInt] = 1 + initial_scale: Optional[StrictInt] = None endpoint_certificate_authority: Optional[StrictStr] = None concurrency: Optional[StrictInt] = None env_vars: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "recipe", "llm_model", "centml_api_key", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] + __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "recipe", "llm_model", "centml_api_key", "min_scale", "max_scale", "initial_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] model_config = ConfigDict( populate_by_name=True, @@ -96,6 +97,11 @@ def to_dict(self) -> Dict[str, Any]: if self.image_url is None and "image_url" in self.model_fields_set: _dict['image_url'] = None + # set to None if initial_scale (nullable) is None + # and model_fields_set contains the field + if self.initial_scale is None and "initial_scale" in self.model_fields_set: + _dict['initial_scale'] = None + # set to None if endpoint_certificate_authority (nullable) is None # and model_fields_set contains the field if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: @@ -132,6 +138,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "centml_api_key": obj.get("centml_api_key"), "min_scale": obj.get("min_scale") if obj.get("min_scale") is not None else 1, "max_scale": obj.get("max_scale") if obj.get("max_scale") is not None else 1, + "initial_scale": obj.get("initial_scale"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), "concurrency": obj.get("concurrency"), "env_vars": obj.get("env_vars") diff --git a/platform_api_python_client/models/user_vault_type.py b/platform_api_python_client/models/user_vault_type.py index 65a131a..75f23e8 100644 --- a/platform_api_python_client/models/user_vault_type.py +++ b/platform_api_python_client/models/user_vault_type.py @@ -28,6 +28,7 @@ class UserVaultType(str, Enum): """ ENV_VARS = 'env_vars' SSH_KEYS = 'ssh_keys' + BEARER_TOKENS = 'bearer_tokens' ACCESS_TOKENS = 'access_tokens' CERTIFICATES = 'certificates' diff --git a/pyproject.toml b/pyproject.toml index 4098f5a..c1905d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "3.2.10" +version = "4.0.0" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index d8b4489..f8f8b72 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 = "3.2.10" +VERSION = "4.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_create_c_serve_v2_deployment_request.py b/test/test_create_c_serve_v2_deployment_request.py index 351a3c9..26b7672 100644 --- a/test/test_create_c_serve_v2_deployment_request.py +++ b/test/test_create_c_serve_v2_deployment_request.py @@ -40,9 +40,11 @@ def make_instance(self, include_optional) -> CreateCServeV2DeploymentRequest: hardware_instance_id = 56, recipe = { }, hf_token = '', + endpoint_bearer_token = '', endpoint_certificate_authority = '', min_scale = 56, max_scale = 56, + initial_scale = 56, concurrency = 56, env_vars = { 'key' : '' diff --git a/test/test_create_inference_deployment_request.py b/test/test_create_inference_deployment_request.py index a43f792..a653525 100644 --- a/test/test_create_inference_deployment_request.py +++ b/test/test_create_inference_deployment_request.py @@ -42,12 +42,14 @@ def make_instance(self, include_optional) -> CreateInferenceDeploymentRequest: port = 56, min_scale = 56, max_scale = 56, + initial_scale = 56, concurrency = 56, healthcheck = '', env_vars = { 'key' : '' }, command = '', + endpoint_bearer_token = '', endpoint_certificate_authority = '' ) else: diff --git a/test/test_create_rag_deployment_request.py b/test/test_create_rag_deployment_request.py index 62850b0..398bc93 100644 --- a/test/test_create_rag_deployment_request.py +++ b/test/test_create_rag_deployment_request.py @@ -44,6 +44,8 @@ def make_instance(self, include_optional) -> CreateRagDeploymentRequest: centml_api_key = '', min_scale = 56, max_scale = 56, + initial_scale = 56, + endpoint_bearer_token = '', endpoint_certificate_authority = '', concurrency = 56, env_vars = { diff --git a/test/test_create_url_response.py b/test/test_create_url_response.py index 0d832fa..425d1bc 100644 --- a/test/test_create_url_response.py +++ b/test/test_create_url_response.py @@ -35,11 +35,11 @@ def make_instance(self, include_optional) -> CreateUrlResponse: model = CreateUrlResponse() if include_optional: return CreateUrlResponse( - url = '' + url = '0' ) else: return CreateUrlResponse( - url = '', + url = '0', ) """ diff --git a/test/test_get_c_serve_v2_deployment_response.py b/test/test_get_c_serve_v2_deployment_response.py index cecc158..e3d5d72 100644 --- a/test/test_get_c_serve_v2_deployment_response.py +++ b/test/test_get_c_serve_v2_deployment_response.py @@ -47,6 +47,7 @@ def make_instance(self, include_optional) -> GetCServeV2DeploymentResponse: recipe = { }, min_scale = 56, max_scale = 56, + initial_scale = 56, endpoint_certificate_authority = '', concurrency = 56, env_vars = { diff --git a/test/test_get_inference_deployment_response.py b/test/test_get_inference_deployment_response.py index 2a3bace..7dd8ff6 100644 --- a/test/test_get_inference_deployment_response.py +++ b/test/test_get_inference_deployment_response.py @@ -47,6 +47,7 @@ def make_instance(self, include_optional) -> GetInferenceDeploymentResponse: container_port = 56, min_scale = 56, max_scale = 56, + initial_scale = 56, concurrency = 56, healthcheck = '', endpoint_certificate_authority = '', diff --git a/test/test_get_rag_deployment_response.py b/test/test_get_rag_deployment_response.py index 26ede80..f17c0b7 100644 --- a/test/test_get_rag_deployment_response.py +++ b/test/test_get_rag_deployment_response.py @@ -49,6 +49,7 @@ def make_instance(self, include_optional) -> GetRagDeploymentResponse: centml_api_key = '', min_scale = 56, max_scale = 56, + initial_scale = 56, endpoint_certificate_authority = '', concurrency = 56, env_vars = {