Skip to content

Commit 3060ee0

Browse files
authored
Merge pull request #8 from onepanelio/dev
feat: update to v0.11.0
2 parents f4a38d6 + 35398dc commit 3060ee0

83 files changed

Lines changed: 1349 additions & 85 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Onepanel API
33

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

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

@@ -67,9 +67,10 @@ configuration.host = "http://localhost:8888"
6767
with onepanel.core.api.ApiClient(configuration) as api_client:
6868
# Create an instance of the API class
6969
api_instance = onepanel.core.api.AuthServiceApi(api_client)
70-
70+
body = onepanel.core.api.IsAuthorized() # IsAuthorized |
71+
7172
try:
72-
api_response = api_instance.is_authorized()
73+
api_response = api_instance.is_authorized(body)
7374
pprint(api_response)
7475
except ApiException as e:
7576
print("Exception when calling AuthServiceApi->is_authorized: %s\n" % e)
@@ -84,6 +85,7 @@ Class | Method | HTTP request | Description
8485
------------ | ------------- | ------------- | -------------
8586
*AuthServiceApi* | [**is_authorized**](docs/AuthServiceApi.md#is_authorized) | **POST** /apis/v1beta1/auth |
8687
*AuthServiceApi* | [**is_valid_token**](docs/AuthServiceApi.md#is_valid_token) | **POST** /apis/v1beta1/auth/token |
88+
*ConfigServiceApi* | [**get_config**](docs/ConfigServiceApi.md#get_config) | **GET** /apis/v1beta1/config |
8789
*CronWorkflowServiceApi* | [**create_cron_workflow**](docs/CronWorkflowServiceApi.md#create_cron_workflow) | **POST** /apis/v1beta1/{namespace}/cron_workflow |
8890
*CronWorkflowServiceApi* | [**delete_cron_workflow**](docs/CronWorkflowServiceApi.md#delete_cron_workflow) | **DELETE** /apis/v1beta1/{namespace}/cron_workflows/{uid} |
8991
*CronWorkflowServiceApi* | [**get_cron_workflow**](docs/CronWorkflowServiceApi.md#get_cron_workflow) | **GET** /apis/v1beta1/{namespace}/cron_workflow/{uid} |
@@ -157,11 +159,13 @@ Class | Method | HTTP request | Description
157159
- [DeleteSecretKeyResponse](docs/DeleteSecretKeyResponse.md)
158160
- [DeleteSecretResponse](docs/DeleteSecretResponse.md)
159161
- [File](docs/File.md)
162+
- [GetConfigResponse](docs/GetConfigResponse.md)
160163
- [GetLabelsResponse](docs/GetLabelsResponse.md)
161164
- [GetWorkflowExecutionMetricsResponse](docs/GetWorkflowExecutionMetricsResponse.md)
162165
- [GoogleProtobufAny](docs/GoogleProtobufAny.md)
163166
- [GrpcGatewayRuntimeError](docs/GrpcGatewayRuntimeError.md)
164167
- [GrpcGatewayRuntimeStreamError](docs/GrpcGatewayRuntimeStreamError.md)
168+
- [IsAuthorized](docs/IsAuthorized.md)
165169
- [IsAuthorizedResponse](docs/IsAuthorizedResponse.md)
166170
- [IsValidTokenResponse](docs/IsValidTokenResponse.md)
167171
- [KeyValue](docs/KeyValue.md)
@@ -179,6 +183,8 @@ Class | Method | HTTP request | Description
179183
- [LogEntry](docs/LogEntry.md)
180184
- [Metric](docs/Metric.md)
181185
- [Namespace](docs/Namespace.md)
186+
- [NodePool](docs/NodePool.md)
187+
- [NodePoolOption](docs/NodePoolOption.md)
182188
- [Parameter](docs/Parameter.md)
183189
- [ParameterOption](docs/ParameterOption.md)
184190
- [Secret](docs/Secret.md)

docs/AuthServiceApi.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Method | HTTP request | Description
99

1010

1111
# **is_authorized**
12-
> IsAuthorizedResponse is_authorized()
12+
> IsAuthorizedResponse is_authorized(body)
1313
1414

1515

@@ -35,16 +35,20 @@ configuration.host = "http://localhost:8888"
3535
with onepanel.core.api.ApiClient(configuration) as api_client:
3636
# Create an instance of the API class
3737
api_instance = onepanel.core.api.AuthServiceApi(api_client)
38-
38+
body = onepanel.core.api.IsAuthorized() # IsAuthorized |
39+
3940
try:
40-
api_response = api_instance.is_authorized()
41+
api_response = api_instance.is_authorized(body)
4142
pprint(api_response)
4243
except ApiException as e:
4344
print("Exception when calling AuthServiceApi->is_authorized: %s\n" % e)
4445
```
4546

4647
### Parameters
47-
This endpoint does not need any parameter.
48+
49+
Name | Type | Description | Notes
50+
------------- | ------------- | ------------- | -------------
51+
**body** | [**IsAuthorized**](IsAuthorized.md)| |
4852

4953
### Return type
5054

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

5761
### HTTP request headers
5862

59-
- **Content-Type**: Not defined
63+
- **Content-Type**: application/json
6064
- **Accept**: application/json
6165

6266
### HTTP response details

docs/ConfigServiceApi.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# onepanel.core.api.ConfigServiceApi
2+
3+
All URIs are relative to *http://localhost:8888*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**get_config**](ConfigServiceApi.md#get_config) | **GET** /apis/v1beta1/config |
8+
9+
10+
# **get_config**
11+
> GetConfigResponse get_config()
12+
13+
14+
15+
### Example
16+
17+
* Api Key Authentication (Bearer):
18+
```python
19+
from __future__ import print_function
20+
import time
21+
import onepanel.core.api
22+
from onepanel.core.api.rest import ApiException
23+
from pprint import pprint
24+
configuration = onepanel.core.api.Configuration()
25+
# Configure API key authorization: Bearer
26+
configuration.api_key['authorization'] = 'YOUR_API_KEY'
27+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
28+
# configuration.api_key_prefix['authorization'] = 'Bearer'
29+
30+
# Defining host is optional and default to http://localhost:8888
31+
configuration.host = "http://localhost:8888"
32+
33+
# Enter a context with an instance of the API client
34+
with onepanel.core.api.ApiClient(configuration) as api_client:
35+
# Create an instance of the API class
36+
api_instance = onepanel.core.api.ConfigServiceApi(api_client)
37+
38+
try:
39+
api_response = api_instance.get_config()
40+
pprint(api_response)
41+
except ApiException as e:
42+
print("Exception when calling ConfigServiceApi->get_config: %s\n" % e)
43+
```
44+
45+
### Parameters
46+
This endpoint does not need any parameter.
47+
48+
### Return type
49+
50+
[**GetConfigResponse**](GetConfigResponse.md)
51+
52+
### Authorization
53+
54+
[Bearer](../README.md#Bearer)
55+
56+
### HTTP request headers
57+
58+
- **Content-Type**: Not defined
59+
- **Accept**: application/json
60+
61+
### HTTP response details
62+
| Status code | Description | Response headers |
63+
|-------------|-------------|------------------|
64+
**200** | A successful response. | - |
65+
**0** | An unexpected error response | - |
66+
67+
[[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)
68+

docs/GetConfigResponse.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# GetConfigResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**api_url** | **str** | | [optional]
7+
**domain** | **str** | | [optional]
8+
**fqdn** | **str** | | [optional]
9+
**node_pool** | [**NodePool**](NodePool.md) | | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+

docs/IsAuthorized.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# IsAuthorized
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**namespace** | **str** | | [optional]
7+
**verb** | **str** | | [optional]
8+
**group** | **str** | | [optional]
9+
**resource** | **str** | | [optional]
10+
**resource_name** | **str** | | [optional]
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+

docs/NodePool.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# NodePool
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**label** | **str** | | [optional]
7+
**options** | [**list[NodePoolOption]**](NodePoolOption.md) | | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/NodePoolOption.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# NodePoolOption
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **str** | | [optional]
7+
**value** | **str** | | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

onepanel/core/api/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
88
Onepanel API # noqa: E501
99
10-
The version of the OpenAPI document: 0.10.0
10+
The version of the OpenAPI document: 0.11.0
1111
Generated by: https://openapi-generator.tech
1212
"""
1313

1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "0.10.0"
17+
__version__ = "0.11.0"
1818

1919
# import apis into sdk package
2020
from onepanel.core.api.api.auth_service_api import AuthServiceApi
21+
from onepanel.core.api.api.config_service_api import ConfigServiceApi
2122
from onepanel.core.api.api.cron_workflow_service_api import CronWorkflowServiceApi
2223
from onepanel.core.api.api.label_service_api import LabelServiceApi
2324
from onepanel.core.api.api.namespace_service_api import NamespaceServiceApi
@@ -46,11 +47,13 @@
4647
from onepanel.core.api.models.delete_secret_key_response import DeleteSecretKeyResponse
4748
from onepanel.core.api.models.delete_secret_response import DeleteSecretResponse
4849
from onepanel.core.api.models.file import File
50+
from onepanel.core.api.models.get_config_response import GetConfigResponse
4951
from onepanel.core.api.models.get_labels_response import GetLabelsResponse
5052
from onepanel.core.api.models.get_workflow_execution_metrics_response import GetWorkflowExecutionMetricsResponse
5153
from onepanel.core.api.models.google_protobuf_any import GoogleProtobufAny
5254
from onepanel.core.api.models.grpc_gateway_runtime_error import GrpcGatewayRuntimeError
5355
from onepanel.core.api.models.grpc_gateway_runtime_stream_error import GrpcGatewayRuntimeStreamError
56+
from onepanel.core.api.models.is_authorized import IsAuthorized
5457
from onepanel.core.api.models.is_authorized_response import IsAuthorizedResponse
5558
from onepanel.core.api.models.is_valid_token_response import IsValidTokenResponse
5659
from onepanel.core.api.models.key_value import KeyValue
@@ -68,6 +71,8 @@
6871
from onepanel.core.api.models.log_entry import LogEntry
6972
from onepanel.core.api.models.metric import Metric
7073
from onepanel.core.api.models.namespace import Namespace
74+
from onepanel.core.api.models.node_pool import NodePool
75+
from onepanel.core.api.models.node_pool_option import NodePoolOption
7176
from onepanel.core.api.models.parameter import Parameter
7277
from onepanel.core.api.models.parameter_option import ParameterOption
7378
from onepanel.core.api.models.secret import Secret

onepanel/core/api/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# import apis into api package
66
from onepanel.core.api.api.auth_service_api import AuthServiceApi
7+
from onepanel.core.api.api.config_service_api import ConfigServiceApi
78
from onepanel.core.api.api.cron_workflow_service_api import CronWorkflowServiceApi
89
from onepanel.core.api.api.label_service_api import LabelServiceApi
910
from onepanel.core.api.api.namespace_service_api import NamespaceServiceApi

onepanel/core/api/api/auth_service_api.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Onepanel API # noqa: E501
77
8-
The version of the OpenAPI document: 0.10.0
8+
The version of the OpenAPI document: 0.11.0
99
Generated by: https://openapi-generator.tech
1010
"""
1111

@@ -36,15 +36,16 @@ def __init__(self, api_client=None):
3636
api_client = ApiClient()
3737
self.api_client = api_client
3838

39-
def is_authorized(self, **kwargs): # noqa: E501
39+
def is_authorized(self, body, **kwargs): # noqa: E501
4040
"""is_authorized # noqa: E501
4141
4242
This method makes a synchronous HTTP request by default. To make an
4343
asynchronous HTTP request, please pass async_req=True
44-
>>> thread = api.is_authorized(async_req=True)
44+
>>> thread = api.is_authorized(body, async_req=True)
4545
>>> result = thread.get()
4646
4747
:param async_req bool: execute request asynchronously
48+
:param IsAuthorized body: (required)
4849
:param _preload_content: if False, the urllib3.HTTPResponse object will
4950
be returned without reading/decoding response
5051
data. Default is True.
@@ -57,17 +58,18 @@ def is_authorized(self, **kwargs): # noqa: E501
5758
returns the request thread.
5859
"""
5960
kwargs['_return_http_data_only'] = True
60-
return self.is_authorized_with_http_info(**kwargs) # noqa: E501
61+
return self.is_authorized_with_http_info(body, **kwargs) # noqa: E501
6162

62-
def is_authorized_with_http_info(self, **kwargs): # noqa: E501
63+
def is_authorized_with_http_info(self, body, **kwargs): # noqa: E501
6364
"""is_authorized # noqa: E501
6465
6566
This method makes a synchronous HTTP request by default. To make an
6667
asynchronous HTTP request, please pass async_req=True
67-
>>> thread = api.is_authorized_with_http_info(async_req=True)
68+
>>> thread = api.is_authorized_with_http_info(body, async_req=True)
6869
>>> result = thread.get()
6970
7071
:param async_req bool: execute request asynchronously
72+
:param IsAuthorized body: (required)
7173
:param _return_http_data_only: response data without head status code
7274
and headers
7375
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -84,7 +86,7 @@ def is_authorized_with_http_info(self, **kwargs): # noqa: E501
8486

8587
local_var_params = locals()
8688

87-
all_params = [] # noqa: E501
89+
all_params = ['body'] # noqa: E501
8890
all_params.append('async_req')
8991
all_params.append('_return_http_data_only')
9092
all_params.append('_preload_content')
@@ -98,6 +100,10 @@ def is_authorized_with_http_info(self, **kwargs): # noqa: E501
98100
)
99101
local_var_params[key] = val
100102
del local_var_params['kwargs']
103+
# verify the required parameter 'body' is set
104+
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
105+
local_var_params['body'] is None): # noqa: E501
106+
raise ApiValueError("Missing the required parameter `body` when calling `is_authorized`") # noqa: E501
101107

102108
collection_formats = {}
103109

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

113119
body_params = None
120+
if 'body' in local_var_params:
121+
body_params = local_var_params['body']
114122
# HTTP header `Accept`
115123
header_params['Accept'] = self.api_client.select_header_accept(
116124
['application/json']) # noqa: E501
117125

126+
# HTTP header `Content-Type`
127+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
128+
['application/json']) # noqa: E501
129+
118130
# Authentication setting
119131
auth_settings = ['Bearer'] # noqa: E501
120132

0 commit comments

Comments
 (0)