diff --git a/README.md b/README.md index 5573020..641cb6f 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.23.1 +- Package version: 4.24.0 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -171,7 +171,6 @@ Class | Method | HTTP request | Description - [ClusterRegistrationRequest](docs/ClusterRegistrationRequest.md) - [ClusterRegistrationResponse](docs/ClusterRegistrationResponse.md) - [ConfigFileMount](docs/ConfigFileMount.md) - - [CreateBlockVolumeRequest](docs/CreateBlockVolumeRequest.md) - [CreateCServeV2DeploymentResponse](docs/CreateCServeV2DeploymentResponse.md) - [CreateCServeV3DeploymentRequest](docs/CreateCServeV3DeploymentRequest.md) - [CreateCServeV3DeploymentResponse](docs/CreateCServeV3DeploymentResponse.md) @@ -179,6 +178,7 @@ Class | Method | HTTP request | Description - [CreateComputeDeploymentResponse](docs/CreateComputeDeploymentResponse.md) - [CreateDynamoDeploymentRequest](docs/CreateDynamoDeploymentRequest.md) - [CreateDynamoDeploymentResponse](docs/CreateDynamoDeploymentResponse.md) + - [CreateFilesystemVolumeRequest](docs/CreateFilesystemVolumeRequest.md) - [CreateHardwareInstanceRequest](docs/CreateHardwareInstanceRequest.md) - [CreateInferenceDeploymentResponse](docs/CreateInferenceDeploymentResponse.md) - [CreateInferenceV3DeploymentRequest](docs/CreateInferenceV3DeploymentRequest.md) @@ -205,7 +205,6 @@ Class | Method | HTTP request | Description - [FinalStack](docs/FinalStack.md) - [FluentBit](docs/FluentBit.md) - [GenerateServiceAccountSecretResponse](docs/GenerateServiceAccountSecretResponse.md) - - [GetBlockVolumeResponse](docs/GetBlockVolumeResponse.md) - [GetCServeV2DeploymentResponse](docs/GetCServeV2DeploymentResponse.md) - [GetCServeV3DeploymentResponse](docs/GetCServeV3DeploymentResponse.md) - [GetClusterResponse](docs/GetClusterResponse.md) @@ -215,6 +214,7 @@ Class | Method | HTTP request | Description - [GetDeploymentRevisionResponse](docs/GetDeploymentRevisionResponse.md) - [GetDeploymentUsageResponse](docs/GetDeploymentUsageResponse.md) - [GetDynamoDeploymentResponse](docs/GetDynamoDeploymentResponse.md) + - [GetFilesystemVolumeResponse](docs/GetFilesystemVolumeResponse.md) - [GetInferenceDeploymentResponse](docs/GetInferenceDeploymentResponse.md) - [GetInferenceV3DeploymentResponse](docs/GetInferenceV3DeploymentResponse.md) - [GetJobDeploymentResponse](docs/GetJobDeploymentResponse.md) diff --git a/docs/CreateBlockVolumeRequest.md b/docs/CreateBlockVolumeRequest.md deleted file mode 100644 index ec56648..0000000 --- a/docs/CreateBlockVolumeRequest.md +++ /dev/null @@ -1,33 +0,0 @@ -# CreateBlockVolumeRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**cluster_id** | **int** | | -**backend** | **str** | | -**size_gb** | **int** | | [optional] [default to 100] -**storage_class** | **str** | | [optional] - -## Example - -```python -from platform_api_python_client.models.create_block_volume_request import CreateBlockVolumeRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateBlockVolumeRequest from a JSON string -create_block_volume_request_instance = CreateBlockVolumeRequest.from_json(json) -# print the JSON string representation of the object -print(CreateBlockVolumeRequest.to_json()) - -# convert the object into a dict -create_block_volume_request_dict = create_block_volume_request_instance.to_dict() -# create an instance of CreateBlockVolumeRequest from a dict -create_block_volume_request_from_dict = CreateBlockVolumeRequest.from_dict(create_block_volume_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/CreateFilesystemVolumeRequest.md b/docs/CreateFilesystemVolumeRequest.md new file mode 100644 index 0000000..cd1a37f --- /dev/null +++ b/docs/CreateFilesystemVolumeRequest.md @@ -0,0 +1,33 @@ +# CreateFilesystemVolumeRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**cluster_id** | **int** | | +**backend** | **str** | | +**size_gb** | **int** | | [optional] [default to 100] +**storage_class** | **str** | | [optional] + +## Example + +```python +from platform_api_python_client.models.create_filesystem_volume_request import CreateFilesystemVolumeRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFilesystemVolumeRequest from a JSON string +create_filesystem_volume_request_instance = CreateFilesystemVolumeRequest.from_json(json) +# print the JSON string representation of the object +print(CreateFilesystemVolumeRequest.to_json()) + +# convert the object into a dict +create_filesystem_volume_request_dict = create_filesystem_volume_request_instance.to_dict() +# create an instance of CreateFilesystemVolumeRequest from a dict +create_filesystem_volume_request_from_dict = CreateFilesystemVolumeRequest.from_dict(create_filesystem_volume_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/DeploymentComponentType.md b/docs/DeploymentComponentType.md index 15238c5..69cc990 100644 --- a/docs/DeploymentComponentType.md +++ b/docs/DeploymentComponentType.md @@ -18,3 +18,5 @@ * `EPP` (value: `'epp'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index f73f3ef..c3d3d50 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -896,7 +896,7 @@ Name | Type | Description | Notes Create Volume Endpoint -Create a volume. Only the block backend is provisioned; object lands in CCL-147. +Create a volume. Only the filesystem backend is provisioned; object lands in CCL-147. ### Example diff --git a/docs/GetBlockVolumeResponse.md b/docs/GetFilesystemVolumeResponse.md similarity index 54% rename from docs/GetBlockVolumeResponse.md rename to docs/GetFilesystemVolumeResponse.md index 0a54087..bc3d6c5 100644 --- a/docs/GetBlockVolumeResponse.md +++ b/docs/GetFilesystemVolumeResponse.md @@ -1,4 +1,4 @@ -# GetBlockVolumeResponse +# GetFilesystemVolumeResponse ## Properties @@ -14,24 +14,25 @@ Name | Type | Description | Notes **pvc_name** | **str** | | **created_at** | **datetime** | | **size_gb** | **int** | | -**storage_class** | **str** | | +**storage_class** | **str** | | ## Example ```python -from platform_api_python_client.models.get_block_volume_response import GetBlockVolumeResponse +from platform_api_python_client.models.get_filesystem_volume_response import GetFilesystemVolumeResponse # TODO update the JSON string below json = "{}" -# create an instance of GetBlockVolumeResponse from a JSON string -get_block_volume_response_instance = GetBlockVolumeResponse.from_json(json) +# create an instance of GetFilesystemVolumeResponse from a JSON string +get_filesystem_volume_response_instance = GetFilesystemVolumeResponse.from_json(json) # print the JSON string representation of the object -print(GetBlockVolumeResponse.to_json()) +print(GetFilesystemVolumeResponse.to_json()) # convert the object into a dict -get_block_volume_response_dict = get_block_volume_response_instance.to_dict() -# create an instance of GetBlockVolumeResponse from a dict -get_block_volume_response_from_dict = GetBlockVolumeResponse.from_dict(get_block_volume_response_dict) +get_filesystem_volume_response_dict = get_filesystem_volume_response_instance.to_dict() +# create an instance of GetFilesystemVolumeResponse from a dict +get_filesystem_volume_response_from_dict = GetFilesystemVolumeResponse.from_dict(get_filesystem_volume_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/GetVolumeResponse.md b/docs/GetVolumeResponse.md index 4fef1ee..d0ae281 100644 --- a/docs/GetVolumeResponse.md +++ b/docs/GetVolumeResponse.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **pvc_name** | **str** | | **created_at** | **datetime** | | **size_gb** | **int** | | -**storage_class** | **str** | | +**storage_class** | **str** | | **provider** | [**ObjectStorageProvider**](ObjectStorageProvider.md) | | **bucket** | **str** | | **region** | **str** | | @@ -42,3 +42,4 @@ get_volume_response_from_dict = GetVolumeResponse.from_dict(get_volume_response_ ``` [[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/PodDetails.md b/docs/PodDetails.md index c5884d4..4dc8f3a 100644 --- a/docs/PodDetails.md +++ b/docs/PodDetails.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] **revision_number** | **int** | | [optional] -**component_type** | [**DeploymentComponentType**](DeploymentComponentType.md) | | [optional] +**component_type** | [**DeploymentComponentType**](DeploymentComponentType.md) | | [optional] **status** | [**PodStatus**](PodStatus.md) | | **error_message** | **str** | | [optional] @@ -29,3 +29,5 @@ pod_details_dict = pod_details_instance.to_dict() pod_details_from_dict = PodDetails.from_dict(pod_details_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/VolumeAccessMode.md b/docs/VolumeAccessMode.md index 48ac1f5..27fe5d3 100644 --- a/docs/VolumeAccessMode.md +++ b/docs/VolumeAccessMode.md @@ -3,8 +3,6 @@ ## Enum -* `READWRITEONCE` (value: `'ReadWriteOnce'`) - * `READWRITEMANY` (value: `'ReadWriteMany'`) [[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/VolumeBackend.md b/docs/VolumeBackend.md index bd4ff5e..370828f 100644 --- a/docs/VolumeBackend.md +++ b/docs/VolumeBackend.md @@ -3,7 +3,7 @@ ## Enum -* `BLOCK` (value: `'block'`) +* `FILESYSTEM` (value: `'filesystem'`) * `OBJECT` (value: `'object'`) diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index 416547b..4722f75 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.23.1" +__version__ = "4.24.0" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -45,7 +45,6 @@ from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse from platform_api_python_client.models.config_file_mount import ConfigFileMount -from platform_api_python_client.models.create_block_volume_request import CreateBlockVolumeRequest from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse from platform_api_python_client.models.create_c_serve_v3_deployment_request import CreateCServeV3DeploymentRequest from platform_api_python_client.models.create_c_serve_v3_deployment_response import CreateCServeV3DeploymentResponse @@ -53,6 +52,7 @@ from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse from platform_api_python_client.models.create_dynamo_deployment_request import CreateDynamoDeploymentRequest from platform_api_python_client.models.create_dynamo_deployment_response import CreateDynamoDeploymentResponse +from platform_api_python_client.models.create_filesystem_volume_request import CreateFilesystemVolumeRequest from platform_api_python_client.models.create_hardware_instance_request import CreateHardwareInstanceRequest from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse from platform_api_python_client.models.create_inference_v3_deployment_request import CreateInferenceV3DeploymentRequest @@ -79,7 +79,6 @@ from platform_api_python_client.models.final_stack import FinalStack from platform_api_python_client.models.fluent_bit import FluentBit from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse -from platform_api_python_client.models.get_block_volume_response import GetBlockVolumeResponse from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse from platform_api_python_client.models.get_cluster_response import GetClusterResponse @@ -89,6 +88,7 @@ from platform_api_python_client.models.get_deployment_revision_response import GetDeploymentRevisionResponse from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse from platform_api_python_client.models.get_dynamo_deployment_response import GetDynamoDeploymentResponse +from platform_api_python_client.models.get_filesystem_volume_response import GetFilesystemVolumeResponse from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse from platform_api_python_client.models.get_inference_v3_deployment_response import GetInferenceV3DeploymentResponse from platform_api_python_client.models.get_job_deployment_response import GetJobDeploymentResponse diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index 8ea1ec7..1bfc3b1 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -3073,7 +3073,7 @@ def create_volume_endpoint_volumes_post( ) -> GetVolumeResponse: """Create Volume Endpoint - Create a volume. Only the block backend is provisioned; object lands in CCL-147. + Create a volume. Only the filesystem backend is provisioned; object lands in CCL-147. :param create_volume_request: (required) :type create_volume_request: CreateVolumeRequest @@ -3141,7 +3141,7 @@ def create_volume_endpoint_volumes_post_with_http_info( ) -> ApiResponse[GetVolumeResponse]: """Create Volume Endpoint - Create a volume. Only the block backend is provisioned; object lands in CCL-147. + Create a volume. Only the filesystem backend is provisioned; object lands in CCL-147. :param create_volume_request: (required) :type create_volume_request: CreateVolumeRequest @@ -3209,7 +3209,7 @@ def create_volume_endpoint_volumes_post_without_preload_content( ) -> RESTResponseType: """Create Volume Endpoint - Create a volume. Only the block backend is provisioned; object lands in CCL-147. + Create a volume. Only the filesystem backend is provisioned; object lands in CCL-147. :param create_volume_request: (required) :type create_volume_request: CreateVolumeRequest @@ -5965,7 +5965,7 @@ def get_credits_credits_get( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreditsResponse: - """Get Credits + """(Deprecated) Get Credits :param _request_timeout: timeout setting for this request. If one @@ -5989,6 +5989,7 @@ def get_credits_credits_get( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /credits is deprecated.", DeprecationWarning) _param = self._get_credits_credits_get_serialize( _request_auth=_request_auth, @@ -6027,7 +6028,7 @@ def get_credits_credits_get_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreditsResponse]: - """Get Credits + """(Deprecated) Get Credits :param _request_timeout: timeout setting for this request. If one @@ -6051,6 +6052,7 @@ def get_credits_credits_get_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /credits is deprecated.", DeprecationWarning) _param = self._get_credits_credits_get_serialize( _request_auth=_request_auth, @@ -6089,7 +6091,7 @@ def get_credits_credits_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Credits + """(Deprecated) Get Credits :param _request_timeout: timeout setting for this request. If one @@ -6113,6 +6115,7 @@ def get_credits_credits_get_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /credits is deprecated.", DeprecationWarning) _param = self._get_credits_credits_get_serialize( _request_auth=_request_auth, @@ -10668,7 +10671,7 @@ def get_usage_daily_bills_get( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ListDailyBillResponse: - """Get Usage + """(Deprecated) Get Usage :param start_date: (required) @@ -10696,6 +10699,7 @@ def get_usage_daily_bills_get( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /daily_bills is deprecated.", DeprecationWarning) _param = self._get_usage_daily_bills_get_serialize( start_date=start_date, @@ -10739,7 +10743,7 @@ def get_usage_daily_bills_get_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ListDailyBillResponse]: - """Get Usage + """(Deprecated) Get Usage :param start_date: (required) @@ -10767,6 +10771,7 @@ def get_usage_daily_bills_get_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /daily_bills is deprecated.", DeprecationWarning) _param = self._get_usage_daily_bills_get_serialize( start_date=start_date, @@ -10810,7 +10815,7 @@ def get_usage_daily_bills_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Usage + """(Deprecated) Get Usage :param start_date: (required) @@ -10838,6 +10843,7 @@ def get_usage_daily_bills_get_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /daily_bills is deprecated.", DeprecationWarning) _param = self._get_usage_daily_bills_get_serialize( start_date=start_date, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 3d882c0..a5f3a1c 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.23.1/python' + self.user_agent = 'OpenAPI-Generator/4.24.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 ce69e3e..f704c6d 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.23.1".\ + "SDK Package Version: 4.24.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 d7bd6fe..8063991 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -28,7 +28,6 @@ from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse from platform_api_python_client.models.config_file_mount import ConfigFileMount -from platform_api_python_client.models.create_block_volume_request import CreateBlockVolumeRequest from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse from platform_api_python_client.models.create_c_serve_v3_deployment_request import CreateCServeV3DeploymentRequest from platform_api_python_client.models.create_c_serve_v3_deployment_response import CreateCServeV3DeploymentResponse @@ -36,6 +35,7 @@ from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse from platform_api_python_client.models.create_dynamo_deployment_request import CreateDynamoDeploymentRequest from platform_api_python_client.models.create_dynamo_deployment_response import CreateDynamoDeploymentResponse +from platform_api_python_client.models.create_filesystem_volume_request import CreateFilesystemVolumeRequest from platform_api_python_client.models.create_hardware_instance_request import CreateHardwareInstanceRequest from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse from platform_api_python_client.models.create_inference_v3_deployment_request import CreateInferenceV3DeploymentRequest @@ -62,7 +62,6 @@ from platform_api_python_client.models.final_stack import FinalStack from platform_api_python_client.models.fluent_bit import FluentBit from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse -from platform_api_python_client.models.get_block_volume_response import GetBlockVolumeResponse from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse from platform_api_python_client.models.get_cluster_response import GetClusterResponse @@ -72,6 +71,7 @@ from platform_api_python_client.models.get_deployment_revision_response import GetDeploymentRevisionResponse from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse from platform_api_python_client.models.get_dynamo_deployment_response import GetDynamoDeploymentResponse +from platform_api_python_client.models.get_filesystem_volume_response import GetFilesystemVolumeResponse from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse from platform_api_python_client.models.get_inference_v3_deployment_response import GetInferenceV3DeploymentResponse from platform_api_python_client.models.get_job_deployment_response import GetJobDeploymentResponse diff --git a/platform_api_python_client/models/create_block_volume_request.py b/platform_api_python_client/models/create_filesystem_volume_request.py similarity index 91% rename from platform_api_python_client/models/create_block_volume_request.py rename to platform_api_python_client/models/create_filesystem_volume_request.py index 6e277c1..6bae519 100644 --- a/platform_api_python_client/models/create_block_volume_request.py +++ b/platform_api_python_client/models/create_filesystem_volume_request.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class CreateBlockVolumeRequest(BaseModel): +class CreateFilesystemVolumeRequest(BaseModel): """ - CreateBlockVolumeRequest + CreateFilesystemVolumeRequest """ # noqa: E501 name: Annotated[str, Field(min_length=1, strict=True, max_length=20)] cluster_id: StrictInt @@ -44,8 +44,8 @@ def name_validate_regular_expression(cls, value): @field_validator('backend') def backend_validate_enum(cls, value): """Validates the enum""" - if value not in set(['block']): - raise ValueError("must be one of enum values ('block')") + if value not in set(['filesystem']): + raise ValueError("must be one of enum values ('filesystem')") return value @field_validator('storage_class') @@ -76,7 +76,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateBlockVolumeRequest from a JSON string""" + """Create an instance of CreateFilesystemVolumeRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -106,7 +106,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateBlockVolumeRequest from a dict""" + """Create an instance of CreateFilesystemVolumeRequest from a dict""" if obj is None: return None diff --git a/platform_api_python_client/models/create_volume_request.py b/platform_api_python_client/models/create_volume_request.py index fb1deea..be6d948 100644 --- a/platform_api_python_client/models/create_volume_request.py +++ b/platform_api_python_client/models/create_volume_request.py @@ -17,24 +17,24 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from platform_api_python_client.models.create_block_volume_request import CreateBlockVolumeRequest +from platform_api_python_client.models.create_filesystem_volume_request import CreateFilesystemVolumeRequest from platform_api_python_client.models.create_object_volume_request import CreateObjectVolumeRequest from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -CREATEVOLUMEREQUEST_ONE_OF_SCHEMAS = ["CreateBlockVolumeRequest", "CreateObjectVolumeRequest"] +CREATEVOLUMEREQUEST_ONE_OF_SCHEMAS = ["CreateFilesystemVolumeRequest", "CreateObjectVolumeRequest"] class CreateVolumeRequest(BaseModel): """ CreateVolumeRequest """ - # data type: CreateBlockVolumeRequest - oneof_schema_1_validator: Optional[CreateBlockVolumeRequest] = None + # data type: CreateFilesystemVolumeRequest + oneof_schema_1_validator: Optional[CreateFilesystemVolumeRequest] = None # data type: CreateObjectVolumeRequest oneof_schema_2_validator: Optional[CreateObjectVolumeRequest] = None - actual_instance: Optional[Union[CreateBlockVolumeRequest, CreateObjectVolumeRequest]] = None - one_of_schemas: Set[str] = { "CreateBlockVolumeRequest", "CreateObjectVolumeRequest" } + actual_instance: Optional[Union[CreateFilesystemVolumeRequest, CreateObjectVolumeRequest]] = None + one_of_schemas: Set[str] = { "CreateFilesystemVolumeRequest", "CreateObjectVolumeRequest" } model_config = ConfigDict( validate_assignment=True, @@ -60,9 +60,9 @@ def actual_instance_must_validate_oneof(cls, v): instance = CreateVolumeRequest.model_construct() error_messages = [] match = 0 - # validate data type: CreateBlockVolumeRequest - if not isinstance(v, CreateBlockVolumeRequest): - error_messages.append(f"Error! Input type `{type(v)}` is not `CreateBlockVolumeRequest`") + # validate data type: CreateFilesystemVolumeRequest + if not isinstance(v, CreateFilesystemVolumeRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateFilesystemVolumeRequest`") else: match += 1 # validate data type: CreateObjectVolumeRequest @@ -72,10 +72,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in CreateVolumeRequest with oneOf schemas: CreateBlockVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in CreateVolumeRequest with oneOf schemas: CreateFilesystemVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in CreateVolumeRequest with oneOf schemas: CreateBlockVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in CreateVolumeRequest with oneOf schemas: CreateFilesystemVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages)) else: return v @@ -90,9 +90,9 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into CreateBlockVolumeRequest + # deserialize data into CreateFilesystemVolumeRequest try: - instance.actual_instance = CreateBlockVolumeRequest.from_json(json_str) + instance.actual_instance = CreateFilesystemVolumeRequest.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) @@ -105,10 +105,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into CreateVolumeRequest with oneOf schemas: CreateBlockVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into CreateVolumeRequest with oneOf schemas: CreateFilesystemVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into CreateVolumeRequest with oneOf schemas: CreateBlockVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into CreateVolumeRequest with oneOf schemas: CreateFilesystemVolumeRequest, CreateObjectVolumeRequest. Details: " + ", ".join(error_messages)) else: return instance @@ -122,7 +122,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], CreateBlockVolumeRequest, CreateObjectVolumeRequest]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], CreateFilesystemVolumeRequest, CreateObjectVolumeRequest]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/platform_api_python_client/models/deployment_component_type.py b/platform_api_python_client/models/deployment_component_type.py index b2509e8..656f581 100644 --- a/platform_api_python_client/models/deployment_component_type.py +++ b/platform_api_python_client/models/deployment_component_type.py @@ -38,3 +38,5 @@ class DeploymentComponentType(str, Enum): def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentComponentType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/models/get_block_volume_response.py b/platform_api_python_client/models/get_filesystem_volume_response.py similarity index 90% rename from platform_api_python_client/models/get_block_volume_response.py rename to platform_api_python_client/models/get_filesystem_volume_response.py index 0afab61..15d4e63 100644 --- a/platform_api_python_client/models/get_block_volume_response.py +++ b/platform_api_python_client/models/get_filesystem_volume_response.py @@ -25,9 +25,9 @@ from typing import Optional, Set from typing_extensions import Self -class GetBlockVolumeResponse(BaseModel): +class GetFilesystemVolumeResponse(BaseModel): """ - GetBlockVolumeResponse + GetFilesystemVolumeResponse """ # noqa: E501 id: StrictInt name: StrictStr @@ -44,8 +44,8 @@ class GetBlockVolumeResponse(BaseModel): @field_validator('backend') def backend_validate_enum(cls, value): """Validates the enum""" - if value not in set(['block']): - raise ValueError("must be one of enum values ('block')") + if value not in set(['filesystem']): + raise ValueError("must be one of enum values ('filesystem')") return value model_config = ConfigDict( @@ -66,7 +66,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetBlockVolumeResponse from a JSON string""" + """Create an instance of GetFilesystemVolumeResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -91,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetBlockVolumeResponse from a dict""" + """Create an instance of GetFilesystemVolumeResponse from a dict""" if obj is None: return None diff --git a/platform_api_python_client/models/get_volume_response.py b/platform_api_python_client/models/get_volume_response.py index 8f2ff04..7e55499 100644 --- a/platform_api_python_client/models/get_volume_response.py +++ b/platform_api_python_client/models/get_volume_response.py @@ -17,24 +17,24 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from platform_api_python_client.models.get_block_volume_response import GetBlockVolumeResponse +from platform_api_python_client.models.get_filesystem_volume_response import GetFilesystemVolumeResponse from platform_api_python_client.models.get_object_volume_response import GetObjectVolumeResponse from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -GETVOLUMERESPONSE_ONE_OF_SCHEMAS = ["GetBlockVolumeResponse", "GetObjectVolumeResponse"] +GETVOLUMERESPONSE_ONE_OF_SCHEMAS = ["GetFilesystemVolumeResponse", "GetObjectVolumeResponse"] class GetVolumeResponse(BaseModel): """ GetVolumeResponse """ - # data type: GetBlockVolumeResponse - oneof_schema_1_validator: Optional[GetBlockVolumeResponse] = None + # data type: GetFilesystemVolumeResponse + oneof_schema_1_validator: Optional[GetFilesystemVolumeResponse] = None # data type: GetObjectVolumeResponse oneof_schema_2_validator: Optional[GetObjectVolumeResponse] = None - actual_instance: Optional[Union[GetBlockVolumeResponse, GetObjectVolumeResponse]] = None - one_of_schemas: Set[str] = { "GetBlockVolumeResponse", "GetObjectVolumeResponse" } + actual_instance: Optional[Union[GetFilesystemVolumeResponse, GetObjectVolumeResponse]] = None + one_of_schemas: Set[str] = { "GetFilesystemVolumeResponse", "GetObjectVolumeResponse" } model_config = ConfigDict( validate_assignment=True, @@ -60,9 +60,9 @@ def actual_instance_must_validate_oneof(cls, v): instance = GetVolumeResponse.model_construct() error_messages = [] match = 0 - # validate data type: GetBlockVolumeResponse - if not isinstance(v, GetBlockVolumeResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `GetBlockVolumeResponse`") + # validate data type: GetFilesystemVolumeResponse + if not isinstance(v, GetFilesystemVolumeResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `GetFilesystemVolumeResponse`") else: match += 1 # validate data type: GetObjectVolumeResponse @@ -72,10 +72,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetVolumeResponse with oneOf schemas: GetBlockVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in GetVolumeResponse with oneOf schemas: GetFilesystemVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in GetVolumeResponse with oneOf schemas: GetBlockVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in GetVolumeResponse with oneOf schemas: GetFilesystemVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages)) else: return v @@ -90,9 +90,9 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into GetBlockVolumeResponse + # deserialize data into GetFilesystemVolumeResponse try: - instance.actual_instance = GetBlockVolumeResponse.from_json(json_str) + instance.actual_instance = GetFilesystemVolumeResponse.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) @@ -105,10 +105,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetVolumeResponse with oneOf schemas: GetBlockVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into GetVolumeResponse with oneOf schemas: GetFilesystemVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into GetVolumeResponse with oneOf schemas: GetBlockVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into GetVolumeResponse with oneOf schemas: GetFilesystemVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages)) else: return instance @@ -122,7 +122,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], GetBlockVolumeResponse, GetObjectVolumeResponse]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], GetFilesystemVolumeResponse, GetObjectVolumeResponse]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/platform_api_python_client/models/volume_access_mode.py b/platform_api_python_client/models/volume_access_mode.py index 156a6d9..31d16fd 100644 --- a/platform_api_python_client/models/volume_access_mode.py +++ b/platform_api_python_client/models/volume_access_mode.py @@ -26,7 +26,6 @@ class VolumeAccessMode(str, Enum): """ allowed enum values """ - READWRITEONCE = 'ReadWriteOnce' READWRITEMANY = 'ReadWriteMany' @classmethod diff --git a/platform_api_python_client/models/volume_backend.py b/platform_api_python_client/models/volume_backend.py index 1f319ce..cd4aef7 100644 --- a/platform_api_python_client/models/volume_backend.py +++ b/platform_api_python_client/models/volume_backend.py @@ -26,7 +26,7 @@ class VolumeBackend(str, Enum): """ allowed enum values """ - BLOCK = 'block' + FILESYSTEM = 'filesystem' OBJECT = 'object' @classmethod diff --git a/pyproject.toml b/pyproject.toml index 0a33d68..c169c45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.23.1" +version = "4.24.0" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 9e254ed..772b293 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.23.1" +VERSION = "4.24.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_create_block_volume_request.py b/test/test_create_filesystem_volume_request.py similarity index 82% rename from test/test_create_block_volume_request.py rename to test/test_create_filesystem_volume_request.py index 156337c..d6f1def 100644 --- a/test/test_create_block_volume_request.py +++ b/test/test_create_filesystem_volume_request.py @@ -14,10 +14,10 @@ import unittest -from platform_api_python_client.models.create_block_volume_request import CreateBlockVolumeRequest +from platform_api_python_client.models.create_filesystem_volume_request import CreateFilesystemVolumeRequest -class TestCreateBlockVolumeRequest(unittest.TestCase): - """CreateBlockVolumeRequest unit test stubs""" +class TestCreateFilesystemVolumeRequest(unittest.TestCase): + """CreateFilesystemVolumeRequest unit test stubs""" def setUp(self): pass @@ -25,32 +25,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateBlockVolumeRequest: - """Test CreateBlockVolumeRequest + def make_instance(self, include_optional) -> CreateFilesystemVolumeRequest: + """Test CreateFilesystemVolumeRequest 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 `CreateBlockVolumeRequest` + # uncomment below to create an instance of `CreateFilesystemVolumeRequest` """ - model = CreateBlockVolumeRequest() + model = CreateFilesystemVolumeRequest() if include_optional: - return CreateBlockVolumeRequest( + return CreateFilesystemVolumeRequest( name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, - backend = 'block', + backend = 'filesystem', size_gb = 1.0, storage_class = 'w1c2v7s6djuy1zmetozkhdomha1bae37b8ocvx8o53ow2eg7p6qw9qklp6l4y010fogx.mjvnh6nzn2yp6d7tmo7zxedi-pkbmhcbu-4d4ncp9sp-gpju7f9r1ly-n2jyba-zuswj171d3kxld4uyykb66fgvcwlw.s.p6div96l1hmssf5by0949ps5we2h1m5s.4.7ftu50o3hq25-ctix-xt8fyuzw85-6ya.ezgfzdm4groy.ccn4nxdzyngfr2bsdqi-90qr77qnqf26kpzuf5a652r9yc8wgc.uoko8ht4bjsb-86ca0gq8ejs584qp107f5qv9ze3gk7q64-5mecujmelufynb1wtb8v2n1x9-y9o36a.uqixpalso4ehay1yebs1kiembt-homr2.864bew-vpjuuty7-xv4qjygg3hwqd-5gynywalvhvvesyveyxp35spjahpsiagrj0jehh3a3x8z9axqtswj383252z.d6d4ifob3rgi7j1fao-vb9l55lz.bsk1mqype9zx3n6q-u55t879v1lf.1.k.isf-swgdlh.0.m4u5aoqakjc4xlcmbpoy4ndizk4s3cdhxttexawd8mnl6e4uzxalowdqy9rokd32ct-w5p-yt-emwrzfi.lulqkw0osnqktff9fp6xbt97440w4wt3xjayovyb7flljlnosgtrofp.o.j.p5-2p577rg1fwny6cq1e2d3p5aa62rscqk6cxzeqcrvjnbqd52lumjr3qda19c-7skjef4ovphp57sme4j.v.ex0xp4ft9xd1-4zvmus0m5p.v0h-jlvu47xor814uas43gvg7px7mohsvz1n3b561az73nipt-so37iphbtnhmw48ibn.m.bk41trymo7d0ea3vl3k8vn3ygn2a7ps3-pdkhjjxrdr3lz6urrzqtzh9wngf-95dvz5km9h9e5j8vg6kx1nnqzi442akggqdhy6.i.gupb4cz72xp4qgqp5jsd55qux2vq83uq1j9iy-qb4bt8kb625gpncppm1zw5yrhj.5q6soeyc3hzdpj1thb.b.b5xq79rwp3km1p11ikuwgghy12wdp5xrrsyrsnl7yjolek10nb0oh.h.x.2h707s1vjswprq6au.xucdr85u0erh5dfg2hvs9u7vn0y8ci0w5cs0m66nvcce2fr52dkbd9-7klkniu5cpn6qugmep5e6p9gx9creyetm.2sgithzei3bx4-4ox6m2aiffxmcwza92oxtwxs76a.s.z.im-3mvtf47ak-ld.a.2elgcf13ovinqusgnnclaaotmbqdseafe1dkj6zg4q-zexx0zm-n.j3-w17r6rxur1pbea75jjl8lv5xitcozp.c.h.61bftab5cre-v.9.v.s.fyenvbtf508c5c3k.mghqe7lyva958ar2bzuf2507k602lnujv0ps2icyh27nxstaqbg38m0hpe.g.bg8n69rdva8j104ap-cf1p9yc1ijk9np17sjmh2tukz4atwz0044pdhk9pk1eft1nod0p9-vepbljhwtpf-qd2ysm1.3tiane3jk-09bf0q3dbgqocrp16dzj0xk-uyej17sd81mbgu820re53g21e779vy6.z.rm8pn0xdthfd9cqpo9sslxeml661r0eol4jypf6mdna86sfgz92k.y-52xiufg9mfli1bjvsy947g3cz7wufbd001uiwvuaxblt37i0ah0z6f6qhqwar1c3r14v-vt3pd5kbrrs94okiob2jznknec6ky.3.d.dgp-oapce410llsnx-m--ufb725icarr8pijimdu9gxv3p7744x7btxc9-zq66zjny7rvcbdfcl-7ksv-awu1ddn3dlag.1cg4obm9r3waeqrdsk53.1.q.k.w.gz5qwr2rjf1o2625v873inyqekdlul-2yu96dhuposmz433w4216crklr6.5ifmkesrrzj9hbtdyamuoxl0l1gb0vgsms5ou3nfhhnvvfktn2uyclzyqvy90vz11a6oipnv4tno7.z.t.u4pfk1y-f41a9ekyw5sfqgxxg2436imo6t94jmeph0msaf6p04q5p6z75n97ibih9ynp9w52m2.7bh985by7-jms7z9rzl84e9iub-3gwwq4fe81bi2bmela-4-ti6-mqq-em0m73ls976osz80kxxj.x.jxe4zxgit8guso2bynf9xkxywffvyznse5yovoes9zqhgf9wk74po4qj1hri4b.06kv2f-9nff.ejas130ndgnxp85h0saokre-wcp8nl4iio.g.z8c-0hnu2tn0fal1tsn8phrmhzoys2l25i7fgxqn8.w.w.z0' ) else: - return CreateBlockVolumeRequest( + return CreateFilesystemVolumeRequest( name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, - backend = 'block', + backend = 'filesystem', ) """ - def testCreateBlockVolumeRequest(self): - """Test CreateBlockVolumeRequest""" + def testCreateFilesystemVolumeRequest(self): + """Test CreateFilesystemVolumeRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_deployment_status_v3_response.py b/test/test_deployment_status_v3_response.py index e9d22e9..b707f0b 100644 --- a/test/test_deployment_status_v3_response.py +++ b/test/test_deployment_status_v3_response.py @@ -48,7 +48,7 @@ def make_instance(self, include_optional) -> DeploymentStatusV3Response: platform_api_python_client.models.pod_details.PodDetails( name = '', revision_number = 56, - component_type = 'user-container', + component_type = 'user-container', status = 'ScalingUp', error_message = '', ) ], diff --git a/test/test_get_block_volume_response.py b/test/test_get_filesystem_volume_response.py similarity index 64% rename from test/test_get_block_volume_response.py rename to test/test_get_filesystem_volume_response.py index 9351ecf..231d418 100644 --- a/test/test_get_block_volume_response.py +++ b/test/test_get_filesystem_volume_response.py @@ -14,10 +14,10 @@ import unittest -from platform_api_python_client.models.get_block_volume_response import GetBlockVolumeResponse +from platform_api_python_client.models.get_filesystem_volume_response import GetFilesystemVolumeResponse -class TestGetBlockVolumeResponse(unittest.TestCase): - """GetBlockVolumeResponse unit test stubs""" +class TestGetFilesystemVolumeResponse(unittest.TestCase): + """GetFilesystemVolumeResponse unit test stubs""" def setUp(self): pass @@ -25,21 +25,21 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> GetBlockVolumeResponse: - """Test GetBlockVolumeResponse + def make_instance(self, include_optional) -> GetFilesystemVolumeResponse: + """Test GetFilesystemVolumeResponse 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 `GetBlockVolumeResponse` + # uncomment below to create an instance of `GetFilesystemVolumeResponse` """ - model = GetBlockVolumeResponse() + model = GetFilesystemVolumeResponse() if include_optional: - return GetBlockVolumeResponse( + return GetFilesystemVolumeResponse( id = 56, name = '', cluster_id = 56, - backend = 'block', - access_mode = 'ReadWriteOnce', + backend = 'filesystem', + access_mode = 'ReadWriteMany', status = 'active', pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -47,12 +47,12 @@ def make_instance(self, include_optional) -> GetBlockVolumeResponse: storage_class = '' ) else: - return GetBlockVolumeResponse( + return GetFilesystemVolumeResponse( id = 56, name = '', cluster_id = 56, - backend = 'block', - access_mode = 'ReadWriteOnce', + backend = 'filesystem', + access_mode = 'ReadWriteMany', status = 'active', pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -61,8 +61,8 @@ def make_instance(self, include_optional) -> GetBlockVolumeResponse: ) """ - def testGetBlockVolumeResponse(self): - """Test GetBlockVolumeResponse""" + def testGetFilesystemVolumeResponse(self): + """Test GetFilesystemVolumeResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_get_object_volume_response.py b/test/test_get_object_volume_response.py index e2d5f99..f3bb868 100644 --- a/test/test_get_object_volume_response.py +++ b/test/test_get_object_volume_response.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> GetObjectVolumeResponse: name = '', cluster_id = 56, backend = 'object', - access_mode = 'ReadWriteOnce', + access_mode = 'ReadWriteMany', status = 'active', pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -61,7 +61,7 @@ def make_instance(self, include_optional) -> GetObjectVolumeResponse: name = '', cluster_id = 56, backend = 'object', - access_mode = 'ReadWriteOnce', + access_mode = 'ReadWriteMany', status = 'active', pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), diff --git a/test/test_get_volume_response.py b/test/test_get_volume_response.py index 962f58f..c5c8d74 100644 --- a/test/test_get_volume_response.py +++ b/test/test_get_volume_response.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> GetVolumeResponse: name = '', cluster_id = 56, backend = 'object', - access_mode = 'ReadWriteOnce', + access_mode = 'ReadWriteMany', status = 'active', pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -63,7 +63,7 @@ def make_instance(self, include_optional) -> GetVolumeResponse: name = '', cluster_id = 56, backend = 'object', - access_mode = 'ReadWriteOnce', + access_mode = 'ReadWriteMany', status = 'active', pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), diff --git a/test/test_revision_pod_details.py b/test/test_revision_pod_details.py index 6827031..c984708 100644 --- a/test/test_revision_pod_details.py +++ b/test/test_revision_pod_details.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> RevisionPodDetails: platform_api_python_client.models.pod_details.PodDetails( name = '', revision_number = 56, - component_type = 'user-container', + component_type = 'user-container', status = 'ScalingUp', error_message = '', ) ], diff --git a/test/test_volume_status_response.py b/test/test_volume_status_response.py index 5189953..b01457f 100644 --- a/test/test_volume_status_response.py +++ b/test/test_volume_status_response.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> VolumeStatusResponse: if include_optional: return VolumeStatusResponse( id = 56, - backend = 'block', + backend = 'filesystem', status = 'active', service_status = 'Healthy', error_message = '' @@ -44,7 +44,7 @@ def make_instance(self, include_optional) -> VolumeStatusResponse: else: return VolumeStatusResponse( id = 56, - backend = 'block', + backend = 'filesystem', status = 'active', ) """