Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Onepanel API

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.10.0
- Package version: 0.10.0
- API version: 0.11.0
- Package version: 0.11.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://github.com/onepanelio/core](https://github.com/onepanelio/core)

Expand Down Expand Up @@ -67,9 +67,10 @@ configuration.host = "http://localhost:8888"
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 |

try:
api_response = api_instance.is_authorized()
api_response = api_instance.is_authorized(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthServiceApi->is_authorized: %s\n" % e)
Expand All @@ -84,6 +85,7 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*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} |
*CronWorkflowServiceApi* | [**get_cron_workflow**](docs/CronWorkflowServiceApi.md#get_cron_workflow) | **GET** /apis/v1beta1/{namespace}/cron_workflow/{uid} |
Expand Down Expand Up @@ -157,11 +159,13 @@ Class | Method | HTTP request | Description
- [DeleteSecretKeyResponse](docs/DeleteSecretKeyResponse.md)
- [DeleteSecretResponse](docs/DeleteSecretResponse.md)
- [File](docs/File.md)
- [GetConfigResponse](docs/GetConfigResponse.md)
- [GetLabelsResponse](docs/GetLabelsResponse.md)
- [GetWorkflowExecutionMetricsResponse](docs/GetWorkflowExecutionMetricsResponse.md)
- [GoogleProtobufAny](docs/GoogleProtobufAny.md)
- [GrpcGatewayRuntimeError](docs/GrpcGatewayRuntimeError.md)
- [GrpcGatewayRuntimeStreamError](docs/GrpcGatewayRuntimeStreamError.md)
- [IsAuthorized](docs/IsAuthorized.md)
- [IsAuthorizedResponse](docs/IsAuthorizedResponse.md)
- [IsValidTokenResponse](docs/IsValidTokenResponse.md)
- [KeyValue](docs/KeyValue.md)
Expand All @@ -179,6 +183,8 @@ Class | Method | HTTP request | Description
- [LogEntry](docs/LogEntry.md)
- [Metric](docs/Metric.md)
- [Namespace](docs/Namespace.md)
- [NodePool](docs/NodePool.md)
- [NodePoolOption](docs/NodePoolOption.md)
- [Parameter](docs/Parameter.md)
- [ParameterOption](docs/ParameterOption.md)
- [Secret](docs/Secret.md)
Expand Down
14 changes: 9 additions & 5 deletions docs/AuthServiceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Method | HTTP request | Description


# **is_authorized**
> IsAuthorizedResponse is_authorized()
> IsAuthorizedResponse is_authorized(body)



Expand All @@ -35,16 +35,20 @@ configuration.host = "http://localhost:8888"
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 |

try:
api_response = api_instance.is_authorized()
api_response = api_instance.is_authorized(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthServiceApi->is_authorized: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**IsAuthorized**](IsAuthorized.md)| |

### Return type

Expand All @@ -56,7 +60,7 @@ This endpoint does not need any parameter.

### HTTP request headers

- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details
Expand Down
68 changes: 68 additions & 0 deletions docs/ConfigServiceApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# onepanel.core.api.ConfigServiceApi

All URIs are relative to *http://localhost:8888*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_config**](ConfigServiceApi.md#get_config) | **GET** /apis/v1beta1/config |


# **get_config**
> GetConfigResponse get_config()



### 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
configuration = onepanel.core.api.Configuration()
# Configure API key authorization: Bearer
configuration.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'

# Defining host is optional and default to http://localhost:8888
configuration.host = "http://localhost:8888"

# 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.ConfigServiceApi(api_client)

try:
api_response = api_instance.get_config()
pprint(api_response)
except ApiException as e:
print("Exception when calling ConfigServiceApi->get_config: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**GetConfigResponse**](GetConfigResponse.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### 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)

13 changes: 13 additions & 0 deletions docs/GetConfigResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# GetConfigResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**api_url** | **str** | | [optional]
**domain** | **str** | | [optional]
**fqdn** | **str** | | [optional]
**node_pool** | [**NodePool**](NodePool.md) | | [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)


14 changes: 14 additions & 0 deletions docs/IsAuthorized.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# IsAuthorized

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**namespace** | **str** | | [optional]
**verb** | **str** | | [optional]
**group** | **str** | | [optional]
**resource** | **str** | | [optional]
**resource_name** | **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)


11 changes: 11 additions & 0 deletions docs/NodePool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# NodePool

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **str** | | [optional]
**options** | [**list[NodePoolOption]**](NodePoolOption.md) | | [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)


11 changes: 11 additions & 0 deletions docs/NodePoolOption.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# NodePoolOption

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**value** | **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)


