From 45a29a31d8f7ff314d89b60f0d3a9bfdc6e60923 Mon Sep 17 00:00:00 2001 From: platform CI Date: Wed, 29 Jul 2026 15:55:01 +0000 Subject: [PATCH] Update clients to latest platform release (4.23.0) --- README.md | 5 +- docs/CreateBlockVolumeRequest.md | 1 + docs/CreateVolumeRequest.md | 1 + docs/EXTERNALApi.md | 84 +++++- docs/GetBlockVolumeResponse.md | 2 +- docs/GetVolumeResponse.md | 2 +- docs/PodDetails.md | 2 +- docs/VolumeBackend.md | 12 + docs/VolumeStatusResponse.md | 33 +++ platform_api_python_client/__init__.py | 4 +- .../api/external_api.py | 277 +++++++++++++++++- platform_api_python_client/api_client.py | 2 +- platform_api_python_client/configuration.py | 2 +- platform_api_python_client/models/__init__.py | 2 + .../models/create_block_volume_request.py | 21 +- .../models/get_block_volume_response.py | 6 +- .../models/pod_details.py | 9 +- .../models/volume_backend.py | 37 +++ .../models/volume_status_response.py | 108 +++++++ pyproject.toml | 2 +- setup.py | 2 +- test/test_create_block_volume_request.py | 3 +- test/test_create_volume_request.py | 1 + test/test_deployment_status_v3_response.py | 1 + test/test_external_api.py | 7 + test/test_get_block_volume_response.py | 4 +- test/test_get_volume_response.py | 2 + test/test_pod_details.py | 1 + test/test_revision_pod_details.py | 1 + test/test_volume_backend.py | 33 +++ test/test_volume_status_response.py | 58 ++++ 31 files changed, 701 insertions(+), 24 deletions(-) create mode 100644 docs/VolumeBackend.md create mode 100644 docs/VolumeStatusResponse.md create mode 100644 platform_api_python_client/models/volume_backend.py create mode 100644 platform_api_python_client/models/volume_status_response.py create mode 100644 test/test_volume_backend.py create mode 100644 test/test_volume_status_response.py diff --git a/README.md b/README.md index 690f980..1b7ee42 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.22.1 +- Package version: 4.23.0 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -136,6 +136,7 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**get_usage_daily_bills_get**](docs/EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage *EXTERNALApi* | [**get_usage_deployments_usage_deployment_id_get**](docs/EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage *EXTERNALApi* | [**get_volume_endpoint_volumes_volume_id_get**](docs/EXTERNALApi.md#get_volume_endpoint_volumes_volume_id_get) | **GET** /volumes/{volume_id} | Get Volume Endpoint +*EXTERNALApi* | [**get_volume_status_endpoint_volumes_status_volume_id_get**](docs/EXTERNALApi.md#get_volume_status_endpoint_volumes_status_volume_id_get) | **GET** /volumes/status/{volume_id} | Get Volume Status Endpoint *EXTERNALApi* | [**invite_user_organizations_invite_post**](docs/EXTERNALApi.md#invite_user_organizations_invite_post) | **POST** /organizations/invite | Invite User *EXTERNALApi* | [**list_cluster_capacity_capacity_get**](docs/EXTERNALApi.md#list_cluster_capacity_capacity_get) | **GET** /capacity | List Cluster Capacity *EXTERNALApi* | [**list_service_accounts_service_accounts_get**](docs/EXTERNALApi.md#list_service_accounts_service_accounts_get) | **GET** /service-accounts | List Service Accounts @@ -270,7 +271,9 @@ Class | Method | HTTP request | Description - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) - [VaultScope](docs/VaultScope.md) - [VolumeAccessMode](docs/VolumeAccessMode.md) + - [VolumeBackend](docs/VolumeBackend.md) - [VolumeStatus](docs/VolumeStatus.md) + - [VolumeStatusResponse](docs/VolumeStatusResponse.md) diff --git a/docs/CreateBlockVolumeRequest.md b/docs/CreateBlockVolumeRequest.md index 9b09235..ec56648 100644 --- a/docs/CreateBlockVolumeRequest.md +++ b/docs/CreateBlockVolumeRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **cluster_id** | **int** | | **backend** | **str** | | **size_gb** | **int** | | [optional] [default to 100] +**storage_class** | **str** | | [optional] ## Example diff --git a/docs/CreateVolumeRequest.md b/docs/CreateVolumeRequest.md index 081b18b..f967faa 100644 --- a/docs/CreateVolumeRequest.md +++ b/docs/CreateVolumeRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **cluster_id** | **int** | | **backend** | **str** | | **size_gb** | **int** | | [optional] [default to 100] +**storage_class** | **str** | | [optional] **provider** | [**ObjectStorageProvider**](ObjectStorageProvider.md) | | [optional] **bucket** | **str** | | **region** | **str** | | diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index 709df88..f73f3ef 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -46,6 +46,7 @@ Method | HTTP request | Description [**get_usage_daily_bills_get**](EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage [**get_usage_deployments_usage_deployment_id_get**](EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage [**get_volume_endpoint_volumes_volume_id_get**](EXTERNALApi.md#get_volume_endpoint_volumes_volume_id_get) | **GET** /volumes/{volume_id} | Get Volume Endpoint +[**get_volume_status_endpoint_volumes_status_volume_id_get**](EXTERNALApi.md#get_volume_status_endpoint_volumes_status_volume_id_get) | **GET** /volumes/status/{volume_id} | Get Volume Status Endpoint [**invite_user_organizations_invite_post**](EXTERNALApi.md#invite_user_organizations_invite_post) | **POST** /organizations/invite | Invite User [**list_cluster_capacity_capacity_get**](EXTERNALApi.md#list_cluster_capacity_capacity_get) | **GET** /capacity | List Cluster Capacity [**list_service_accounts_service_accounts_get**](EXTERNALApi.md#list_service_accounts_service_accounts_get) | **GET** /service-accounts | List Service Accounts @@ -895,7 +896,7 @@ Name | Type | Description | Notes Create Volume Endpoint -Create a volume. The backend field selects block (RWO) or object (RWX) storage. +Create a volume. Only the block backend is provisioned; object lands in CCL-147. ### Example @@ -1278,7 +1279,7 @@ Name | Type | Description | Notes Delete Volume Endpoint -Delete a volume. Only the owner or an admin with admin:manage_volumes may delete. +Delete a volume: tear down its ArgoCD app (and PVC) if reachable, then soft-delete the row. Only the owner or an admin with admin:manage_volumes may delete. ### Example @@ -3319,6 +3320,85 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_volume_status_endpoint_volumes_status_volume_id_get** +> VolumeStatusResponse get_volume_status_endpoint_volumes_status_volume_id_get(volume_id) + +Get Volume Status Endpoint + +Live volume status: status is the stored intent, service_status is computed from the volume app's health and PVC phase. + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.volume_status_response import VolumeStatusResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + volume_id = 56 # int | + + try: + # Get Volume Status Endpoint + api_response = api_instance.get_volume_status_endpoint_volumes_status_volume_id_get(volume_id) + print("The response of EXTERNALApi->get_volume_status_endpoint_volumes_status_volume_id_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->get_volume_status_endpoint_volumes_status_volume_id_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **volume_id** | **int**| | + +### Return type + +[**VolumeStatusResponse**](VolumeStatusResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **invite_user_organizations_invite_post** > object invite_user_organizations_invite_post(invite_user_request) diff --git a/docs/GetBlockVolumeResponse.md b/docs/GetBlockVolumeResponse.md index 2e9cb9f..0a54087 100644 --- a/docs/GetBlockVolumeResponse.md +++ b/docs/GetBlockVolumeResponse.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **pvc_name** | **str** | | **created_at** | **datetime** | | **size_gb** | **int** | | +**storage_class** | **str** | | ## Example @@ -34,4 +35,3 @@ get_block_volume_response_from_dict = GetBlockVolumeResponse.from_dict(get_block ``` [[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 b81cd75..4fef1ee 100644 --- a/docs/GetVolumeResponse.md +++ b/docs/GetVolumeResponse.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **pvc_name** | **str** | | **created_at** | **datetime** | | **size_gb** | **int** | | +**storage_class** | **str** | | **provider** | [**ObjectStorageProvider**](ObjectStorageProvider.md) | | **bucket** | **str** | | **region** | **str** | | @@ -41,4 +42,3 @@ 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 f62ec38..9944a92 100644 --- a/docs/PodDetails.md +++ b/docs/PodDetails.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] **revision_number** | **int** | | [optional] +**component_type** | **str** | | [optional] **status** | [**PodStatus**](PodStatus.md) | | **error_message** | **str** | | [optional] @@ -29,4 +30,3 @@ 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/VolumeBackend.md b/docs/VolumeBackend.md new file mode 100644 index 0000000..bd4ff5e --- /dev/null +++ b/docs/VolumeBackend.md @@ -0,0 +1,12 @@ +# VolumeBackend + + +## Enum + +* `BLOCK` (value: `'block'`) + +* `OBJECT` (value: `'object'`) + +[[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/VolumeStatusResponse.md b/docs/VolumeStatusResponse.md new file mode 100644 index 0000000..508c1fc --- /dev/null +++ b/docs/VolumeStatusResponse.md @@ -0,0 +1,33 @@ +# VolumeStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**backend** | [**VolumeBackend**](VolumeBackend.md) | | +**status** | [**VolumeStatus**](VolumeStatus.md) | | +**service_status** | [**ServiceStatus**](ServiceStatus.md) | | [optional] +**error_message** | **str** | | [optional] + +## Example + +```python +from platform_api_python_client.models.volume_status_response import VolumeStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of VolumeStatusResponse from a JSON string +volume_status_response_instance = VolumeStatusResponse.from_json(json) +# print the JSON string representation of the object +print(VolumeStatusResponse.to_json()) + +# convert the object into a dict +volume_status_response_dict = volume_status_response_instance.to_dict() +# create an instance of VolumeStatusResponse from a dict +volume_status_response_from_dict = VolumeStatusResponse.from_dict(volume_status_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index 8b56adb..f149cf6 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.22.1" +__version__ = "4.23.0" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -145,4 +145,6 @@ from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner from platform_api_python_client.models.vault_scope import VaultScope from platform_api_python_client.models.volume_access_mode import VolumeAccessMode +from platform_api_python_client.models.volume_backend import VolumeBackend from platform_api_python_client.models.volume_status import VolumeStatus +from platform_api_python_client.models.volume_status_response import VolumeStatusResponse diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index 8e49fcc..8ea1ec7 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -78,6 +78,7 @@ from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType +from platform_api_python_client.models.volume_status_response import VolumeStatusResponse from platform_api_python_client.api_client import ApiClient, RequestSerialized from platform_api_python_client.api_response import ApiResponse @@ -3072,7 +3073,7 @@ def create_volume_endpoint_volumes_post( ) -> GetVolumeResponse: """Create Volume Endpoint - Create a volume. The backend field selects block (RWO) or object (RWX) storage. + Create a volume. Only the block backend is provisioned; object lands in CCL-147. :param create_volume_request: (required) :type create_volume_request: CreateVolumeRequest @@ -3140,7 +3141,7 @@ def create_volume_endpoint_volumes_post_with_http_info( ) -> ApiResponse[GetVolumeResponse]: """Create Volume Endpoint - Create a volume. The backend field selects block (RWO) or object (RWX) storage. + Create a volume. Only the block backend is provisioned; object lands in CCL-147. :param create_volume_request: (required) :type create_volume_request: CreateVolumeRequest @@ -3208,7 +3209,7 @@ def create_volume_endpoint_volumes_post_without_preload_content( ) -> RESTResponseType: """Create Volume Endpoint - Create a volume. The backend field selects block (RWO) or object (RWX) storage. + Create a volume. Only the block backend is provisioned; object lands in CCL-147. :param create_volume_request: (required) :type create_volume_request: CreateVolumeRequest @@ -4409,7 +4410,7 @@ def delete_volume_endpoint_volumes_volume_id_delete( ) -> object: """Delete Volume Endpoint - Delete a volume. Only the owner or an admin with admin:manage_volumes may delete. + Delete a volume: tear down its ArgoCD app (and PVC) if reachable, then soft-delete the row. Only the owner or an admin with admin:manage_volumes may delete. :param volume_id: (required) :type volume_id: int @@ -4477,7 +4478,7 @@ def delete_volume_endpoint_volumes_volume_id_delete_with_http_info( ) -> ApiResponse[object]: """Delete Volume Endpoint - Delete a volume. Only the owner or an admin with admin:manage_volumes may delete. + Delete a volume: tear down its ArgoCD app (and PVC) if reachable, then soft-delete the row. Only the owner or an admin with admin:manage_volumes may delete. :param volume_id: (required) :type volume_id: int @@ -4545,7 +4546,7 @@ def delete_volume_endpoint_volumes_volume_id_delete_without_preload_content( ) -> RESTResponseType: """Delete Volume Endpoint - Delete a volume. Only the owner or an admin with admin:manage_volumes may delete. + Delete a volume: tear down its ArgoCD app (and PVC) if reachable, then soft-delete the row. Only the owner or an admin with admin:manage_volumes may delete. :param volume_id: (required) :type volume_id: int @@ -11540,6 +11541,270 @@ def _get_volume_endpoint_volumes_volume_id_get_serialize( + @validate_call + def get_volume_status_endpoint_volumes_status_volume_id_get( + self, + volume_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VolumeStatusResponse: + """Get Volume Status Endpoint + + Live volume status: status is the stored intent, service_status is computed from the volume app's health and PVC phase. + + :param volume_id: (required) + :type volume_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_volume_status_endpoint_volumes_status_volume_id_get_serialize( + volume_id=volume_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VolumeStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_volume_status_endpoint_volumes_status_volume_id_get_with_http_info( + self, + volume_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VolumeStatusResponse]: + """Get Volume Status Endpoint + + Live volume status: status is the stored intent, service_status is computed from the volume app's health and PVC phase. + + :param volume_id: (required) + :type volume_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_volume_status_endpoint_volumes_status_volume_id_get_serialize( + volume_id=volume_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VolumeStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_volume_status_endpoint_volumes_status_volume_id_get_without_preload_content( + self, + volume_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Volume Status Endpoint + + Live volume status: status is the stored intent, service_status is computed from the volume app's health and PVC phase. + + :param volume_id: (required) + :type volume_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_volume_status_endpoint_volumes_status_volume_id_get_serialize( + volume_id=volume_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VolumeStatusResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_volume_status_endpoint_volumes_status_volume_id_get_serialize( + self, + volume_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if volume_id is not None: + _path_params['volume_id'] = volume_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/volumes/status/{volume_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def invite_user_organizations_invite_post( self, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 867e8d7..d78655e 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.22.1/python' + self.user_agent = 'OpenAPI-Generator/4.23.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 1c9db91..5f17ff3 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.22.1".\ + "SDK Package Version: 4.23.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 a3426b8..fd8ac52 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -128,4 +128,6 @@ from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner from platform_api_python_client.models.vault_scope import VaultScope from platform_api_python_client.models.volume_access_mode import VolumeAccessMode +from platform_api_python_client.models.volume_backend import VolumeBackend from platform_api_python_client.models.volume_status import VolumeStatus +from platform_api_python_client.models.volume_status_response import VolumeStatusResponse diff --git a/platform_api_python_client/models/create_block_volume_request.py b/platform_api_python_client/models/create_block_volume_request.py index 0a365e8..6e277c1 100644 --- a/platform_api_python_client/models/create_block_volume_request.py +++ b/platform_api_python_client/models/create_block_volume_request.py @@ -31,7 +31,8 @@ class CreateBlockVolumeRequest(BaseModel): cluster_id: StrictInt backend: StrictStr size_gb: Optional[Annotated[int, Field(le=65536, strict=True, ge=1)]] = 100 - __properties: ClassVar[List[str]] = ["name", "cluster_id", "backend", "size_gb"] + storage_class: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = None + __properties: ClassVar[List[str]] = ["name", "cluster_id", "backend", "size_gb", "storage_class"] @field_validator('name') def name_validate_regular_expression(cls, value): @@ -47,6 +48,16 @@ def backend_validate_enum(cls, value): raise ValueError("must be one of enum values ('block')") return value + @field_validator('storage_class') + def storage_class_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", value): + raise ValueError(r"must validate the regular expression /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -86,6 +97,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if storage_class (nullable) is None + # and model_fields_set contains the field + if self.storage_class is None and "storage_class" in self.model_fields_set: + _dict['storage_class'] = None + return _dict @classmethod @@ -101,7 +117,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "cluster_id": obj.get("cluster_id"), "backend": obj.get("backend"), - "size_gb": obj.get("size_gb") if obj.get("size_gb") is not None else 100 + "size_gb": obj.get("size_gb") if obj.get("size_gb") is not None else 100, + "storage_class": obj.get("storage_class") }) return _obj diff --git a/platform_api_python_client/models/get_block_volume_response.py b/platform_api_python_client/models/get_block_volume_response.py index 0ee3943..0afab61 100644 --- a/platform_api_python_client/models/get_block_volume_response.py +++ b/platform_api_python_client/models/get_block_volume_response.py @@ -38,7 +38,8 @@ class GetBlockVolumeResponse(BaseModel): pvc_name: StrictStr created_at: datetime size_gb: StrictInt - __properties: ClassVar[List[str]] = ["id", "name", "cluster_id", "backend", "access_mode", "status", "pvc_name", "created_at", "size_gb"] + storage_class: StrictStr + __properties: ClassVar[List[str]] = ["id", "name", "cluster_id", "backend", "access_mode", "status", "pvc_name", "created_at", "size_gb", "storage_class"] @field_validator('backend') def backend_validate_enum(cls, value): @@ -106,7 +107,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "pvc_name": obj.get("pvc_name"), "created_at": obj.get("created_at"), - "size_gb": obj.get("size_gb") + "size_gb": obj.get("size_gb"), + "storage_class": obj.get("storage_class") }) return _obj diff --git a/platform_api_python_client/models/pod_details.py b/platform_api_python_client/models/pod_details.py index 85b8209..dca15b0 100644 --- a/platform_api_python_client/models/pod_details.py +++ b/platform_api_python_client/models/pod_details.py @@ -29,9 +29,10 @@ class PodDetails(BaseModel): """ # noqa: E501 name: Optional[StrictStr] = None revision_number: Optional[StrictInt] = None + component_type: Optional[StrictStr] = None status: PodStatus error_message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["name", "revision_number", "status", "error_message"] + __properties: ClassVar[List[str]] = ["name", "revision_number", "component_type", "status", "error_message"] model_config = ConfigDict( populate_by_name=True, @@ -82,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]: if self.revision_number is None and "revision_number" in self.model_fields_set: _dict['revision_number'] = None + # set to None if component_type (nullable) is None + # and model_fields_set contains the field + if self.component_type is None and "component_type" in self.model_fields_set: + _dict['component_type'] = None + # set to None if error_message (nullable) is None # and model_fields_set contains the field if self.error_message is None and "error_message" in self.model_fields_set: @@ -101,6 +107,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), "revision_number": obj.get("revision_number"), + "component_type": obj.get("component_type"), "status": obj.get("status"), "error_message": obj.get("error_message") }) diff --git a/platform_api_python_client/models/volume_backend.py b/platform_api_python_client/models/volume_backend.py new file mode 100644 index 0000000..1f319ce --- /dev/null +++ b/platform_api_python_client/models/volume_backend.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class VolumeBackend(str, Enum): + """ + VolumeBackend + """ + + """ + allowed enum values + """ + BLOCK = 'block' + OBJECT = 'object' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of VolumeBackend from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/platform_api_python_client/models/volume_status_response.py b/platform_api_python_client/models/volume_status_response.py new file mode 100644 index 0000000..24259c7 --- /dev/null +++ b/platform_api_python_client/models/volume_status_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.service_status import ServiceStatus +from platform_api_python_client.models.volume_backend import VolumeBackend +from platform_api_python_client.models.volume_status import VolumeStatus +from typing import Optional, Set +from typing_extensions import Self + +class VolumeStatusResponse(BaseModel): + """ + VolumeStatusResponse + """ # noqa: E501 + id: StrictInt + backend: VolumeBackend + status: VolumeStatus + service_status: Optional[ServiceStatus] = None + error_message: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "backend", "status", "service_status", "error_message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VolumeStatusResponse 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 service_status (nullable) is None + # and model_fields_set contains the field + if self.service_status is None and "service_status" in self.model_fields_set: + _dict['service_status'] = None + + # set to None if error_message (nullable) is None + # and model_fields_set contains the field + if self.error_message is None and "error_message" in self.model_fields_set: + _dict['error_message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VolumeStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "backend": obj.get("backend"), + "status": obj.get("status"), + "service_status": obj.get("service_status"), + "error_message": obj.get("error_message") + }) + return _obj + + diff --git a/pyproject.toml b/pyproject.toml index 31d5cf4..62d21a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.22.1" +version = "4.23.0" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 4293b5b..329a777 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.22.1" +VERSION = "4.23.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_block_volume_request.py index 7ee1b3e..156337c 100644 --- a/test/test_create_block_volume_request.py +++ b/test/test_create_block_volume_request.py @@ -38,7 +38,8 @@ def make_instance(self, include_optional) -> CreateBlockVolumeRequest: name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, backend = 'block', - size_gb = 1.0 + 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( diff --git a/test/test_create_volume_request.py b/test/test_create_volume_request.py index 85578ba..403ee5c 100644 --- a/test/test_create_volume_request.py +++ b/test/test_create_volume_request.py @@ -39,6 +39,7 @@ def make_instance(self, include_optional) -> CreateVolumeRequest: cluster_id = 56, backend = 'object', 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', provider = 's3', bucket = '012', region = '0', diff --git a/test/test_deployment_status_v3_response.py b/test/test_deployment_status_v3_response.py index c5538bd..5b3459e 100644 --- a/test/test_deployment_status_v3_response.py +++ b/test/test_deployment_status_v3_response.py @@ -48,6 +48,7 @@ def make_instance(self, include_optional) -> DeploymentStatusV3Response: platform_api_python_client.models.pod_details.PodDetails( name = '', revision_number = 56, + component_type = '', status = 'ScalingUp', error_message = '', ) ], diff --git a/test/test_external_api.py b/test/test_external_api.py index 8c1ae1c..f8d2a0f 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -320,6 +320,13 @@ def test_get_volume_endpoint_volumes_volume_id_get(self) -> None: """ pass + def test_get_volume_status_endpoint_volumes_status_volume_id_get(self) -> None: + """Test case for get_volume_status_endpoint_volumes_status_volume_id_get + + Get Volume Status Endpoint + """ + pass + def test_invite_user_organizations_invite_post(self) -> None: """Test case for invite_user_organizations_invite_post diff --git a/test/test_get_block_volume_response.py b/test/test_get_block_volume_response.py index 76c641b..9351ecf 100644 --- a/test/test_get_block_volume_response.py +++ b/test/test_get_block_volume_response.py @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> GetBlockVolumeResponse: status = 'active', pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - size_gb = 56 + size_gb = 56, + storage_class = '' ) else: return GetBlockVolumeResponse( @@ -56,6 +57,7 @@ def make_instance(self, include_optional) -> GetBlockVolumeResponse: pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), size_gb = 56, + storage_class = '', ) """ diff --git a/test/test_get_volume_response.py b/test/test_get_volume_response.py index 329a023..962f58f 100644 --- a/test/test_get_volume_response.py +++ b/test/test_get_volume_response.py @@ -44,6 +44,7 @@ def make_instance(self, include_optional) -> GetVolumeResponse: pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), size_gb = 56, + storage_class = '', provider = 's3', bucket = '', region = '', @@ -67,6 +68,7 @@ def make_instance(self, include_optional) -> GetVolumeResponse: pvc_name = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), size_gb = 56, + storage_class = '', provider = 's3', bucket = '', region = '', diff --git a/test/test_pod_details.py b/test/test_pod_details.py index abc3735..44e1bec 100644 --- a/test/test_pod_details.py +++ b/test/test_pod_details.py @@ -37,6 +37,7 @@ def make_instance(self, include_optional) -> PodDetails: return PodDetails( name = '', revision_number = 56, + component_type = '', status = 'ScalingUp', error_message = '' ) diff --git a/test/test_revision_pod_details.py b/test/test_revision_pod_details.py index 10cdd69..549626c 100644 --- a/test/test_revision_pod_details.py +++ b/test/test_revision_pod_details.py @@ -41,6 +41,7 @@ def make_instance(self, include_optional) -> RevisionPodDetails: platform_api_python_client.models.pod_details.PodDetails( name = '', revision_number = 56, + component_type = '', status = 'ScalingUp', error_message = '', ) ], diff --git a/test/test_volume_backend.py b/test/test_volume_backend.py new file mode 100644 index 0000000..b1d6010 --- /dev/null +++ b/test/test_volume_backend.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.volume_backend import VolumeBackend + +class TestVolumeBackend(unittest.TestCase): + """VolumeBackend unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVolumeBackend(self): + """Test VolumeBackend""" + # inst = VolumeBackend() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_volume_status_response.py b/test/test_volume_status_response.py new file mode 100644 index 0000000..5189953 --- /dev/null +++ b/test/test_volume_status_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.volume_status_response import VolumeStatusResponse + +class TestVolumeStatusResponse(unittest.TestCase): + """VolumeStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VolumeStatusResponse: + """Test VolumeStatusResponse + 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 `VolumeStatusResponse` + """ + model = VolumeStatusResponse() + if include_optional: + return VolumeStatusResponse( + id = 56, + backend = 'block', + status = 'active', + service_status = 'Healthy', + error_message = '' + ) + else: + return VolumeStatusResponse( + id = 56, + backend = 'block', + status = 'active', + ) + """ + + def testVolumeStatusResponse(self): + """Test VolumeStatusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()