diff --git a/README.md b/README.md index f8781a6..d8ed980 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.38.0 +- Package version: 4.39.0 - Generator version: 7.26.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -234,6 +234,7 @@ Class | Method | HTTP request | Description - [DeploymentUsageValue](docs/DeploymentUsageValue.md) - [DynamoCommunicationsInput](docs/DynamoCommunicationsInput.md) - [DynamoFrontendConfig](docs/DynamoFrontendConfig.md) + - [DynamoFrontendConfigResponse](docs/DynamoFrontendConfigResponse.md) - [DynamoImage](docs/DynamoImage.md) - [DynamoKvTransferConfiguration](docs/DynamoKvTransferConfiguration.md) - [DynamoKvTransferPolicy](docs/DynamoKvTransferPolicy.md) diff --git a/docs/CreateDynamoDeploymentRequest.md b/docs/CreateDynamoDeploymentRequest.md index 325c30b..0e92b0e 100644 --- a/docs/CreateDynamoDeploymentRequest.md +++ b/docs/CreateDynamoDeploymentRequest.md @@ -39,7 +39,7 @@ Name | Type | Description | Notes **enable_logging** | **bool** | | [optional] [default to True] **enable_node_model_cache** | **bool** | | [optional] [default to False] **backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional] -**frontend** | [**DynamoFrontendConfig**](DynamoFrontendConfig.md) | Replica bounds for the Frontend (HTTP server and router) pods serving the endpoint, which are placed on separate nodes where possible. Two keep the endpoint serving through a node loss. min_replicas and max_replicas must be equal until Frontend autoscaling is supported. Changing them restarts every component of a running deployment. | [optional] +**frontend** | [**DynamoFrontendConfig**](DynamoFrontendConfig.md) | Replica bounds and size of the Frontend (HTTP server and router) pods serving the endpoint, which are placed on separate nodes where possible. Two keep the endpoint serving through a node loss. min_replicas and max_replicas must be equal until Frontend autoscaling is supported. Changing any of these restarts every component of a running deployment. | [optional] ## Example diff --git a/docs/DeploymentResponse.md b/docs/DeploymentResponse.md index cfe60d3..b3691df 100644 --- a/docs/DeploymentResponse.md +++ b/docs/DeploymentResponse.md @@ -43,7 +43,7 @@ Name | Type | Description | Notes **enable_logging** | **bool** | | [optional] [default to True] **enable_node_model_cache** | **bool** | | [optional] [default to False] **backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional] -**frontend** | [**DynamoFrontendConfig**](DynamoFrontendConfig.md) | Frontend replica bounds this revision requests; the defaults for revisions created before the field. | [optional] +**frontend** | [**DynamoFrontendConfigResponse**](DynamoFrontendConfigResponse.md) | Frontend replica bounds and size this revision requests; the defaults for revisions created before these fields. | [optional] **container_port** | **int** | | **healthcheck** | **str** | | [optional] **command** | **List[str]** | | [optional] diff --git a/docs/DynamoFrontendConfig.md b/docs/DynamoFrontendConfig.md index 1c44a7b..3824a2c 100644 --- a/docs/DynamoFrontendConfig.md +++ b/docs/DynamoFrontendConfig.md @@ -1,6 +1,6 @@ # DynamoFrontendConfig -Replica bounds for the Dynamo Frontend, shaped like a worker pool's so that Frontend autoscaling can arrive without an API change. Until it does, the Frontend runs a fixed count: ``min_replicas`` must equal ``max_replicas``. +Replica bounds and pod size for the Dynamo Frontend. A size is requested and limited alike; left unset, the chart's small default applies. The bounds are shaped like a worker pool's so that Frontend autoscaling can arrive without an API change. Until it does, the Frontend runs a fixed count: ``min_replicas`` must equal ``max_replicas``. ## Properties @@ -8,6 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **min_replicas** | **int** | | [optional] [default to 3] **max_replicas** | **int** | | [optional] [default to 3] +**cpu** | **int** | CPU for each Frontend pod, in millicores. | [optional] +**memory** | **int** | Memory for each Frontend pod, in MiB. | [optional] ## Example diff --git a/docs/DynamoFrontendConfigResponse.md b/docs/DynamoFrontendConfigResponse.md new file mode 100644 index 0000000..3c48d66 --- /dev/null +++ b/docs/DynamoFrontendConfigResponse.md @@ -0,0 +1,33 @@ +# DynamoFrontendConfigResponse + +The Frontend a revision requests, as read back. The size bounds stay on the request: in a response they would make a client generated from an older spec reject deployments sized above its caps once the caps are raised. The replica bounds keep the shape this response already has. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min_replicas** | **int** | | [optional] [default to 3] +**max_replicas** | **int** | | [optional] [default to 3] +**cpu** | **int** | CPU for each Frontend pod, in millicores. | [optional] +**memory** | **int** | Memory for each Frontend pod, in MiB. | [optional] + +## Example + +```python +from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamoFrontendConfigResponse from a JSON string +dynamo_frontend_config_response_instance = DynamoFrontendConfigResponse.from_json(json) +# print the JSON string representation of the object +print(DynamoFrontendConfigResponse.to_json()) + +# convert the object into a dict +dynamo_frontend_config_response_dict = dynamo_frontend_config_response_instance.to_dict() +# create an instance of DynamoFrontendConfigResponse from a dict +dynamo_frontend_config_response_from_dict = DynamoFrontendConfigResponse.from_dict(dynamo_frontend_config_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/GetDynamoDeploymentResponse.md b/docs/GetDynamoDeploymentResponse.md index 5208cd2..4612a33 100644 --- a/docs/GetDynamoDeploymentResponse.md +++ b/docs/GetDynamoDeploymentResponse.md @@ -44,7 +44,7 @@ Name | Type | Description | Notes **enable_logging** | **bool** | | [optional] [default to True] **enable_node_model_cache** | **bool** | | [optional] [default to False] **backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional] -**frontend** | [**DynamoFrontendConfig**](DynamoFrontendConfig.md) | Frontend replica bounds this revision requests; the defaults for revisions created before the field. | [optional] +**frontend** | [**DynamoFrontendConfigResponse**](DynamoFrontendConfigResponse.md) | Frontend replica bounds and size this revision requests; the defaults for revisions created before these fields. | [optional] ## Example diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index 057619a..811adaa 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.38.0" +__version__ = "4.39.0" # Define package exports __all__ = [ @@ -72,6 +72,7 @@ "DeploymentUsageValue", "DynamoCommunicationsInput", "DynamoFrontendConfig", + "DynamoFrontendConfigResponse", "DynamoImage", "DynamoKvTransferConfiguration", "DynamoKvTransferPolicy", @@ -255,6 +256,7 @@ from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue as DeploymentUsageValue from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput as DynamoCommunicationsInput from platform_api_python_client.models.dynamo_frontend_config import DynamoFrontendConfig as DynamoFrontendConfig +from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse as DynamoFrontendConfigResponse from platform_api_python_client.models.dynamo_image import DynamoImage as DynamoImage from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration as DynamoKvTransferConfiguration from platform_api_python_client.models.dynamo_kv_transfer_policy import DynamoKvTransferPolicy as DynamoKvTransferPolicy diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 0c82181..2e3de6d 100644 --- a/platform_api_python_client/api_client.py +++ b/platform_api_python_client/api_client.py @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/4.38.0/python' + self.user_agent = 'OpenAPI-Generator/4.39.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 f925d2d..1f16507 100644 --- a/platform_api_python_client/configuration.py +++ b/platform_api_python_client/configuration.py @@ -562,7 +562,7 @@ def to_debug_report(self) -> str: "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.1.0\n"\ - "SDK Package Version: 4.38.0".\ + "SDK Package Version: 4.39.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/platform_api_python_client/models/__init__.py b/platform_api_python_client/models/__init__.py index 2d0aea1..c65fd1b 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -57,6 +57,7 @@ from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue from platform_api_python_client.models.dynamo_communications_input import DynamoCommunicationsInput from platform_api_python_client.models.dynamo_frontend_config import DynamoFrontendConfig +from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse from platform_api_python_client.models.dynamo_image import DynamoImage from platform_api_python_client.models.dynamo_kv_transfer_configuration import DynamoKvTransferConfiguration from platform_api_python_client.models.dynamo_kv_transfer_policy import DynamoKvTransferPolicy diff --git a/platform_api_python_client/models/create_dynamo_deployment_request.py b/platform_api_python_client/models/create_dynamo_deployment_request.py index a221c76..111ccea 100644 --- a/platform_api_python_client/models/create_dynamo_deployment_request.py +++ b/platform_api_python_client/models/create_dynamo_deployment_request.py @@ -68,7 +68,7 @@ class CreateDynamoDeploymentRequest(BaseModel): enable_logging: Optional[StrictBool] = True enable_node_model_cache: Optional[StrictBool] = False backend_protocol: Optional[BackendProtocol] = None - frontend: Optional[DynamoFrontendConfig] = Field(default=None, description="Replica bounds for the Frontend (HTTP server and router) pods serving the endpoint, which are placed on separate nodes where possible. Two keep the endpoint serving through a node loss. min_replicas and max_replicas must be equal until Frontend autoscaling is supported. Changing them restarts every component of a running deployment.") + frontend: Optional[DynamoFrontendConfig] = Field(default=None, description="Replica bounds and size of the Frontend (HTTP server and router) pods serving the endpoint, which are placed on separate nodes where possible. Two keep the endpoint serving through a node loss. min_replicas and max_replicas must be equal until Frontend autoscaling is supported. Changing any of these restarts every component of a running deployment.") __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "chart_revision", "volume_mounts", "priority", "serving_mode", "worker_pools", "communications", "weight_transfer", "model", "model_revision", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "hf_token", "hf_token_ref", "env_vars", "env_vars_refs", "endpoint_bearer_token", "bearer_token_ref", "endpoint_certificate_authority", "image_pull_ref", "enable_logging", "enable_node_model_cache", "backend_protocol", "frontend"] @field_validator('name', mode="before") diff --git a/platform_api_python_client/models/dynamo_frontend_config.py b/platform_api_python_client/models/dynamo_frontend_config.py index 40589ec..ced2deb 100644 --- a/platform_api_python_client/models/dynamo_frontend_config.py +++ b/platform_api_python_client/models/dynamo_frontend_config.py @@ -26,11 +26,13 @@ class DynamoFrontendConfig(BaseModel): """ - Replica bounds for the Dynamo Frontend, shaped like a worker pool's so that Frontend autoscaling can arrive without an API change. Until it does, the Frontend runs a fixed count: ``min_replicas`` must equal ``max_replicas``. + Replica bounds and pod size for the Dynamo Frontend. A size is requested and limited alike; left unset, the chart's small default applies. The bounds are shaped like a worker pool's so that Frontend autoscaling can arrive without an API change. Until it does, the Frontend runs a fixed count: ``min_replicas`` must equal ``max_replicas``. """ # noqa: E501 min_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3 max_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3 - __properties: ClassVar[List[str]] = ["min_replicas", "max_replicas"] + cpu: Optional[Annotated[int, Field(le=8000, strict=True, ge=1000)]] = Field(default=None, description="CPU for each Frontend pod, in millicores.") + memory: Optional[Annotated[int, Field(le=16384, strict=True, ge=1024)]] = Field(default=None, description="Memory for each Frontend pod, in MiB.") + __properties: ClassVar[List[str]] = ["min_replicas", "max_replicas", "cpu", "memory"] model_config = ConfigDict( validate_by_name=True, @@ -71,6 +73,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if cpu (nullable) is None + # and model_fields_set contains the field + if self.cpu is None and "cpu" in self.model_fields_set: + _dict['cpu'] = None + + # set to None if memory (nullable) is None + # and model_fields_set contains the field + if self.memory is None and "memory" in self.model_fields_set: + _dict['memory'] = None + return _dict @classmethod @@ -84,7 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 3, - "max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 3 + "max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 3, + "cpu": obj.get("cpu"), + "memory": obj.get("memory") }) return _obj diff --git a/platform_api_python_client/models/dynamo_frontend_config_response.py b/platform_api_python_client/models/dynamo_frontend_config_response.py new file mode 100644 index 0000000..32b01dc --- /dev/null +++ b/platform_api_python_client/models/dynamo_frontend_config_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DynamoFrontendConfigResponse(BaseModel): + """ + The Frontend a revision requests, as read back. The size bounds stay on the request: in a response they would make a client generated from an older spec reject deployments sized above its caps once the caps are raised. The replica bounds keep the shape this response already has. + """ # noqa: E501 + min_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3 + max_replicas: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = 3 + cpu: Optional[StrictInt] = Field(default=None, description="CPU for each Frontend pod, in millicores.") + memory: Optional[StrictInt] = Field(default=None, description="Memory for each Frontend pod, in MiB.") + __properties: ClassVar[List[str]] = ["min_replicas", "max_replicas", "cpu", "memory"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamoFrontendConfigResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if cpu (nullable) is None + # and model_fields_set contains the field + if self.cpu is None and "cpu" in self.model_fields_set: + _dict['cpu'] = None + + # set to None if memory (nullable) is None + # and model_fields_set contains the field + if self.memory is None and "memory" in self.model_fields_set: + _dict['memory'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DynamoFrontendConfigResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "min_replicas": obj.get("min_replicas") if obj.get("min_replicas") is not None else 3, + "max_replicas": obj.get("max_replicas") if obj.get("max_replicas") is not None else 3, + "cpu": obj.get("cpu"), + "memory": obj.get("memory") + }) + return _obj + + diff --git a/platform_api_python_client/models/get_dynamo_deployment_response.py b/platform_api_python_client/models/get_dynamo_deployment_response.py index 8fe368c..d011a15 100644 --- a/platform_api_python_client/models/get_dynamo_deployment_response.py +++ b/platform_api_python_client/models/get_dynamo_deployment_response.py @@ -25,7 +25,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.dynamo_communications_input import DynamoCommunicationsInput -from platform_api_python_client.models.dynamo_frontend_config import DynamoFrontendConfig +from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode from platform_api_python_client.models.dynamo_weight_transfer_configuration import DynamoWeightTransferConfiguration from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools @@ -76,7 +76,7 @@ class GetDynamoDeploymentResponse(BaseModel): enable_logging: Optional[StrictBool] = True enable_node_model_cache: Optional[StrictBool] = False backend_protocol: Optional[BackendProtocol] = None - frontend: Optional[DynamoFrontendConfig] = Field(default=None, description="Frontend replica bounds this revision requests; the defaults for revisions created before the field.") + frontend: Optional[DynamoFrontendConfigResponse] = Field(default=None, description="Frontend replica bounds and size this revision requests; the defaults for revisions created before these fields.") __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "chart_revision", "user_annotations", "priority", "volume_mounts", "hf_token_ref", "serving_mode", "worker_pools", "communications", "weight_transfer", "model", "model_revision", "served_model_name", "runtime_version", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "env_vars_refs", "endpoint_certificate_authority", "endpoint_bearer_token", "bearer_token_ref", "image_pull_ref", "enable_logging", "enable_node_model_cache", "backend_protocol", "frontend"] model_config = ConfigDict( @@ -276,7 +276,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True, "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False, "backend_protocol": obj.get("backend_protocol"), - "frontend": DynamoFrontendConfig.from_dict(obj["frontend"]) if obj.get("frontend") is not None else None + "frontend": DynamoFrontendConfigResponse.from_dict(obj["frontend"]) if obj.get("frontend") is not None else None }) return _obj diff --git a/pyproject.toml b/pyproject.toml index 2eca55f..818815e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "platform_api_python_client" -version = "4.38.0" +version = "4.39.0" description = "Platform External API" authors = [ {name = "OpenAPI Generator Community",email = "team@openapitools.org"}, diff --git a/setup.py b/setup.py index 7fb9ba6..c324ab9 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "platform-api-python-client" -VERSION = "4.38.0" +VERSION = "4.39.0" PYTHON_REQUIRES = ">= 3.10" REQUIRES = [ "urllib3 >= 2.7.0, < 3.0.0", diff --git a/test/test_create_dynamo_deployment_request.py b/test/test_create_dynamo_deployment_request.py index 0d3645e..43e6b14 100644 --- a/test/test_create_dynamo_deployment_request.py +++ b/test/test_create_dynamo_deployment_request.py @@ -85,7 +85,9 @@ def make_instance(self, include_optional) -> CreateDynamoDeploymentRequest: backend_protocol = 'HTTP', frontend = platform_api_python_client.models.dynamo_frontend_config.DynamoFrontendConfig( min_replicas = 1.0, - max_replicas = 1.0, ) + max_replicas = 1.0, + cpu = 1000.0, + memory = 1024.0, ) ) else: return CreateDynamoDeploymentRequest( diff --git a/test/test_deployment_response.py b/test/test_deployment_response.py index 8313cb8..e8bf3d8 100644 --- a/test/test_deployment_response.py +++ b/test/test_deployment_response.py @@ -88,9 +88,11 @@ def make_instance(self, include_optional) -> DeploymentResponse: enable_logging = True, enable_node_model_cache = True, backend_protocol = 'HTTP', - frontend = platform_api_python_client.models.dynamo_frontend_config.DynamoFrontendConfig( + frontend = platform_api_python_client.models.dynamo_frontend_config_response.DynamoFrontendConfigResponse( min_replicas = 1.0, - max_replicas = 1.0, ), + max_replicas = 1.0, + cpu = 56, + memory = 56, ), container_port = 56, healthcheck = '', command = [ diff --git a/test/test_dynamo_frontend_config.py b/test/test_dynamo_frontend_config.py index 22b5c08..c766247 100644 --- a/test/test_dynamo_frontend_config.py +++ b/test/test_dynamo_frontend_config.py @@ -36,7 +36,9 @@ def make_instance(self, include_optional) -> DynamoFrontendConfig: if include_optional: return DynamoFrontendConfig( min_replicas = 1.0, - max_replicas = 1.0 + max_replicas = 1.0, + cpu = 1000.0, + memory = 1024.0 ) else: return DynamoFrontendConfig( diff --git a/test/test_dynamo_frontend_config_response.py b/test/test_dynamo_frontend_config_response.py new file mode 100644 index 0000000..9556c3d --- /dev/null +++ b/test/test_dynamo_frontend_config_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.dynamo_frontend_config_response import DynamoFrontendConfigResponse + +class TestDynamoFrontendConfigResponse(unittest.TestCase): + """DynamoFrontendConfigResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DynamoFrontendConfigResponse: + """Test DynamoFrontendConfigResponse + 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 `DynamoFrontendConfigResponse` + """ + model = DynamoFrontendConfigResponse() + if include_optional: + return DynamoFrontendConfigResponse( + min_replicas = 1.0, + max_replicas = 1.0, + cpu = 56, + memory = 56 + ) + else: + return DynamoFrontendConfigResponse( + ) + """ + + def testDynamoFrontendConfigResponse(self): + """Test DynamoFrontendConfigResponse""" + # 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_get_dynamo_deployment_response.py b/test/test_get_dynamo_deployment_response.py index 51b3e7a..466cf6e 100644 --- a/test/test_get_dynamo_deployment_response.py +++ b/test/test_get_dynamo_deployment_response.py @@ -88,9 +88,11 @@ def make_instance(self, include_optional) -> GetDynamoDeploymentResponse: enable_logging = True, enable_node_model_cache = True, backend_protocol = 'HTTP', - frontend = platform_api_python_client.models.dynamo_frontend_config.DynamoFrontendConfig( + frontend = platform_api_python_client.models.dynamo_frontend_config_response.DynamoFrontendConfigResponse( min_replicas = 1.0, - max_replicas = 1.0, ) + max_replicas = 1.0, + cpu = 56, + memory = 56, ) ) else: return GetDynamoDeploymentResponse(