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
9 changes: 4 additions & 5 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.11.0
- Package version: 0.11.0
- API version: 0.12.0
- Package version: 0.12.0b
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://github.com/onepanelio/core](https://github.com/onepanelio/core)

Expand All @@ -18,9 +18,9 @@ Python 2.7 and 3.4+
If the python package is hosted on a repository, you can install directly using:

```sh
pip install onepanel-sdk
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install onepanel-sdk`)
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
Expand Down Expand Up @@ -141,7 +141,6 @@ Class | Method | HTTP request | Description
*WorkflowTemplateServiceApi* | [**get_workflow_template2**](docs/WorkflowTemplateServiceApi.md#get_workflow_template2) | **GET** /apis/v1beta1/{namespace}/workflow_templates/{uid}/versions/{version} |
*WorkflowTemplateServiceApi* | [**list_workflow_template_versions**](docs/WorkflowTemplateServiceApi.md#list_workflow_template_versions) | **GET** /apis/v1beta1/{namespace}/workflow_templates/{uid}/versions |
*WorkflowTemplateServiceApi* | [**list_workflow_templates**](docs/WorkflowTemplateServiceApi.md#list_workflow_templates) | **GET** /apis/v1beta1/{namespace}/workflow_templates |
*WorkflowTemplateServiceApi* | [**update_workflow_template_version**](docs/WorkflowTemplateServiceApi.md#update_workflow_template_version) | **PUT** /apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions/{workflowTemplate.version} |
*WorkspaceServiceApi* | [**create_workspace**](docs/WorkspaceServiceApi.md#create_workspace) | **POST** /apis/v1beta1/{namespace}/workspaces |
*WorkspaceServiceApi* | [**delete_workspace**](docs/WorkspaceServiceApi.md#delete_workspace) | **DELETE** /apis/v1beta1/{namespace}/workspaces/{uid} |
*WorkspaceServiceApi* | [**get_workspace**](docs/WorkspaceServiceApi.md#get_workspace) | **GET** /apis/v1beta1/{namespace}/workspaces/{uid} |
Expand Down
1 change: 1 addition & 0 deletions docs/WorkflowTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Name | Type | Description | Notes
**labels** | [**list[KeyValue]**](KeyValue.md) | | [optional]
**stats** | [**WorkflowExecutionStatisticReport**](WorkflowExecutionStatisticReport.md) | | [optional]
**cron_stats** | [**CronWorkflowStatisticsReport**](CronWorkflowStatisticsReport.md) | | [optional]
**parameters** | [**list[Parameter]**](Parameter.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)

Expand Down
82 changes: 0 additions & 82 deletions docs/WorkflowTemplateServiceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Method | HTTP request | Description
[**get_workflow_template2**](WorkflowTemplateServiceApi.md#get_workflow_template2) | **GET** /apis/v1beta1/{namespace}/workflow_templates/{uid}/versions/{version} |
[**list_workflow_template_versions**](WorkflowTemplateServiceApi.md#list_workflow_template_versions) | **GET** /apis/v1beta1/{namespace}/workflow_templates/{uid}/versions |
[**list_workflow_templates**](WorkflowTemplateServiceApi.md#list_workflow_templates) | **GET** /apis/v1beta1/{namespace}/workflow_templates |
[**update_workflow_template_version**](WorkflowTemplateServiceApi.md#update_workflow_template_version) | **PUT** /apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions/{workflowTemplate.version} |


# **archive_workflow_template**
Expand Down Expand Up @@ -725,84 +724,3 @@ 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)

# **update_workflow_template_version**
> WorkflowTemplate update_workflow_template_version(namespace, workflow_template_uid, workflow_template_version, body)



### 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 = {
'Bearer': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Bearer'] = '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.WorkflowTemplateServiceApi(api_client)
namespace = 'namespace_example' # str |
workflow_template_uid = 'workflow_template_uid_example' # str |
workflow_template_version = 'workflow_template_version_example' # str |
body = onepanel.core.api.WorkflowTemplate() # WorkflowTemplate |

try:
api_response = api_instance.update_workflow_template_version(namespace, workflow_template_uid, workflow_template_version, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkflowTemplateServiceApi->update_workflow_template_version: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**namespace** | **str**| |
**workflow_template_uid** | **str**| |
**workflow_template_version** | **str**| |
**body** | [**WorkflowTemplate**](WorkflowTemplate.md)| |

### Return type

[**WorkflowTemplate**](WorkflowTemplate.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: application/json
- **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)

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

Onepanel API # noqa: E501

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


from __future__ import absolute_import

__version__ = "0.11.0"
__version__ = "0.12.0b"

# import apis into sdk package
from onepanel.core.api.api.auth_service_api import AuthServiceApi
Expand Down
2 changes: 1 addition & 1 deletion 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.11.0
The version of the OpenAPI document: 0.12.0
Generated by: https://openapi-generator.tech
"""

Expand Down
2 changes: 1 addition & 1 deletion onepanel/core/api/api/config_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.11.0
The version of the OpenAPI document: 0.12.0
Generated by: https://openapi-generator.tech
"""

Expand Down
2 changes: 1 addition & 1 deletion onepanel/core/api/api/cron_workflow_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.11.0
The version of the OpenAPI document: 0.12.0
Generated by: https://openapi-generator.tech
"""

Expand Down
2 changes: 1 addition & 1 deletion onepanel/core/api/api/label_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.11.0
The version of the OpenAPI document: 0.12.0
Generated by: https://openapi-generator.tech
"""

Expand Down
2 changes: 1 addition & 1 deletion onepanel/core/api/api/namespace_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.11.0
The version of the OpenAPI document: 0.12.0
Generated by: https://openapi-generator.tech
"""

Expand Down
2 changes: 1 addition & 1 deletion onepanel/core/api/api/secret_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.11.0
The version of the OpenAPI document: 0.12.0
Generated by: https://openapi-generator.tech
"""

Expand Down
2 changes: 1 addition & 1 deletion onepanel/core/api/api/workflow_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.11.0
The version of the OpenAPI document: 0.12.0
Generated by: https://openapi-generator.tech
"""

Expand Down
168 changes: 1 addition & 167 deletions onepanel/core/api/api/workflow_template_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.11.0
The version of the OpenAPI document: 0.12.0
Generated by: https://openapi-generator.tech
"""

Expand Down Expand Up @@ -1375,169 +1375,3 @@ def list_workflow_templates_with_http_info(self, namespace, **kwargs): # noqa:
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))

def update_workflow_template_version(self, namespace, workflow_template_uid, workflow_template_version, body, **kwargs): # noqa: E501
"""update_workflow_template_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.update_workflow_template_version(namespace, workflow_template_uid, workflow_template_version, body, async_req=True)
>>> result = thread.get()

:param namespace: (required)
:type namespace: str
:param workflow_template_uid: (required)
:type workflow_template_uid: str
:param workflow_template_version: (required)
:type workflow_template_version: str
:param body: (required)
:type body: WorkflowTemplate
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
: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: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: WorkflowTemplate
"""
kwargs['_return_http_data_only'] = True
return self.update_workflow_template_version_with_http_info(namespace, workflow_template_uid, workflow_template_version, body, **kwargs) # noqa: E501

def update_workflow_template_version_with_http_info(self, namespace, workflow_template_uid, workflow_template_version, body, **kwargs): # noqa: E501
"""update_workflow_template_version # noqa: E501

This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.update_workflow_template_version_with_http_info(namespace, workflow_template_uid, workflow_template_version, body, async_req=True)
>>> result = thread.get()

:param namespace: (required)
:type namespace: str
:param workflow_template_uid: (required)
:type workflow_template_uid: str
:param workflow_template_version: (required)
:type workflow_template_version: str
:param body: (required)
:type body: WorkflowTemplate
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
: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.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(WorkflowTemplate, status_code(int), headers(HTTPHeaderDict))
"""

local_var_params = locals()

all_params = [
'namespace',
'workflow_template_uid',
'workflow_template_version',
'body'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)

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 update_workflow_template_version" % 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 `update_workflow_template_version`") # noqa: E501
# verify the required parameter 'workflow_template_uid' is set
if self.api_client.client_side_validation and ('workflow_template_uid' not in local_var_params or # noqa: E501
local_var_params['workflow_template_uid'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `workflow_template_uid` when calling `update_workflow_template_version`") # noqa: E501
# verify the required parameter 'workflow_template_version' is set
if self.api_client.client_side_validation and ('workflow_template_version' not in local_var_params or # noqa: E501
local_var_params['workflow_template_version'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `workflow_template_version` when calling `update_workflow_template_version`") # noqa: E501
# 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 `update_workflow_template_version`") # noqa: E501

collection_formats = {}

path_params = {}
if 'namespace' in local_var_params:
path_params['namespace'] = local_var_params['namespace'] # noqa: E501
if 'workflow_template_uid' in local_var_params:
path_params['workflowTemplate.uid'] = local_var_params['workflow_template_uid'] # noqa: E501
if 'workflow_template_version' in local_var_params:
path_params['workflowTemplate.version'] = local_var_params['workflow_template_version'] # noqa: E501

query_params = []

header_params = {}

form_params = []
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

return self.api_client.call_api(
'/apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions/{workflowTemplate.version}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='WorkflowTemplate', # 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,
_request_auth=local_var_params.get('_request_auth'))
2 changes: 1 addition & 1 deletion onepanel/core/api/api/workspace_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.11.0
The version of the OpenAPI document: 0.12.0
Generated by: https://openapi-generator.tech
"""

Expand Down
Loading