9 changes: 7 additions & 2 deletions onepanel/core/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@

Onepanel API # noqa: E501

The version of the OpenAPI document: 0.10.0
The version of the OpenAPI document: 0.11.0
Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

__version__ = "0.10.0"
__version__ = "0.11.0"

# import apis into sdk package
from onepanel.core.api.api.auth_service_api import AuthServiceApi
from onepanel.core.api.api.config_service_api import ConfigServiceApi
from onepanel.core.api.api.cron_workflow_service_api import CronWorkflowServiceApi
from onepanel.core.api.api.label_service_api import LabelServiceApi
from onepanel.core.api.api.namespace_service_api import NamespaceServiceApi
Expand Down Expand Up @@ -46,11 +47,13 @@
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_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
from onepanel.core.api.models.google_protobuf_any import GoogleProtobufAny
from onepanel.core.api.models.grpc_gateway_runtime_error import GrpcGatewayRuntimeError
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_response import IsValidTokenResponse
from onepanel.core.api.models.key_value import KeyValue
Expand All @@ -68,6 +71,8 @@
from onepanel.core.api.models.log_entry import LogEntry
from onepanel.core.api.models.metric import Metric
from onepanel.core.api.models.namespace import Namespace
from onepanel.core.api.models.node_pool import NodePool
from onepanel.core.api.models.node_pool_option import NodePoolOption
from onepanel.core.api.models.parameter import Parameter
from onepanel.core.api.models.parameter_option import ParameterOption
from onepanel.core.api.models.secret import Secret
Expand Down
1 change: 1 addition & 0 deletions onepanel/core/api/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# import apis into api package
from onepanel.core.api.api.auth_service_api import AuthServiceApi
from onepanel.core.api.api.config_service_api import ConfigServiceApi
from onepanel.core.api.api.cron_workflow_service_api import CronWorkflowServiceApi
from onepanel.core.api.api.label_service_api import LabelServiceApi
from onepanel.core.api.api.namespace_service_api import NamespaceServiceApi
Expand Down
26 changes: 19 additions & 7 deletions onepanel/core/api/api/auth_service_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Onepanel API # noqa: E501

The version of the OpenAPI document: 0.10.0
The version of the OpenAPI document: 0.11.0
Generated by: https://openapi-generator.tech
"""

Expand Down Expand Up @@ -36,15 +36,16 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client

def is_authorized(self, **kwargs): # 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_authorized(async_req=True)
>>> thread = api.is_authorized(body, async_req=True)
>>> result = thread.get()

:param async_req bool: execute request asynchronously
:param IsAuthorized body: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
Expand All @@ -57,17 +58,18 @@ def is_authorized(self, **kwargs): # noqa: E501
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.is_authorized_with_http_info(**kwargs) # noqa: E501
return self.is_authorized_with_http_info(body, **kwargs) # noqa: E501

def is_authorized_with_http_info(self, **kwargs): # 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_authorized_with_http_info(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 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
Expand All @@ -84,7 +86,7 @@ def is_authorized_with_http_info(self, **kwargs): # noqa: E501

local_var_params = locals()

all_params = [] # noqa: E501
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
Expand All @@ -98,6 +100,10 @@ def is_authorized_with_http_info(self, **kwargs): # noqa: E501
)
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

collection_formats = {}

Expand All @@ -111,10 +117,16 @@ def is_authorized_with_http_info(self, **kwargs): # noqa: E501
local_var_files = {}

body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501

# Authentication setting
auth_settings = ['Bearer'] # noqa: E501

Expand Down
Loading