diff --git a/README.md b/README.md index 77e5cd6..9a4d802 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ Onepanel API This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 0.14.1 -- Package version: v0.14.1 +- API version: 0.15.0 +- Package version: 0.15.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://github.com/onepanelio/core](https://github.com/onepanelio/core) @@ -79,13 +79,13 @@ configuration = onepanel.core.api.Configuration( with onepanel.core.api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = onepanel.core.api.AuthServiceApi(api_client) - body = onepanel.core.api.IsAuthorized() # IsAuthorized | + body = onepanel.core.api.GetAccessTokenRequest() # GetAccessTokenRequest | try: - api_response = api_instance.is_authorized(body) + api_response = api_instance.get_access_token(body) pprint(api_response) except ApiException as e: - print("Exception when calling AuthServiceApi->is_authorized: %s\n" % e) + print("Exception when calling AuthServiceApi->get_access_token: %s\n" % e) ``` @@ -95,8 +95,8 @@ All URIs are relative to *http://localhost:8888* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AuthServiceApi* | [**get_access_token**](docs/AuthServiceApi.md#get_access_token) | **POST** /apis/v1beta1/auth/get_access_token | *AuthServiceApi* | [**is_authorized**](docs/AuthServiceApi.md#is_authorized) | **POST** /apis/v1beta1/auth | -*AuthServiceApi* | [**is_valid_token**](docs/AuthServiceApi.md#is_valid_token) | **POST** /apis/v1beta1/auth/token | *ConfigServiceApi* | [**get_config**](docs/ConfigServiceApi.md#get_config) | **GET** /apis/v1beta1/config | *CronWorkflowServiceApi* | [**create_cron_workflow**](docs/CronWorkflowServiceApi.md#create_cron_workflow) | **POST** /apis/v1beta1/{namespace}/cron_workflow | *CronWorkflowServiceApi* | [**delete_cron_workflow**](docs/CronWorkflowServiceApi.md#delete_cron_workflow) | **DELETE** /apis/v1beta1/{namespace}/cron_workflows/{uid} | @@ -106,6 +106,7 @@ Class | Method | HTTP request | Description *CronWorkflowServiceApi* | [**update_cron_workflow**](docs/CronWorkflowServiceApi.md#update_cron_workflow) | **PUT** /apis/v1beta1/{namespace}/cron_workflow/{uid} | *LabelServiceApi* | [**add_labels**](docs/LabelServiceApi.md#add_labels) | **POST** /apis/v1beta1/{namespace}/{resource}/{uid}/labels | *LabelServiceApi* | [**delete_label**](docs/LabelServiceApi.md#delete_label) | **DELETE** /apis/v1beta1/{namespace}/{resource}/{uid}/labels/{key} | +*LabelServiceApi* | [**get_available_labels**](docs/LabelServiceApi.md#get_available_labels) | **GET** /apis/v1beta1/labels/{namespace}/{resource}/labels | *LabelServiceApi* | [**get_labels**](docs/LabelServiceApi.md#get_labels) | **GET** /apis/v1beta1/{namespace}/{resource}/{uid}/labels | *LabelServiceApi* | [**replace_labels**](docs/LabelServiceApi.md#replace_labels) | **PUT** /apis/v1beta1/{namespace}/{resource}/{uid}/labels | *NamespaceServiceApi* | [**create_namespace**](docs/NamespaceServiceApi.md#create_namespace) | **POST** /apis/v1beta1/namespaces | @@ -175,6 +176,8 @@ Class | Method | HTTP request | Description - [DeleteSecretKeyResponse](docs/DeleteSecretKeyResponse.md) - [DeleteSecretResponse](docs/DeleteSecretResponse.md) - [File](docs/File.md) + - [GetAccessTokenRequest](docs/GetAccessTokenRequest.md) + - [GetAccessTokenResponse](docs/GetAccessTokenResponse.md) - [GetConfigResponse](docs/GetConfigResponse.md) - [GetLabelsResponse](docs/GetLabelsResponse.md) - [GetWorkflowExecutionMetricsResponse](docs/GetWorkflowExecutionMetricsResponse.md) @@ -185,8 +188,6 @@ Class | Method | HTTP request | Description - [GrpcGatewayRuntimeStreamError](docs/GrpcGatewayRuntimeStreamError.md) - [IsAuthorized](docs/IsAuthorized.md) - [IsAuthorizedResponse](docs/IsAuthorizedResponse.md) - - [IsValidTokenRequest](docs/IsValidTokenRequest.md) - - [IsValidTokenResponse](docs/IsValidTokenResponse.md) - [KeyValue](docs/KeyValue.md) - [Labels](docs/Labels.md) - [ListCronWorkflowsResponse](docs/ListCronWorkflowsResponse.md) diff --git a/docs/AuthServiceApi.md b/docs/AuthServiceApi.md index a650835..dbe2dbc 100644 --- a/docs/AuthServiceApi.md +++ b/docs/AuthServiceApi.md @@ -4,12 +4,12 @@ All URIs are relative to *http://localhost:8888* Method | HTTP request | Description ------------- | ------------- | ------------- +[**get_access_token**](AuthServiceApi.md#get_access_token) | **POST** /apis/v1beta1/auth/get_access_token | [**is_authorized**](AuthServiceApi.md#is_authorized) | **POST** /apis/v1beta1/auth | -[**is_valid_token**](AuthServiceApi.md#is_valid_token) | **POST** /apis/v1beta1/auth/token | -# **is_authorized** -> IsAuthorizedResponse is_authorized(body) +# **get_access_token** +> GetAccessTokenResponse get_access_token(body) @@ -47,24 +47,24 @@ configuration = onepanel.core.api.Configuration( with onepanel.core.api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = onepanel.core.api.AuthServiceApi(api_client) - body = onepanel.core.api.IsAuthorized() # IsAuthorized | + body = onepanel.core.api.GetAccessTokenRequest() # GetAccessTokenRequest | try: - api_response = api_instance.is_authorized(body) + api_response = api_instance.get_access_token(body) pprint(api_response) except ApiException as e: - print("Exception when calling AuthServiceApi->is_authorized: %s\n" % e) + print("Exception when calling AuthServiceApi->get_access_token: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**IsAuthorized**](IsAuthorized.md)| | + **body** | [**GetAccessTokenRequest**](GetAccessTokenRequest.md)| | ### Return type -[**IsAuthorizedResponse**](IsAuthorizedResponse.md) +[**GetAccessTokenResponse**](GetAccessTokenResponse.md) ### Authorization @@ -83,8 +83,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **is_valid_token** -> IsValidTokenResponse is_valid_token(body) +# **is_authorized** +> IsAuthorizedResponse is_authorized(body) @@ -122,24 +122,24 @@ configuration = onepanel.core.api.Configuration( with onepanel.core.api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = onepanel.core.api.AuthServiceApi(api_client) - body = onepanel.core.api.IsValidTokenRequest() # IsValidTokenRequest | + body = onepanel.core.api.IsAuthorized() # IsAuthorized | try: - api_response = api_instance.is_valid_token(body) + api_response = api_instance.is_authorized(body) pprint(api_response) except ApiException as e: - print("Exception when calling AuthServiceApi->is_valid_token: %s\n" % e) + print("Exception when calling AuthServiceApi->is_authorized: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**IsValidTokenRequest**](IsValidTokenRequest.md)| | + **body** | [**IsAuthorized**](IsAuthorized.md)| | ### Return type -[**IsValidTokenResponse**](IsValidTokenResponse.md) +[**IsAuthorizedResponse**](IsAuthorizedResponse.md) ### Authorization diff --git a/docs/GetAccessTokenRequest.md b/docs/GetAccessTokenRequest.md new file mode 100644 index 0000000..410e32d --- /dev/null +++ b/docs/GetAccessTokenRequest.md @@ -0,0 +1,11 @@ +# GetAccessTokenRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | [optional] +**token** | **str** | | [optional] + +[[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/GetAccessTokenResponse.md b/docs/GetAccessTokenResponse.md new file mode 100644 index 0000000..66656b4 --- /dev/null +++ b/docs/GetAccessTokenResponse.md @@ -0,0 +1,12 @@ +# GetAccessTokenResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | [optional] +**access_token** | **str** | | [optional] +**username** | **str** | | [optional] + +[[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/LabelServiceApi.md b/docs/LabelServiceApi.md index 43c2227..7d01a0a 100644 --- a/docs/LabelServiceApi.md +++ b/docs/LabelServiceApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**add_labels**](LabelServiceApi.md#add_labels) | **POST** /apis/v1beta1/{namespace}/{resource}/{uid}/labels | [**delete_label**](LabelServiceApi.md#delete_label) | **DELETE** /apis/v1beta1/{namespace}/{resource}/{uid}/labels/{key} | +[**get_available_labels**](LabelServiceApi.md#get_available_labels) | **GET** /apis/v1beta1/labels/{namespace}/{resource}/labels | [**get_labels**](LabelServiceApi.md#get_labels) | **GET** /apis/v1beta1/{namespace}/{resource}/{uid}/labels | [**replace_labels**](LabelServiceApi.md#replace_labels) | **PUT** /apis/v1beta1/{namespace}/{resource}/{uid}/labels | @@ -172,6 +173,87 @@ 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_available_labels** +> GetLabelsResponse get_available_labels(namespace, resource, key_like=key_like, skip_keys=skip_keys) + + + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import onepanel.core.api +from onepanel.core.api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost:8888 +# See configuration.py for a list of all supported configuration parameters. +configuration = onepanel.core.api.Configuration( + host = "http://localhost:8888" +) + +# 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 API key authorization: Bearer +configuration = onepanel.core.api.Configuration( + host = "http://localhost:8888", + api_key = { + 'authorization': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['authorization'] = 'Bearer' + +# Enter a context with an instance of the API client +with onepanel.core.api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = onepanel.core.api.LabelServiceApi(api_client) + namespace = 'namespace_example' # str | +resource = 'resource_example' # str | +key_like = 'key_like_example' # str | (optional) +skip_keys = 'skip_keys_example' # str | (optional) + + try: + api_response = api_instance.get_available_labels(namespace, resource, key_like=key_like, skip_keys=skip_keys) + pprint(api_response) + except ApiException as e: + print("Exception when calling LabelServiceApi->get_available_labels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **namespace** | **str**| | + **resource** | **str**| | + **key_like** | **str**| | [optional] + **skip_keys** | **str**| | [optional] + +### Return type + +[**GetLabelsResponse**](GetLabelsResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/octet-stream + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | An unexpected error response | - | + +[[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_labels** > GetLabelsResponse get_labels(namespace, resource, uid) diff --git a/docs/LogInRequest.md b/docs/LogInRequest.md new file mode 100644 index 0000000..c497885 --- /dev/null +++ b/docs/LogInRequest.md @@ -0,0 +1,11 @@ +# LogInRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | [optional] +**token_hash** | **str** | | [optional] + +[[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/LogInResponse.md b/docs/LogInResponse.md new file mode 100644 index 0000000..bd00508 --- /dev/null +++ b/docs/LogInResponse.md @@ -0,0 +1,12 @@ +# LogInResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | [optional] +**token** | **str** | | [optional] +**username** | **str** | | [optional] + +[[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/onepanel/core/api/__init__.py b/onepanel/core/api/__init__.py index 4d37dc8..5cf8d30 100644 --- a/onepanel/core/api/__init__.py +++ b/onepanel/core/api/__init__.py @@ -7,14 +7,14 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import -__version__ = "v0.14.1" +__version__ = "0.15.0" # import apis into sdk package from onepanel.core.api.api.auth_service_api import AuthServiceApi @@ -48,6 +48,8 @@ from onepanel.core.api.models.delete_secret_key_response import DeleteSecretKeyResponse from onepanel.core.api.models.delete_secret_response import DeleteSecretResponse from onepanel.core.api.models.file import File +from onepanel.core.api.models.get_access_token_request import GetAccessTokenRequest +from onepanel.core.api.models.get_access_token_response import GetAccessTokenResponse from onepanel.core.api.models.get_config_response import GetConfigResponse from onepanel.core.api.models.get_labels_response import GetLabelsResponse from onepanel.core.api.models.get_workflow_execution_metrics_response import GetWorkflowExecutionMetricsResponse @@ -58,8 +60,6 @@ from onepanel.core.api.models.grpc_gateway_runtime_stream_error import GrpcGatewayRuntimeStreamError from onepanel.core.api.models.is_authorized import IsAuthorized from onepanel.core.api.models.is_authorized_response import IsAuthorizedResponse -from onepanel.core.api.models.is_valid_token_request import IsValidTokenRequest -from onepanel.core.api.models.is_valid_token_response import IsValidTokenResponse from onepanel.core.api.models.key_value import KeyValue from onepanel.core.api.models.labels import Labels from onepanel.core.api.models.list_cron_workflows_response import ListCronWorkflowsResponse diff --git a/onepanel/core/api/api/auth_service_api.py b/onepanel/core/api/api/auth_service_api.py index 1829508..e420b15 100644 --- a/onepanel/core/api/api/auth_service_api.py +++ b/onepanel/core/api/api/auth_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ @@ -36,16 +36,16 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def is_authorized(self, body, **kwargs): # noqa: E501 - """is_authorized # noqa: E501 + def get_access_token(self, body, **kwargs): # noqa: E501 + """get_access_token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_authorized(body, async_req=True) + >>> thread = api.get_access_token(body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param IsAuthorized body: (required) + :param GetAccessTokenRequest body: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -53,23 +53,23 @@ def is_authorized(self, body, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: IsAuthorizedResponse + :return: GetAccessTokenResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.is_authorized_with_http_info(body, **kwargs) # noqa: E501 + return self.get_access_token_with_http_info(body, **kwargs) # noqa: E501 - def is_authorized_with_http_info(self, body, **kwargs): # noqa: E501 - """is_authorized # noqa: E501 + def get_access_token_with_http_info(self, body, **kwargs): # noqa: E501 + """get_access_token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_authorized_with_http_info(body, async_req=True) + >>> thread = api.get_access_token_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param IsAuthorized body: (required) + :param GetAccessTokenRequest body: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -79,7 +79,7 @@ def is_authorized_with_http_info(self, body, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(IsAuthorizedResponse, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(GetAccessTokenResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -102,14 +102,14 @@ def is_authorized_with_http_info(self, body, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method is_authorized" % key + " to method get_access_token" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `is_authorized`") # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `get_access_token`") # noqa: E501 collection_formats = {} @@ -137,14 +137,14 @@ def is_authorized_with_http_info(self, body, **kwargs): # noqa: E501 auth_settings = ['Bearer'] # noqa: E501 return self.api_client.call_api( - '/apis/v1beta1/auth', 'POST', + '/apis/v1beta1/auth/get_access_token', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='IsAuthorizedResponse', # noqa: E501 + response_type='GetAccessTokenResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 @@ -152,16 +152,16 @@ def is_authorized_with_http_info(self, body, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def is_valid_token(self, body, **kwargs): # noqa: E501 - """is_valid_token # noqa: E501 + def is_authorized(self, body, **kwargs): # noqa: E501 + """is_authorized # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_valid_token(body, async_req=True) + >>> thread = api.is_authorized(body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param IsValidTokenRequest body: (required) + :param IsAuthorized body: (required) :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. @@ -169,23 +169,23 @@ def is_valid_token(self, body, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: IsValidTokenResponse + :return: IsAuthorizedResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True - return self.is_valid_token_with_http_info(body, **kwargs) # noqa: E501 + return self.is_authorized_with_http_info(body, **kwargs) # noqa: E501 - def is_valid_token_with_http_info(self, body, **kwargs): # noqa: E501 - """is_valid_token # noqa: E501 + def is_authorized_with_http_info(self, body, **kwargs): # noqa: E501 + """is_authorized # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_valid_token_with_http_info(body, async_req=True) + >>> thread = api.is_authorized_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously - :param IsValidTokenRequest body: (required) + :param IsAuthorized body: (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -195,7 +195,7 @@ def is_valid_token_with_http_info(self, body, **kwargs): # noqa: E501 number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(IsValidTokenResponse, status_code(int), headers(HTTPHeaderDict)) + :return: tuple(IsAuthorizedResponse, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ @@ -218,14 +218,14 @@ def is_valid_token_with_http_info(self, body, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method is_valid_token" % key + " to method is_authorized" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `is_valid_token`") # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `is_authorized`") # noqa: E501 collection_formats = {} @@ -253,14 +253,14 @@ def is_valid_token_with_http_info(self, body, **kwargs): # noqa: E501 auth_settings = ['Bearer'] # noqa: E501 return self.api_client.call_api( - '/apis/v1beta1/auth/token', 'POST', + '/apis/v1beta1/auth', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='IsValidTokenResponse', # noqa: E501 + response_type='IsAuthorizedResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 diff --git a/onepanel/core/api/api/config_service_api.py b/onepanel/core/api/api/config_service_api.py index 4c61169..db6dc48 100644 --- a/onepanel/core/api/api/config_service_api.py +++ b/onepanel/core/api/api/config_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/api/cron_workflow_service_api.py b/onepanel/core/api/api/cron_workflow_service_api.py index af94fd5..673f91c 100644 --- a/onepanel/core/api/api/cron_workflow_service_api.py +++ b/onepanel/core/api/api/cron_workflow_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/api/label_service_api.py b/onepanel/core/api/api/label_service_api.py index 42edcfd..36946f3 100644 --- a/onepanel/core/api/api/label_service_api.py +++ b/onepanel/core/api/api/label_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ @@ -318,6 +318,137 @@ def delete_label_with_http_info(self, namespace, resource, uid, key, **kwargs): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def get_available_labels(self, namespace, resource, **kwargs): # noqa: E501 + """get_available_labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_labels(namespace, resource, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str namespace: (required) + :param str resource: (required) + :param str key_like: + :param str skip_keys: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: GetLabelsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_available_labels_with_http_info(namespace, resource, **kwargs) # noqa: E501 + + def get_available_labels_with_http_info(self, namespace, resource, **kwargs): # noqa: E501 + """get_available_labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_labels_with_http_info(namespace, resource, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str namespace: (required) + :param str resource: (required) + :param str key_like: + :param str skip_keys: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: tuple(GetLabelsResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'resource', + 'key_like', + 'skip_keys' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_available_labels" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 + local_var_params['namespace'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `get_available_labels`") # noqa: E501 + # verify the required parameter 'resource' is set + if self.api_client.client_side_validation and ('resource' not in local_var_params or # noqa: E501 + local_var_params['resource'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `resource` when calling `get_available_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + if 'resource' in local_var_params: + path_params['resource'] = local_var_params['resource'] # noqa: E501 + + query_params = [] + if 'key_like' in local_var_params and local_var_params['key_like'] is not None: # noqa: E501 + query_params.append(('keyLike', local_var_params['key_like'])) # noqa: E501 + if 'skip_keys' in local_var_params and local_var_params['skip_keys'] is not None: # noqa: E501 + query_params.append(('skipKeys', local_var_params['skip_keys'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/octet-stream']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/labels/{namespace}/{resource}/labels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetLabelsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def get_labels(self, namespace, resource, uid, **kwargs): # noqa: E501 """get_labels # noqa: E501 diff --git a/onepanel/core/api/api/namespace_service_api.py b/onepanel/core/api/api/namespace_service_api.py index 0617cad..4e27f0d 100644 --- a/onepanel/core/api/api/namespace_service_api.py +++ b/onepanel/core/api/api/namespace_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/api/secret_service_api.py b/onepanel/core/api/api/secret_service_api.py index 63f3330..b6d0e94 100644 --- a/onepanel/core/api/api/secret_service_api.py +++ b/onepanel/core/api/api/secret_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/api/service_service_api.py b/onepanel/core/api/api/service_service_api.py index 0f88437..a9ebf59 100644 --- a/onepanel/core/api/api/service_service_api.py +++ b/onepanel/core/api/api/service_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/api/workflow_service_api.py b/onepanel/core/api/api/workflow_service_api.py index 81a7f46..a25ec94 100644 --- a/onepanel/core/api/api/workflow_service_api.py +++ b/onepanel/core/api/api/workflow_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/api/workflow_template_service_api.py b/onepanel/core/api/api/workflow_template_service_api.py index 89c62e0..fd3bb1a 100644 --- a/onepanel/core/api/api/workflow_template_service_api.py +++ b/onepanel/core/api/api/workflow_template_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/api/workspace_service_api.py b/onepanel/core/api/api/workspace_service_api.py index 7e8d20a..7b6f196 100644 --- a/onepanel/core/api/api/workspace_service_api.py +++ b/onepanel/core/api/api/workspace_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/api/workspace_template_service_api.py b/onepanel/core/api/api/workspace_template_service_api.py index efc191a..e0a36cd 100644 --- a/onepanel/core/api/api/workspace_template_service_api.py +++ b/onepanel/core/api/api/workspace_template_service_api.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/api_client.py b/onepanel/core/api/api_client.py index b1bb807..2aef58a 100644 --- a/onepanel/core/api/api_client.py +++ b/onepanel/core/api/api_client.py @@ -4,7 +4,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ @@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v0.14.1/python' + self.user_agent = 'OpenAPI-Generator/0.15.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/onepanel/core/api/configuration.py b/onepanel/core/api/configuration.py index 5c4dbe2..2c6b458 100644 --- a/onepanel/core/api/configuration.py +++ b/onepanel/core/api/configuration.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ @@ -351,8 +351,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 0.14.1\n"\ - "SDK Package Version: v0.14.1".\ + "Version of the API: 0.15.0\n"\ + "SDK Package Version: 0.15.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/onepanel/core/api/exceptions.py b/onepanel/core/api/exceptions.py index 7ccbdda..004041a 100644 --- a/onepanel/core/api/exceptions.py +++ b/onepanel/core/api/exceptions.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/__init__.py b/onepanel/core/api/models/__init__.py index e132ac0..52fff02 100644 --- a/onepanel/core/api/models/__init__.py +++ b/onepanel/core/api/models/__init__.py @@ -6,7 +6,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ @@ -24,6 +24,8 @@ from onepanel.core.api.models.delete_secret_key_response import DeleteSecretKeyResponse from onepanel.core.api.models.delete_secret_response import DeleteSecretResponse from onepanel.core.api.models.file import File +from onepanel.core.api.models.get_access_token_request import GetAccessTokenRequest +from onepanel.core.api.models.get_access_token_response import GetAccessTokenResponse from onepanel.core.api.models.get_config_response import GetConfigResponse from onepanel.core.api.models.get_labels_response import GetLabelsResponse from onepanel.core.api.models.get_workflow_execution_metrics_response import GetWorkflowExecutionMetricsResponse @@ -34,8 +36,6 @@ from onepanel.core.api.models.grpc_gateway_runtime_stream_error import GrpcGatewayRuntimeStreamError from onepanel.core.api.models.is_authorized import IsAuthorized from onepanel.core.api.models.is_authorized_response import IsAuthorizedResponse -from onepanel.core.api.models.is_valid_token_request import IsValidTokenRequest -from onepanel.core.api.models.is_valid_token_response import IsValidTokenResponse from onepanel.core.api.models.key_value import KeyValue from onepanel.core.api.models.labels import Labels from onepanel.core.api.models.list_cron_workflows_response import ListCronWorkflowsResponse diff --git a/onepanel/core/api/models/add_secret_key_value_response.py b/onepanel/core/api/models/add_secret_key_value_response.py index 2061817..c1c70cd 100644 --- a/onepanel/core/api/models/add_secret_key_value_response.py +++ b/onepanel/core/api/models/add_secret_key_value_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/archive_workflow_template_response.py b/onepanel/core/api/models/archive_workflow_template_response.py index 61f85a3..ade8971 100644 --- a/onepanel/core/api/models/archive_workflow_template_response.py +++ b/onepanel/core/api/models/archive_workflow_template_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/artifact_response.py b/onepanel/core/api/models/artifact_response.py index f6a8a81..682ec18 100644 --- a/onepanel/core/api/models/artifact_response.py +++ b/onepanel/core/api/models/artifact_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/create_workflow_execution_body.py b/onepanel/core/api/models/create_workflow_execution_body.py index c8d00ed..d5ef396 100644 --- a/onepanel/core/api/models/create_workflow_execution_body.py +++ b/onepanel/core/api/models/create_workflow_execution_body.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/create_workspace_body.py b/onepanel/core/api/models/create_workspace_body.py index 0d4b6f2..9c2941c 100644 --- a/onepanel/core/api/models/create_workspace_body.py +++ b/onepanel/core/api/models/create_workspace_body.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/cron_workflow.py b/onepanel/core/api/models/cron_workflow.py index 4684eb2..6b57b0c 100644 --- a/onepanel/core/api/models/cron_workflow.py +++ b/onepanel/core/api/models/cron_workflow.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/cron_workflow_statistics_report.py b/onepanel/core/api/models/cron_workflow_statistics_report.py index 6156c36..6c422e8 100644 --- a/onepanel/core/api/models/cron_workflow_statistics_report.py +++ b/onepanel/core/api/models/cron_workflow_statistics_report.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/delete_secret_key_response.py b/onepanel/core/api/models/delete_secret_key_response.py index 20dbcca..ecf6df3 100644 --- a/onepanel/core/api/models/delete_secret_key_response.py +++ b/onepanel/core/api/models/delete_secret_key_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/delete_secret_response.py b/onepanel/core/api/models/delete_secret_response.py index bdd3cd5..9a7ba1d 100644 --- a/onepanel/core/api/models/delete_secret_response.py +++ b/onepanel/core/api/models/delete_secret_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/file.py b/onepanel/core/api/models/file.py index bd939f2..70b166e 100644 --- a/onepanel/core/api/models/file.py +++ b/onepanel/core/api/models/file.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/get_access_token_request.py b/onepanel/core/api/models/get_access_token_request.py new file mode 100644 index 0000000..206dc6b --- /dev/null +++ b/onepanel/core/api/models/get_access_token_request.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Onepanel + + Onepanel API # noqa: E501 + + The version of the OpenAPI document: 0.15.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from onepanel.core.api.configuration import Configuration + + +class GetAccessTokenRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'username': 'str', + 'token': 'str' + } + + attribute_map = { + 'username': 'username', + 'token': 'token' + } + + def __init__(self, username=None, token=None, local_vars_configuration=None): # noqa: E501 + """GetAccessTokenRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._username = None + self._token = None + self.discriminator = None + + if username is not None: + self.username = username + if token is not None: + self.token = token + + @property + def username(self): + """Gets the username of this GetAccessTokenRequest. # noqa: E501 + + + :return: The username of this GetAccessTokenRequest. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this GetAccessTokenRequest. + + + :param username: The username of this GetAccessTokenRequest. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def token(self): + """Gets the token of this GetAccessTokenRequest. # noqa: E501 + + + :return: The token of this GetAccessTokenRequest. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this GetAccessTokenRequest. + + + :param token: The token of this GetAccessTokenRequest. # noqa: E501 + :type: str + """ + + self._token = token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetAccessTokenRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetAccessTokenRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/onepanel/core/api/models/get_access_token_response.py b/onepanel/core/api/models/get_access_token_response.py new file mode 100644 index 0000000..587cbc1 --- /dev/null +++ b/onepanel/core/api/models/get_access_token_response.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + Onepanel + + Onepanel API # noqa: E501 + + The version of the OpenAPI document: 0.15.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from onepanel.core.api.configuration import Configuration + + +class GetAccessTokenResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'domain': 'str', + 'access_token': 'str', + 'username': 'str' + } + + attribute_map = { + 'domain': 'domain', + 'access_token': 'accessToken', + 'username': 'username' + } + + def __init__(self, domain=None, access_token=None, username=None, local_vars_configuration=None): # noqa: E501 + """GetAccessTokenResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._domain = None + self._access_token = None + self._username = None + self.discriminator = None + + if domain is not None: + self.domain = domain + if access_token is not None: + self.access_token = access_token + if username is not None: + self.username = username + + @property + def domain(self): + """Gets the domain of this GetAccessTokenResponse. # noqa: E501 + + + :return: The domain of this GetAccessTokenResponse. # noqa: E501 + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this GetAccessTokenResponse. + + + :param domain: The domain of this GetAccessTokenResponse. # noqa: E501 + :type: str + """ + + self._domain = domain + + @property + def access_token(self): + """Gets the access_token of this GetAccessTokenResponse. # noqa: E501 + + + :return: The access_token of this GetAccessTokenResponse. # noqa: E501 + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """Sets the access_token of this GetAccessTokenResponse. + + + :param access_token: The access_token of this GetAccessTokenResponse. # noqa: E501 + :type: str + """ + + self._access_token = access_token + + @property + def username(self): + """Gets the username of this GetAccessTokenResponse. # noqa: E501 + + + :return: The username of this GetAccessTokenResponse. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this GetAccessTokenResponse. + + + :param username: The username of this GetAccessTokenResponse. # noqa: E501 + :type: str + """ + + self._username = username + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetAccessTokenResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetAccessTokenResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/onepanel/core/api/models/get_config_response.py b/onepanel/core/api/models/get_config_response.py index b357078..0794df8 100644 --- a/onepanel/core/api/models/get_config_response.py +++ b/onepanel/core/api/models/get_config_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/get_labels_response.py b/onepanel/core/api/models/get_labels_response.py index 7d1ab00..57ed837 100644 --- a/onepanel/core/api/models/get_labels_response.py +++ b/onepanel/core/api/models/get_labels_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/get_workflow_execution_metrics_response.py b/onepanel/core/api/models/get_workflow_execution_metrics_response.py index 0db533a..0abded8 100644 --- a/onepanel/core/api/models/get_workflow_execution_metrics_response.py +++ b/onepanel/core/api/models/get_workflow_execution_metrics_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/get_workflow_execution_statistics_for_namespace_response.py b/onepanel/core/api/models/get_workflow_execution_statistics_for_namespace_response.py index 3bc9c63..f0a95e4 100644 --- a/onepanel/core/api/models/get_workflow_execution_statistics_for_namespace_response.py +++ b/onepanel/core/api/models/get_workflow_execution_statistics_for_namespace_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/get_workspace_statistics_for_namespace_response.py b/onepanel/core/api/models/get_workspace_statistics_for_namespace_response.py index aa7e44f..742f950 100644 --- a/onepanel/core/api/models/get_workspace_statistics_for_namespace_response.py +++ b/onepanel/core/api/models/get_workspace_statistics_for_namespace_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/google_protobuf_any.py b/onepanel/core/api/models/google_protobuf_any.py index d0da4e8..79a64d8 100644 --- a/onepanel/core/api/models/google_protobuf_any.py +++ b/onepanel/core/api/models/google_protobuf_any.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/grpc_gateway_runtime_error.py b/onepanel/core/api/models/grpc_gateway_runtime_error.py index 3d7f4b4..b2b435e 100644 --- a/onepanel/core/api/models/grpc_gateway_runtime_error.py +++ b/onepanel/core/api/models/grpc_gateway_runtime_error.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/grpc_gateway_runtime_stream_error.py b/onepanel/core/api/models/grpc_gateway_runtime_stream_error.py index 0cb513b..1d7a59d 100644 --- a/onepanel/core/api/models/grpc_gateway_runtime_stream_error.py +++ b/onepanel/core/api/models/grpc_gateway_runtime_stream_error.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/is_authorized.py b/onepanel/core/api/models/is_authorized.py index 73b1eb8..c9776c2 100644 --- a/onepanel/core/api/models/is_authorized.py +++ b/onepanel/core/api/models/is_authorized.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/is_authorized_response.py b/onepanel/core/api/models/is_authorized_response.py index 803ac10..39b2436 100644 --- a/onepanel/core/api/models/is_authorized_response.py +++ b/onepanel/core/api/models/is_authorized_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/is_valid_token_request.py b/onepanel/core/api/models/is_valid_token_request.py index 0386b04..3df985c 100644 --- a/onepanel/core/api/models/is_valid_token_request.py +++ b/onepanel/core/api/models/is_valid_token_request.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/is_valid_token_response.py b/onepanel/core/api/models/is_valid_token_response.py index a2a3ca4..43ef9a1 100644 --- a/onepanel/core/api/models/is_valid_token_response.py +++ b/onepanel/core/api/models/is_valid_token_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/key_value.py b/onepanel/core/api/models/key_value.py index 7e70c62..73d7649 100644 --- a/onepanel/core/api/models/key_value.py +++ b/onepanel/core/api/models/key_value.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/labels.py b/onepanel/core/api/models/labels.py index 50ce03f..e3e0e71 100644 --- a/onepanel/core/api/models/labels.py +++ b/onepanel/core/api/models/labels.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_cron_workflows_response.py b/onepanel/core/api/models/list_cron_workflows_response.py index d82d75a..8518447 100644 --- a/onepanel/core/api/models/list_cron_workflows_response.py +++ b/onepanel/core/api/models/list_cron_workflows_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_files_response.py b/onepanel/core/api/models/list_files_response.py index c593b5c..b4b372e 100644 --- a/onepanel/core/api/models/list_files_response.py +++ b/onepanel/core/api/models/list_files_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_namespaces_response.py b/onepanel/core/api/models/list_namespaces_response.py index 2c438c3..dcfb0c3 100644 --- a/onepanel/core/api/models/list_namespaces_response.py +++ b/onepanel/core/api/models/list_namespaces_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_secrets_response.py b/onepanel/core/api/models/list_secrets_response.py index 05b4cce..c999d24 100644 --- a/onepanel/core/api/models/list_secrets_response.py +++ b/onepanel/core/api/models/list_secrets_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_services_response.py b/onepanel/core/api/models/list_services_response.py index 2afe972..954460e 100644 --- a/onepanel/core/api/models/list_services_response.py +++ b/onepanel/core/api/models/list_services_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_workflow_executions_response.py b/onepanel/core/api/models/list_workflow_executions_response.py index 96117bb..3b92294 100644 --- a/onepanel/core/api/models/list_workflow_executions_response.py +++ b/onepanel/core/api/models/list_workflow_executions_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_workflow_template_versions_response.py b/onepanel/core/api/models/list_workflow_template_versions_response.py index 752ab63..5d12b83 100644 --- a/onepanel/core/api/models/list_workflow_template_versions_response.py +++ b/onepanel/core/api/models/list_workflow_template_versions_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_workflow_templates_response.py b/onepanel/core/api/models/list_workflow_templates_response.py index 101fd55..2f52325 100644 --- a/onepanel/core/api/models/list_workflow_templates_response.py +++ b/onepanel/core/api/models/list_workflow_templates_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_workspace_response.py b/onepanel/core/api/models/list_workspace_response.py index 49e4337..18fb642 100644 --- a/onepanel/core/api/models/list_workspace_response.py +++ b/onepanel/core/api/models/list_workspace_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_workspace_template_versions_response.py b/onepanel/core/api/models/list_workspace_template_versions_response.py index 1488269..efcd4d2 100644 --- a/onepanel/core/api/models/list_workspace_template_versions_response.py +++ b/onepanel/core/api/models/list_workspace_template_versions_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/list_workspace_templates_response.py b/onepanel/core/api/models/list_workspace_templates_response.py index a994357..359ed0f 100644 --- a/onepanel/core/api/models/list_workspace_templates_response.py +++ b/onepanel/core/api/models/list_workspace_templates_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/log_entry.py b/onepanel/core/api/models/log_entry.py index 5cdc694..14a83ed 100644 --- a/onepanel/core/api/models/log_entry.py +++ b/onepanel/core/api/models/log_entry.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/log_in_request.py b/onepanel/core/api/models/log_in_request.py new file mode 100644 index 0000000..ac9b6b7 --- /dev/null +++ b/onepanel/core/api/models/log_in_request.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Onepanel + + Onepanel API # noqa: E501 + + The version of the OpenAPI document: 0.15.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from onepanel.core.api.configuration import Configuration + + +class LogInRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'username': 'str', + 'token_hash': 'str' + } + + attribute_map = { + 'username': 'username', + 'token_hash': 'tokenHash' + } + + def __init__(self, username=None, token_hash=None, local_vars_configuration=None): # noqa: E501 + """LogInRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._username = None + self._token_hash = None + self.discriminator = None + + if username is not None: + self.username = username + if token_hash is not None: + self.token_hash = token_hash + + @property + def username(self): + """Gets the username of this LogInRequest. # noqa: E501 + + + :return: The username of this LogInRequest. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this LogInRequest. + + + :param username: The username of this LogInRequest. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def token_hash(self): + """Gets the token_hash of this LogInRequest. # noqa: E501 + + + :return: The token_hash of this LogInRequest. # noqa: E501 + :rtype: str + """ + return self._token_hash + + @token_hash.setter + def token_hash(self, token_hash): + """Sets the token_hash of this LogInRequest. + + + :param token_hash: The token_hash of this LogInRequest. # noqa: E501 + :type: str + """ + + self._token_hash = token_hash + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LogInRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LogInRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/onepanel/core/api/models/log_in_response.py b/onepanel/core/api/models/log_in_response.py new file mode 100644 index 0000000..678bc14 --- /dev/null +++ b/onepanel/core/api/models/log_in_response.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + Onepanel + + Onepanel API # noqa: E501 + + The version of the OpenAPI document: 0.15.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from onepanel.core.api.configuration import Configuration + + +class LogInResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'domain': 'str', + 'token': 'str', + 'username': 'str' + } + + attribute_map = { + 'domain': 'domain', + 'token': 'token', + 'username': 'username' + } + + def __init__(self, domain=None, token=None, username=None, local_vars_configuration=None): # noqa: E501 + """LogInResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._domain = None + self._token = None + self._username = None + self.discriminator = None + + if domain is not None: + self.domain = domain + if token is not None: + self.token = token + if username is not None: + self.username = username + + @property + def domain(self): + """Gets the domain of this LogInResponse. # noqa: E501 + + + :return: The domain of this LogInResponse. # noqa: E501 + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this LogInResponse. + + + :param domain: The domain of this LogInResponse. # noqa: E501 + :type: str + """ + + self._domain = domain + + @property + def token(self): + """Gets the token of this LogInResponse. # noqa: E501 + + + :return: The token of this LogInResponse. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this LogInResponse. + + + :param token: The token of this LogInResponse. # noqa: E501 + :type: str + """ + + self._token = token + + @property + def username(self): + """Gets the username of this LogInResponse. # noqa: E501 + + + :return: The username of this LogInResponse. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this LogInResponse. + + + :param username: The username of this LogInResponse. # noqa: E501 + :type: str + """ + + self._username = username + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LogInResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LogInResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/onepanel/core/api/models/metric.py b/onepanel/core/api/models/metric.py index ac9a8d1..e4381e1 100644 --- a/onepanel/core/api/models/metric.py +++ b/onepanel/core/api/models/metric.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/namespace.py b/onepanel/core/api/models/namespace.py index f87555b..dc58658 100644 --- a/onepanel/core/api/models/namespace.py +++ b/onepanel/core/api/models/namespace.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/node_pool.py b/onepanel/core/api/models/node_pool.py index 97651fd..6eebfc7 100644 --- a/onepanel/core/api/models/node_pool.py +++ b/onepanel/core/api/models/node_pool.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/node_pool_option.py b/onepanel/core/api/models/node_pool_option.py index 5d981cf..5e12628 100644 --- a/onepanel/core/api/models/node_pool_option.py +++ b/onepanel/core/api/models/node_pool_option.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/parameter.py b/onepanel/core/api/models/parameter.py index 4edcb6a..e5b1d21 100644 --- a/onepanel/core/api/models/parameter.py +++ b/onepanel/core/api/models/parameter.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/parameter_option.py b/onepanel/core/api/models/parameter_option.py index 12d6126..93122de 100644 --- a/onepanel/core/api/models/parameter_option.py +++ b/onepanel/core/api/models/parameter_option.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/secret.py b/onepanel/core/api/models/secret.py index e81a593..e4d67b8 100644 --- a/onepanel/core/api/models/secret.py +++ b/onepanel/core/api/models/secret.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/secret_exists_response.py b/onepanel/core/api/models/secret_exists_response.py index 9f698c0..233a0ce 100644 --- a/onepanel/core/api/models/secret_exists_response.py +++ b/onepanel/core/api/models/secret_exists_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/service.py b/onepanel/core/api/models/service.py index 1663271..4263e8c 100644 --- a/onepanel/core/api/models/service.py +++ b/onepanel/core/api/models/service.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/statistics.py b/onepanel/core/api/models/statistics.py index e5413ba..5580416 100644 --- a/onepanel/core/api/models/statistics.py +++ b/onepanel/core/api/models/statistics.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/stream_result_of_log_entry.py b/onepanel/core/api/models/stream_result_of_log_entry.py index 491e994..3d05c47 100644 --- a/onepanel/core/api/models/stream_result_of_log_entry.py +++ b/onepanel/core/api/models/stream_result_of_log_entry.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/stream_result_of_workflow_execution.py b/onepanel/core/api/models/stream_result_of_workflow_execution.py index 3c19f76..53e1d5f 100644 --- a/onepanel/core/api/models/stream_result_of_workflow_execution.py +++ b/onepanel/core/api/models/stream_result_of_workflow_execution.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/update_secret_key_value_response.py b/onepanel/core/api/models/update_secret_key_value_response.py index d5339b2..881950e 100644 --- a/onepanel/core/api/models/update_secret_key_value_response.py +++ b/onepanel/core/api/models/update_secret_key_value_response.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/update_workspace_body.py b/onepanel/core/api/models/update_workspace_body.py index b50f02c..7ae92c1 100644 --- a/onepanel/core/api/models/update_workspace_body.py +++ b/onepanel/core/api/models/update_workspace_body.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/workflow_execution.py b/onepanel/core/api/models/workflow_execution.py index 04ab5fd..c70a9a7 100644 --- a/onepanel/core/api/models/workflow_execution.py +++ b/onepanel/core/api/models/workflow_execution.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/workflow_execution_metadata.py b/onepanel/core/api/models/workflow_execution_metadata.py index 6094099..058f25d 100644 --- a/onepanel/core/api/models/workflow_execution_metadata.py +++ b/onepanel/core/api/models/workflow_execution_metadata.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/workflow_execution_statistic_report.py b/onepanel/core/api/models/workflow_execution_statistic_report.py index 6be7e40..9cf0f94 100644 --- a/onepanel/core/api/models/workflow_execution_statistic_report.py +++ b/onepanel/core/api/models/workflow_execution_statistic_report.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/workflow_execution_status.py b/onepanel/core/api/models/workflow_execution_status.py index 297524a..9a4f19e 100644 --- a/onepanel/core/api/models/workflow_execution_status.py +++ b/onepanel/core/api/models/workflow_execution_status.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/workflow_template.py b/onepanel/core/api/models/workflow_template.py index 8848b9b..6bb9825 100644 --- a/onepanel/core/api/models/workflow_template.py +++ b/onepanel/core/api/models/workflow_template.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/workspace.py b/onepanel/core/api/models/workspace.py index 3d3b2f9..9144d2c 100644 --- a/onepanel/core/api/models/workspace.py +++ b/onepanel/core/api/models/workspace.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/workspace_statistic_report.py b/onepanel/core/api/models/workspace_statistic_report.py index 8d8fe9a..e184c7b 100644 --- a/onepanel/core/api/models/workspace_statistic_report.py +++ b/onepanel/core/api/models/workspace_statistic_report.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/workspace_status.py b/onepanel/core/api/models/workspace_status.py index 35363ea..65b36e8 100644 --- a/onepanel/core/api/models/workspace_status.py +++ b/onepanel/core/api/models/workspace_status.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/models/workspace_template.py b/onepanel/core/api/models/workspace_template.py index 98156d6..4128642 100644 --- a/onepanel/core/api/models/workspace_template.py +++ b/onepanel/core/api/models/workspace_template.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/onepanel/core/api/rest.py b/onepanel/core/api/rest.py index 4f8bc8b..bbf05a5 100644 --- a/onepanel/core/api/rest.py +++ b/onepanel/core/api/rest.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ diff --git a/setup.py b/setup.py index 033a597..09bcaf2 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ Onepanel API # noqa: E501 - The version of the OpenAPI document: 0.14.1 + The version of the OpenAPI document: 0.15.0 Generated by: https://openapi-generator.tech """ @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "onepanel-sdk" -VERSION = "v0.14.1" +VERSION = "0.15.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_get_access_token_request.py b/test/test_get_access_token_request.py new file mode 100644 index 0000000..72a836c --- /dev/null +++ b/test/test_get_access_token_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Onepanel + + Onepanel API # noqa: E501 + + The version of the OpenAPI document: 0.15.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import onepanel.core.api +from onepanel.core.api.models.get_access_token_request import GetAccessTokenRequest # noqa: E501 +from onepanel.core.api.rest import ApiException + +class TestGetAccessTokenRequest(unittest.TestCase): + """GetAccessTokenRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test GetAccessTokenRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = onepanel.core.api.models.get_access_token_request.GetAccessTokenRequest() # noqa: E501 + if include_optional : + return GetAccessTokenRequest( + username = '0', + token_hash = '0' + ) + else : + return GetAccessTokenRequest( + ) + + def testGetAccessTokenRequest(self): + """Test GetAccessTokenRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_access_token_response.py b/test/test_get_access_token_response.py new file mode 100644 index 0000000..5bb4de5 --- /dev/null +++ b/test/test_get_access_token_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Onepanel + + Onepanel API # noqa: E501 + + The version of the OpenAPI document: 0.15.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import onepanel.core.api +from onepanel.core.api.models.get_access_token_response import GetAccessTokenResponse # noqa: E501 +from onepanel.core.api.rest import ApiException + +class TestGetAccessTokenResponse(unittest.TestCase): + """GetAccessTokenResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test GetAccessTokenResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = onepanel.core.api.models.get_access_token_response.GetAccessTokenResponse() # noqa: E501 + if include_optional : + return GetAccessTokenResponse( + domain = '0', + token = '0', + username = '0' + ) + else : + return GetAccessTokenResponse( + ) + + def testGetAccessTokenResponse(self): + """Test GetAccessTokenResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_log_in_request.py b/test/test_log_in_request.py new file mode 100644 index 0000000..5fa1f50 --- /dev/null +++ b/test/test_log_in_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Onepanel + + Onepanel API # noqa: E501 + + The version of the OpenAPI document: 0.15.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import onepanel.core.api +from onepanel.core.api.models.log_in_request import LogInRequest # noqa: E501 +from onepanel.core.api.rest import ApiException + +class TestLogInRequest(unittest.TestCase): + """LogInRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LogInRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = onepanel.core.api.models.log_in_request.LogInRequest() # noqa: E501 + if include_optional : + return LogInRequest( + username = '0', + token_hash = '0' + ) + else : + return LogInRequest( + ) + + def testLogInRequest(self): + """Test LogInRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_log_in_response.py b/test/test_log_in_response.py new file mode 100644 index 0000000..6499106 --- /dev/null +++ b/test/test_log_in_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Onepanel + + Onepanel API # noqa: E501 + + The version of the OpenAPI document: 0.15.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import onepanel.core.api +from onepanel.core.api.models.log_in_response import LogInResponse # noqa: E501 +from onepanel.core.api.rest import ApiException + +class TestLogInResponse(unittest.TestCase): + """LogInResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LogInResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = onepanel.core.api.models.log_in_response.LogInResponse() # noqa: E501 + if include_optional : + return LogInResponse( + domain = '0', + token = '0', + username = '0' + ) + else : + return LogInResponse( + ) + + def testLogInResponse(self): + """Test LogInResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main()