Rename worker clusters to tags #104223
27
addon/flamenco/manager/__init__.py
generated
27
addon/flamenco/manager/__init__.py
generated
@ -1,27 +0,0 @@
|
||||
# flake8: noqa
|
||||
|
||||
"""
|
||||
Flamenco manager
|
||||
|
||||
Render Farm manager API # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
__version__ = "3.3-alpha0"
|
||||
|
||||
# import ApiClient
|
||||
from flamenco.manager.api_client import ApiClient
|
||||
|
||||
# import Configuration
|
||||
from flamenco.manager.configuration import Configuration
|
||||
|
||||
# import exceptions
|
||||
from flamenco.manager.exceptions import OpenApiException
|
||||
from flamenco.manager.exceptions import ApiAttributeError
|
||||
from flamenco.manager.exceptions import ApiTypeError
|
||||
from flamenco.manager.exceptions import ApiValueError
|
||||
from flamenco.manager.exceptions import ApiKeyError
|
||||
from flamenco.manager.exceptions import ApiException
|
3
addon/flamenco/manager/api/__init__.py
generated
3
addon/flamenco/manager/api/__init__.py
generated
@ -1,3 +0,0 @@
|
||||
# do not import all apis into this module because that uses a lot of memory and stack frames
|
||||
# if you need the ability to import all apis from one package, import them with
|
||||
# from flamenco.manager.apis import JobsApi
|
2467
addon/flamenco/manager/api/jobs_api.py
generated
2467
addon/flamenco/manager/api/jobs_api.py
generated
File diff suppressed because it is too large
Load Diff
1140
addon/flamenco/manager/api/meta_api.py
generated
1140
addon/flamenco/manager/api/meta_api.py
generated
File diff suppressed because it is too large
Load Diff
592
addon/flamenco/manager/api/shaman_api.py
generated
592
addon/flamenco/manager/api/shaman_api.py
generated
@ -1,592 +0,0 @@
|
||||
"""
|
||||
Flamenco manager
|
||||
|
||||
Render Farm manager API # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
|
||||
from flamenco.manager.api_client import ApiClient, Endpoint as _Endpoint
|
||||
from flamenco.manager.model_utils import ( # noqa: F401
|
||||
check_allowed_values,
|
||||
check_validations,
|
||||
date,
|
||||
datetime,
|
||||
file_type,
|
||||
none_type,
|
||||
validate_and_convert_types
|
||||
)
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.shaman_checkout import ShamanCheckout
|
||||
from flamenco.manager.model.shaman_checkout_result import ShamanCheckoutResult
|
||||
from flamenco.manager.model.shaman_requirements_request import ShamanRequirementsRequest
|
||||
from flamenco.manager.model.shaman_requirements_response import ShamanRequirementsResponse
|
||||
from flamenco.manager.model.shaman_single_file_status import ShamanSingleFileStatus
|
||||
|
||||
|
||||
class ShamanApi(object):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None):
|
||||
if api_client is None:
|
||||
api_client = ApiClient()
|
||||
self.api_client = api_client
|
||||
self.shaman_checkout_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': (ShamanCheckoutResult,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/api/v3/shaman/checkout/create',
|
||||
'operation_id': 'shaman_checkout',
|
||||
'http_method': 'POST',
|
||||
'servers': None,
|
||||
},
|
||||
params_map={
|
||||
'all': [
|
||||
'shaman_checkout',
|
||||
],
|
||||
'required': [
|
||||
'shaman_checkout',
|
||||
],
|
||||
'nullable': [
|
||||
],
|
||||
'enum': [
|
||||
],
|
||||
'validation': [
|
||||
]
|
||||
},
|
||||
root_map={
|
||||
'validations': {
|
||||
},
|
||||
'allowed_values': {
|
||||
},
|
||||
'openapi_types': {
|
||||
'shaman_checkout':
|
||||
(ShamanCheckout,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
'location_map': {
|
||||
'shaman_checkout': 'body',
|
||||
},
|
||||
'collection_format_map': {
|
||||
}
|
||||
},
|
||||
headers_map={
|
||||
'accept': [
|
||||
'application/json'
|
||||
],
|
||||
'content_type': [
|
||||
'application/json'
|
||||
]
|
||||
},
|
||||
api_client=api_client
|
||||
)
|
||||
self.shaman_checkout_requirements_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': (ShamanRequirementsResponse,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/api/v3/shaman/checkout/requirements',
|
||||
'operation_id': 'shaman_checkout_requirements',
|
||||
'http_method': 'POST',
|
||||
'servers': None,
|
||||
},
|
||||
params_map={
|
||||
'all': [
|
||||
'shaman_requirements_request',
|
||||
],
|
||||
'required': [
|
||||
'shaman_requirements_request',
|
||||
],
|
||||
'nullable': [
|
||||
],
|
||||
'enum': [
|
||||
],
|
||||
'validation': [
|
||||
]
|
||||
},
|
||||
root_map={
|
||||
'validations': {
|
||||
},
|
||||
'allowed_values': {
|
||||
},
|
||||
'openapi_types': {
|
||||
'shaman_requirements_request':
|
||||
(ShamanRequirementsRequest,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
'location_map': {
|
||||
'shaman_requirements_request': 'body',
|
||||
},
|
||||
'collection_format_map': {
|
||||
}
|
||||
},
|
||||
headers_map={
|
||||
'accept': [
|
||||
'application/json'
|
||||
],
|
||||
'content_type': [
|
||||
'application/json'
|
||||
]
|
||||
},
|
||||
api_client=api_client
|
||||
)
|
||||
self.shaman_file_store_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
'endpoint_path': '/api/v3/shaman/files/{checksum}/{filesize}',
|
||||
'operation_id': 'shaman_file_store',
|
||||
'http_method': 'POST',
|
||||
'servers': None,
|
||||
},
|
||||
params_map={
|
||||
'all': [
|
||||
'checksum',
|
||||
'filesize',
|
||||
'body',
|
||||
'x_shaman_can_defer_upload',
|
||||
'x_shaman_original_filename',
|
||||
],
|
||||
'required': [
|
||||
'checksum',
|
||||
'filesize',
|
||||
'body',
|
||||
],
|
||||
'nullable': [
|
||||
],
|
||||
'enum': [
|
||||
],
|
||||
'validation': [
|
||||
]
|
||||
},
|
||||
root_map={
|
||||
'validations': {
|
||||
},
|
||||
'allowed_values': {
|
||||
},
|
||||
'openapi_types': {
|
||||
'checksum':
|
||||
(str,),
|
||||
'filesize':
|
||||
(int,),
|
||||
'body':
|
||||
(file_type,),
|
||||
'x_shaman_can_defer_upload':
|
||||
(bool,),
|
||||
'x_shaman_original_filename':
|
||||
(str,),
|
||||
},
|
||||
'attribute_map': {
|
||||
'checksum': 'checksum',
|
||||
'filesize': 'filesize',
|
||||
'x_shaman_can_defer_upload': 'X-Shaman-Can-Defer-Upload',
|
||||
'x_shaman_original_filename': 'X-Shaman-Original-Filename',
|
||||
},
|
||||
'location_map': {
|
||||
'checksum': 'path',
|
||||
'filesize': 'path',
|
||||
'body': 'body',
|
||||
'x_shaman_can_defer_upload': 'header',
|
||||
'x_shaman_original_filename': 'header',
|
||||
},
|
||||
'collection_format_map': {
|
||||
}
|
||||
},
|
||||
headers_map={
|
||||
'accept': [
|
||||
'application/json'
|
||||
],
|
||||
'content_type': [
|
||||
'application/octet-stream'
|
||||
]
|
||||
},
|
||||
api_client=api_client
|
||||
)
|
||||
self.shaman_file_store_check_endpoint = _Endpoint(
|
||||
settings={
|
||||
'response_type': (ShamanSingleFileStatus,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/api/v3/shaman/files/{checksum}/{filesize}',
|
||||
'operation_id': 'shaman_file_store_check',
|
||||
'http_method': 'GET',
|
||||
'servers': None,
|
||||
},
|
||||
params_map={
|
||||
'all': [
|
||||
'checksum',
|
||||
'filesize',
|
||||
],
|
||||
'required': [
|
||||
'checksum',
|
||||
'filesize',
|
||||
],
|
||||
'nullable': [
|
||||
],
|
||||
'enum': [
|
||||
],
|
||||
'validation': [
|
||||
]
|
||||
},
|
||||
root_map={
|
||||
'validations': {
|
||||
},
|
||||
'allowed_values': {
|
||||
},
|
||||
'openapi_types': {
|
||||
'checksum':
|
||||
(str,),
|
||||
'filesize':
|
||||
(int,),
|
||||
},
|
||||
'attribute_map': {
|
||||
'checksum': 'checksum',
|
||||
'filesize': 'filesize',
|
||||
},
|
||||
'location_map': {
|
||||
'checksum': 'path',
|
||||
'filesize': 'path',
|
||||
},
|
||||
'collection_format_map': {
|
||||
}
|
||||
},
|
||||
headers_map={
|
||||
'accept': [
|
||||
'application/json'
|
||||
],
|
||||
'content_type': [],
|
||||
},
|
||||
api_client=api_client
|
||||
)
|
||||
|
||||
def shaman_checkout(
|
||||
self,
|
||||
shaman_checkout,
|
||||
**kwargs
|
||||
):
|
||||
"""Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.shaman_checkout(shaman_checkout, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
shaman_checkout (ShamanCheckout): Set of files to check out.
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_content_type (str/None): force body content-type.
|
||||
Default is None and content-type will be predicted by allowed
|
||||
content-types and body.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
ShamanCheckoutResult
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_spec_property_naming'] = kwargs.get(
|
||||
'_spec_property_naming', False
|
||||
)
|
||||
kwargs['_content_type'] = kwargs.get(
|
||||
'_content_type')
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['shaman_checkout'] = \
|
||||
shaman_checkout
|
||||
return self.shaman_checkout_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
def shaman_checkout_requirements(
|
||||
self,
|
||||
shaman_requirements_request,
|
||||
**kwargs
|
||||
):
|
||||
"""Checks a Shaman Requirements file, and reports which files are unknown. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.shaman_checkout_requirements(shaman_requirements_request, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
shaman_requirements_request (ShamanRequirementsRequest): Set of files to check
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_content_type (str/None): force body content-type.
|
||||
Default is None and content-type will be predicted by allowed
|
||||
content-types and body.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
ShamanRequirementsResponse
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_spec_property_naming'] = kwargs.get(
|
||||
'_spec_property_naming', False
|
||||
)
|
||||
kwargs['_content_type'] = kwargs.get(
|
||||
'_content_type')
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['shaman_requirements_request'] = \
|
||||
shaman_requirements_request
|
||||
return self.shaman_checkout_requirements_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
def shaman_file_store(
|
||||
self,
|
||||
checksum,
|
||||
filesize,
|
||||
body,
|
||||
**kwargs
|
||||
):
|
||||
"""Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file's contents should be sent in the request body. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.shaman_file_store(checksum, filesize, body, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
checksum (str): SHA256 checksum of the file.
|
||||
filesize (int): Size of the file in bytes.
|
||||
body (file_type): Contents of the file
|
||||
|
||||
Keyword Args:
|
||||
x_shaman_can_defer_upload (bool): The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file. . [optional]
|
||||
x_shaman_original_filename (str): The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging. . [optional]
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_content_type (str/None): force body content-type.
|
||||
Default is None and content-type will be predicted by allowed
|
||||
content-types and body.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
None
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_spec_property_naming'] = kwargs.get(
|
||||
'_spec_property_naming', False
|
||||
)
|
||||
kwargs['_content_type'] = kwargs.get(
|
||||
'_content_type')
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['checksum'] = \
|
||||
checksum
|
||||
kwargs['filesize'] = \
|
||||
filesize
|
||||
kwargs['body'] = \
|
||||
body
|
||||
return self.shaman_file_store_endpoint.call_with_http_info(**kwargs)
|
||||
|
||||
def shaman_file_store_check(
|
||||
self,
|
||||
checksum,
|
||||
filesize,
|
||||
**kwargs
|
||||
):
|
||||
"""Check the status of a file on the Shaman server. # noqa: E501
|
||||
|
||||
This method makes a synchronous HTTP request by default. To make an
|
||||
asynchronous HTTP request, please pass async_req=True
|
||||
|
||||
>>> thread = api.shaman_file_store_check(checksum, filesize, async_req=True)
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
checksum (str): SHA256 checksum of the file.
|
||||
filesize (int): Size of the file in bytes.
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
will be returned without reading/decoding response data.
|
||||
Default is True.
|
||||
_request_timeout (int/float/tuple): 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.
|
||||
Default is None.
|
||||
_check_input_type (bool): specifies if type checking
|
||||
should be done one the data sent to the server.
|
||||
Default is True.
|
||||
_check_return_type (bool): specifies if type checking
|
||||
should be done one the data received from the server.
|
||||
Default is True.
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_content_type (str/None): force body content-type.
|
||||
Default is None and content-type will be predicted by allowed
|
||||
content-types and body.
|
||||
_host_index (int/None): specifies the index of the server
|
||||
that we want to use.
|
||||
Default is read from the configuration.
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
ShamanSingleFileStatus
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
kwargs['async_req'] = kwargs.get(
|
||||
'async_req', False
|
||||
)
|
||||
kwargs['_return_http_data_only'] = kwargs.get(
|
||||
'_return_http_data_only', True
|
||||
)
|
||||
kwargs['_preload_content'] = kwargs.get(
|
||||
'_preload_content', True
|
||||
)
|
||||
kwargs['_request_timeout'] = kwargs.get(
|
||||
'_request_timeout', None
|
||||
)
|
||||
kwargs['_check_input_type'] = kwargs.get(
|
||||
'_check_input_type', True
|
||||
)
|
||||
kwargs['_check_return_type'] = kwargs.get(
|
||||
'_check_return_type', True
|
||||
)
|
||||
kwargs['_spec_property_naming'] = kwargs.get(
|
||||
'_spec_property_naming', False
|
||||
)
|
||||
kwargs['_content_type'] = kwargs.get(
|
||||
'_content_type')
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
kwargs['checksum'] = \
|
||||
checksum
|
||||
kwargs['filesize'] = \
|
||||
filesize
|
||||
return self.shaman_file_store_check_endpoint.call_with_http_info(**kwargs)
|
||||
|
1187
addon/flamenco/manager/api/worker_api.py
generated
1187
addon/flamenco/manager/api/worker_api.py
generated
File diff suppressed because it is too large
Load Diff
1578
addon/flamenco/manager/api/worker_mgt_api.py
generated
1578
addon/flamenco/manager/api/worker_mgt_api.py
generated
File diff suppressed because it is too large
Load Diff
866
addon/flamenco/manager/api_client.py
generated
866
addon/flamenco/manager/api_client.py
generated
@ -1,866 +0,0 @@
|
||||
"""
|
||||
Flamenco manager
|
||||
|
||||
Render Farm manager API # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
import json
|
||||
import atexit
|
||||
import mimetypes
|
||||
from multiprocessing.pool import ThreadPool
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
import typing
|
||||
from urllib.parse import quote
|
||||
from urllib3.fields import RequestField
|
||||
|
||||
|
||||
from flamenco.manager import rest
|
||||
from flamenco.manager.configuration import Configuration
|
||||
from flamenco.manager.exceptions import ApiTypeError, ApiValueError, ApiException
|
||||
from flamenco.manager.model_utils import (
|
||||
ModelNormal,
|
||||
ModelSimple,
|
||||
ModelComposed,
|
||||
check_allowed_values,
|
||||
check_validations,
|
||||
date,
|
||||
datetime,
|
||||
deserialize_file,
|
||||
file_type,
|
||||
model_to_dict,
|
||||
none_type,
|
||||
validate_and_convert_types
|
||||
)
|
||||
|
||||
|
||||
class ApiClient(object):
|
||||
"""Generic API client for OpenAPI client library builds.
|
||||
|
||||
OpenAPI generic API client. This client handles the client-
|
||||
server communication, and is invariant across implementations. Specifics of
|
||||
the methods and models for each application are generated from the OpenAPI
|
||||
templates.
|
||||
|
||||
NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
Do not edit the class manually.
|
||||
|
||||
:param configuration: .Configuration object for this client
|
||||
:param header_name: a header to pass when making calls to the API.
|
||||
:param header_value: a header value to pass when making calls to
|
||||
the API.
|
||||
:param cookie: a cookie to include in the header when making calls
|
||||
to the API
|
||||
:param pool_threads: The number of threads to use for async requests
|
||||
to the API. More threads means more concurrent API requests.
|
||||
"""
|
||||
|
||||
_pool = None
|
||||
|
||||
def __init__(self, configuration=None, header_name=None, header_value=None,
|
||||
cookie=None, pool_threads=1):
|
||||
if configuration is None:
|
||||
configuration = Configuration.get_default_copy()
|
||||
self.configuration = configuration
|
||||
self.pool_threads = pool_threads
|
||||
|
||||
self.rest_client = rest.RESTClientObject(configuration)
|
||||
self.default_headers = {}
|
||||
if header_name is not None:
|
||||
self.default_headers[header_name] = header_value
|
||||
self.cookie = cookie
|
||||
# Set default User-Agent.
|
||||
self.user_agent = 'Flamenco/3.3-alpha0 (Blender add-on)'
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
self.close()
|
||||
|
||||
def close(self):
|
||||
if self._pool:
|
||||
self._pool.close()
|
||||
self._pool.join()
|
||||
self._pool = None
|
||||
if hasattr(atexit, 'unregister'):
|
||||
atexit.unregister(self.close)
|
||||
|
||||
@property
|
||||
def pool(self):
|
||||
"""Create thread pool on first request
|
||||
avoids instantiating unused threadpool for blocking clients.
|
||||
"""
|
||||
if self._pool is None:
|
||||
atexit.register(self.close)
|
||||
self._pool = ThreadPool(self.pool_threads)
|
||||
return self._pool
|
||||
|
||||
@property
|
||||
def user_agent(self):
|
||||
"""User agent for this API client"""
|
||||
return self.default_headers['User-Agent']
|
||||
|
||||
@user_agent.setter
|
||||
def user_agent(self, value):
|
||||
self.default_headers['User-Agent'] = value
|
||||
|
||||
def set_default_header(self, header_name, header_value):
|
||||
self.default_headers[header_name] = header_value
|
||||
|
||||
def __call_api(
|
||||
self,
|
||||
resource_path: str,
|
||||
method: str,
|
||||
path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
|
||||
query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
|
||||
header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
|
||||
body: typing.Optional[typing.Any] = None,
|
||||
post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
|
||||
files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
|
||||
response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
|
||||
auth_settings: typing.Optional[typing.List[str]] = None,
|
||||
_return_http_data_only: typing.Optional[bool] = None,
|
||||
collection_formats: typing.Optional[typing.Dict[str, str]] = None,
|
||||
_preload_content: bool = True,
|
||||
_request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None,
|
||||
_host: typing.Optional[str] = None,
|
||||
_check_type: typing.Optional[bool] = None,
|
||||
_content_type: typing.Optional[str] = None
|
||||
):
|
||||
|
||||
config = self.configuration
|
||||
|
||||
# header parameters
|
||||
header_params = header_params or {}
|
||||
header_params.update(self.default_headers)
|
||||
if self.cookie:
|
||||
header_params['Cookie'] = self.cookie
|
||||
if header_params:
|
||||
header_params = self.sanitize_for_serialization(header_params)
|
||||
header_params = dict(self.parameters_to_tuples(header_params,
|
||||
collection_formats))
|
||||
|
||||
# path parameters
|
||||
if path_params:
|
||||
path_params = self.sanitize_for_serialization(path_params)
|
||||
path_params = self.parameters_to_tuples(path_params,
|
||||
collection_formats)
|
||||
for k, v in path_params:
|
||||
# specified safe chars, encode everything
|
||||
resource_path = resource_path.replace(
|
||||
'{%s}' % k,
|
||||
quote(str(v), safe=config.safe_chars_for_path_param)
|
||||
)
|
||||
|
||||
# query parameters
|
||||
if query_params:
|
||||
query_params = self.sanitize_for_serialization(query_params)
|
||||
query_params = self.parameters_to_tuples(query_params,
|
||||
collection_formats)
|
||||
|
||||
# post parameters
|
||||
if post_params or files:
|
||||
post_params = post_params if post_params else []
|
||||
post_params = self.sanitize_for_serialization(post_params)
|
||||
post_params = self.parameters_to_tuples(post_params,
|
||||
collection_formats)
|
||||
post_params.extend(self.files_parameters(files))
|
||||
if header_params['Content-Type'].startswith("multipart"):
|
||||
post_params = self.parameters_to_multipart(post_params,
|
||||
(dict) )
|
||||
|
||||
# body
|
||||
if body:
|
||||
body = self.sanitize_for_serialization(body)
|
||||
|
||||
# auth setting
|
||||
self.update_params_for_auth(header_params, query_params,
|
||||
auth_settings, resource_path, method, body)
|
||||
|
||||
# request url
|
||||
if _host is None:
|
||||
url = self.configuration.host + resource_path
|
||||
else:
|
||||
# use server/host defined in path or operation instead
|
||||
url = _host + resource_path
|
||||
|
||||
try:
|
||||
# perform request and return response
|
||||
response_data = self.request(
|
||||
method, url, query_params=query_params, headers=header_params,
|
||||
post_params=post_params, body=body,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout)
|
||||
except ApiException as e:
|
||||
e.body = e.body.decode('utf-8')
|
||||
raise e
|
||||
|
||||
self.last_response = response_data
|
||||
|
||||
return_data = response_data
|
||||
|
||||
if not _preload_content:
|
||||
return (return_data)
|
||||
return return_data
|
||||
|
||||
# deserialize response data
|
||||
if response_type:
|
||||
if response_type != (file_type,):
|
||||
encoding = "utf-8"
|
||||
content_type = response_data.getheader('content-type')
|
||||
if content_type is not None:
|
||||
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
|
||||
if match:
|
||||
encoding = match.group(1)
|
||||
response_data.data = response_data.data.decode(encoding)
|
||||
|
||||
return_data = self.deserialize(
|
||||
response_data,
|
||||
response_type,
|
||||
_check_type
|
||||
)
|
||||
else:
|
||||
return_data = None
|
||||
|
||||
if _return_http_data_only:
|
||||
return (return_data)
|
||||
else:
|
||||
return (return_data, response_data.status,
|
||||
response_data.getheaders())
|
||||
|
||||
def parameters_to_multipart(self, params, collection_types):
|
||||
"""Get parameters as list of tuples, formatting as json if value is collection_types
|
||||
|
||||
:param params: Parameters as list of two-tuples
|
||||
:param dict collection_types: Parameter collection types
|
||||
:return: Parameters as list of tuple or urllib3.fields.RequestField
|
||||
"""
|
||||
new_params = []
|
||||
if collection_types is None:
|
||||
collection_types = (dict)
|
||||
for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
|
||||
if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json
|
||||
v = json.dumps(v, ensure_ascii=False).encode("utf-8")
|
||||
field = RequestField(k, v)
|
||||
field.make_multipart(content_type="application/json; charset=utf-8")
|
||||
new_params.append(field)
|
||||
else:
|
||||
new_params.append((k, v))
|
||||
return new_params
|
||||
|
||||
@classmethod
|
||||
def sanitize_for_serialization(cls, obj):
|
||||
"""Prepares data for transmission before it is sent with the rest client
|
||||
If obj is None, return None.
|
||||
If obj is str, int, long, float, bool, return directly.
|
||||
If obj is datetime.datetime, datetime.date
|
||||
convert to string in iso8601 format.
|
||||
If obj is list, sanitize each element in the list.
|
||||
If obj is dict, return the dict.
|
||||
If obj is OpenAPI model, return the properties dict.
|
||||
If obj is io.IOBase, return the bytes
|
||||
:param obj: The data to serialize.
|
||||
:return: The serialized form of data.
|
||||
"""
|
||||
if isinstance(obj, (ModelNormal, ModelComposed)):
|
||||
return {
|
||||
key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items()
|
||||
}
|
||||
elif isinstance(obj, io.IOBase):
|
||||
return cls.get_file_data_and_close_file(obj)
|
||||
elif isinstance(obj, (str, int, float, none_type, bool)):
|
||||
return obj
|
||||
elif isinstance(obj, (datetime, date)):
|
||||
return obj.isoformat()
|
||||
elif isinstance(obj, ModelSimple):
|
||||
return cls.sanitize_for_serialization(obj.value)
|
||||
elif isinstance(obj, (list, tuple)):
|
||||
return [cls.sanitize_for_serialization(item) for item in obj]
|
||||
if isinstance(obj, dict):
|
||||
return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()}
|
||||
raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__))
|
||||
|
||||
def deserialize(self, response, response_type, _check_type):
|
||||
"""Deserializes response into an object.
|
||||
|
||||
:param response: RESTResponse object to be deserialized.
|
||||
:param response_type: For the response, a tuple containing:
|
||||
valid classes
|
||||
a list containing valid classes (for list schemas)
|
||||
a dict containing a tuple of valid classes as the value
|
||||
Example values:
|
||||
(str,)
|
||||
(Pet,)
|
||||
(float, none_type)
|
||||
([int, none_type],)
|
||||
({str: (bool, str, int, float, date, datetime, str, none_type)},)
|
||||
:param _check_type: boolean, whether to check the types of the data
|
||||
received from the server
|
||||
:type _check_type: bool
|
||||
|
||||
:return: deserialized object.
|
||||
"""
|
||||
# handle file downloading
|
||||
# save response body into a tmp file and return the instance
|
||||
if response_type == (file_type,):
|
||||
content_disposition = response.getheader("Content-Disposition")
|
||||
return deserialize_file(response.data, self.configuration,
|
||||
content_disposition=content_disposition)
|
||||
|
||||
# fetch data from response object
|
||||
try:
|
||||
received_data = json.loads(response.data)
|
||||
except ValueError:
|
||||
received_data = response.data
|
||||
|
||||
# store our data under the key of 'received_data' so users have some
|
||||
# context if they are deserializing a string and the data type is wrong
|
||||
deserialized_data = validate_and_convert_types(
|
||||
received_data,
|
||||
response_type,
|
||||
['received_data'],
|
||||
True,
|
||||
_check_type,
|
||||
configuration=self.configuration
|
||||
)
|
||||
return deserialized_data
|
||||
|
||||
def call_api(
|
||||
self,
|
||||
resource_path: str,
|
||||
method: str,
|
||||
path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
|
||||
query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
|
||||
header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
|
||||
body: typing.Optional[typing.Any] = None,
|
||||
post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
|
||||
files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
|
||||
response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
|
||||
auth_settings: typing.Optional[typing.List[str]] = None,
|
||||
async_req: typing.Optional[bool] = None,
|
||||
_return_http_data_only: typing.Optional[bool] = None,
|
||||
collection_formats: typing.Optional[typing.Dict[str, str]] = None,
|
||||
_preload_content: bool = True,
|
||||
_request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None,
|
||||
_host: typing.Optional[str] = None,
|
||||
_check_type: typing.Optional[bool] = None
|
||||
):
|
||||
"""Makes the HTTP request (synchronous) and returns deserialized data.
|
||||
|
||||
To make an async_req request, set the async_req parameter.
|
||||
|
||||
:param resource_path: Path to method endpoint.
|
||||
:param method: Method to call.
|
||||
:param path_params: Path parameters in the url.
|
||||
:param query_params: Query parameters in the url.
|
||||
:param header_params: Header parameters to be
|
||||
placed in the request header.
|
||||
:param body: Request body.
|
||||
:param post_params dict: Request post form parameters,
|
||||
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
||||
:param auth_settings list: Auth Settings names for the request.
|
||||
:param response_type: For the response, a tuple containing:
|
||||
valid classes
|
||||
a list containing valid classes (for list schemas)
|
||||
a dict containing a tuple of valid classes as the value
|
||||
Example values:
|
||||
(str,)
|
||||
(Pet,)
|
||||
(float, none_type)
|
||||
([int, none_type],)
|
||||
({str: (bool, str, int, float, date, datetime, str, none_type)},)
|
||||
:param files: key -> field name, value -> a list of open file
|
||||
objects for `multipart/form-data`.
|
||||
:type files: dict
|
||||
:param async_req bool: execute 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 collection_formats: dict of collection formats for path, query,
|
||||
header, and post parameters.
|
||||
:type collection_formats: dict, 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 _check_type: boolean describing if the data back from the server
|
||||
should have its type checked.
|
||||
:type _check_type: bool, optional
|
||||
:return:
|
||||
If async_req parameter is True,
|
||||
the request will be called asynchronously.
|
||||
The method will return the request thread.
|
||||
If parameter async_req is False or missing,
|
||||
then the method will return the response directly.
|
||||
"""
|
||||
if not async_req:
|
||||
return self.__call_api(resource_path, method,
|
||||
path_params, query_params, header_params,
|
||||
body, post_params, files,
|
||||
response_type, auth_settings,
|
||||
_return_http_data_only, collection_formats,
|
||||
_preload_content, _request_timeout, _host,
|
||||
_check_type)
|
||||
|
||||
return self.pool.apply_async(self.__call_api, (resource_path,
|
||||
method, path_params,
|
||||
query_params,
|
||||
header_params, body,
|
||||
post_params, files,
|
||||
response_type,
|
||||
auth_settings,
|
||||
_return_http_data_only,
|
||||
collection_formats,
|
||||
_preload_content,
|
||||
_request_timeout,
|
||||
_host, _check_type))
|
||||
|
||||
def request(self, method, url, query_params=None, headers=None,
|
||||
post_params=None, body=None, _preload_content=True,
|
||||
_request_timeout=None):
|
||||
"""Makes the HTTP request using RESTClient."""
|
||||
if method == "GET":
|
||||
return self.rest_client.GET(url,
|
||||
query_params=query_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
headers=headers)
|
||||
elif method == "HEAD":
|
||||
return self.rest_client.HEAD(url,
|
||||
query_params=query_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
headers=headers)
|
||||
elif method == "OPTIONS":
|
||||
return self.rest_client.OPTIONS(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
elif method == "POST":
|
||||
return self.rest_client.POST(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
elif method == "PUT":
|
||||
return self.rest_client.PUT(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
elif method == "PATCH":
|
||||
return self.rest_client.PATCH(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
post_params=post_params,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
elif method == "DELETE":
|
||||
return self.rest_client.DELETE(url,
|
||||
query_params=query_params,
|
||||
headers=headers,
|
||||
_preload_content=_preload_content,
|
||||
_request_timeout=_request_timeout,
|
||||
body=body)
|
||||
else:
|
||||
raise ApiValueError(
|
||||
"http method must be `GET`, `HEAD`, `OPTIONS`,"
|
||||
" `POST`, `PATCH`, `PUT` or `DELETE`."
|
||||
)
|
||||
|
||||
def parameters_to_tuples(self, params, collection_formats):
|
||||
"""Get parameters as list of tuples, formatting collections.
|
||||
|
||||
:param params: Parameters as dict or list of two-tuples
|
||||
:param dict collection_formats: Parameter collection formats
|
||||
:return: Parameters as list of tuples, collections formatted
|
||||
"""
|
||||
new_params = []
|
||||
if collection_formats is None:
|
||||
collection_formats = {}
|
||||
for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
|
||||
if k in collection_formats:
|
||||
collection_format = collection_formats[k]
|
||||
if collection_format == 'multi':
|
||||
new_params.extend((k, value) for value in v)
|
||||
else:
|
||||
if collection_format == 'ssv':
|
||||
delimiter = ' '
|
||||
elif collection_format == 'tsv':
|
||||
delimiter = '\t'
|
||||
elif collection_format == 'pipes':
|
||||
delimiter = '|'
|
||||
else: # csv is the default
|
||||
delimiter = ','
|
||||
new_params.append(
|
||||
(k, delimiter.join(str(value) for value in v)))
|
||||
else:
|
||||
new_params.append((k, v))
|
||||
return new_params
|
||||
|
||||
@staticmethod
|
||||
def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes:
|
||||
file_data = file_instance.read()
|
||||
file_instance.close()
|
||||
return file_data
|
||||
|
||||
def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None):
|
||||
"""Builds form parameters.
|
||||
|
||||
:param files: None or a dict with key=param_name and
|
||||
value is a list of open file objects
|
||||
:return: List of tuples of form parameters with file data
|
||||
"""
|
||||
if files is None:
|
||||
return []
|
||||
|
||||
params = []
|
||||
for param_name, file_instances in files.items():
|
||||
if file_instances is None:
|
||||
# if the file field is nullable, skip None values
|
||||
continue
|
||||
for file_instance in file_instances:
|
||||
if file_instance is None:
|
||||
# if the file field is nullable, skip None values
|
||||
continue
|
||||
if file_instance.closed is True:
|
||||
raise ApiValueError(
|
||||
"Cannot read a closed file. The passed in file_type "
|
||||
"for %s must be open." % param_name
|
||||
)
|
||||
filename = os.path.basename(file_instance.name)
|
||||
filedata = self.get_file_data_and_close_file(file_instance)
|
||||
mimetype = (mimetypes.guess_type(filename)[0] or
|
||||
'application/octet-stream')
|
||||
params.append(
|
||||
tuple([param_name, tuple([filename, filedata, mimetype])]))
|
||||
|
||||
return params
|
||||
|
||||
def select_header_accept(self, accepts):
|
||||
"""Returns `Accept` based on an array of accepts provided.
|
||||
|
||||
:param accepts: List of headers.
|
||||
:return: Accept (e.g. application/json).
|
||||
"""
|
||||
if not accepts:
|
||||
return
|
||||
|
||||
accepts = [x.lower() for x in accepts]
|
||||
|
||||
if 'application/json' in accepts:
|
||||
return 'application/json'
|
||||
else:
|
||||
return ', '.join(accepts)
|
||||
|
||||
def select_header_content_type(self, content_types, method=None, body=None):
|
||||
"""Returns `Content-Type` based on an array of content_types provided.
|
||||
|
||||
:param content_types: List of content-types.
|
||||
:param method: http method (e.g. POST, PATCH).
|
||||
:param body: http body to send.
|
||||
:return: Content-Type (e.g. application/json).
|
||||
"""
|
||||
if not content_types:
|
||||
return 'application/json'
|
||||
|
||||
content_types = [x.lower() for x in content_types]
|
||||
|
||||
if (method == 'PATCH' and
|
||||
'application/json-patch+json' in content_types and
|
||||
isinstance(body, list)):
|
||||
return 'application/json-patch+json'
|
||||
|
||||
if 'application/json' in content_types or '*/*' in content_types:
|
||||
return 'application/json'
|
||||
else:
|
||||
return content_types[0]
|
||||
|
||||
def update_params_for_auth(self, headers, queries, auth_settings,
|
||||
resource_path, method, body):
|
||||
"""Updates header and query params based on authentication setting.
|
||||
|
||||
:param headers: Header parameters dict to be updated.
|
||||
:param queries: Query parameters tuple list to be updated.
|
||||
:param auth_settings: Authentication setting identifiers list.
|
||||
:param resource_path: A string representation of the HTTP request resource path.
|
||||
:param method: A string representation of the HTTP request method.
|
||||
:param body: A object representing the body of the HTTP request.
|
||||
The object type is the return value of _encoder.default().
|
||||
"""
|
||||
if not auth_settings:
|
||||
return
|
||||
|
||||
for auth in auth_settings:
|
||||
auth_setting = self.configuration.auth_settings().get(auth)
|
||||
if auth_setting:
|
||||
if auth_setting['in'] == 'cookie':
|
||||
headers['Cookie'] = auth_setting['value']
|
||||
elif auth_setting['in'] == 'header':
|
||||
if auth_setting['type'] != 'http-signature':
|
||||
headers[auth_setting['key']] = auth_setting['value']
|
||||
elif auth_setting['in'] == 'query':
|
||||
queries.append((auth_setting['key'], auth_setting['value']))
|
||||
else:
|
||||
raise ApiValueError(
|
||||
'Authentication token must be in `query` or `header`'
|
||||
)
|
||||
|
||||
|
||||
class Endpoint(object):
|
||||
def __init__(self, settings=None, params_map=None, root_map=None,
|
||||
headers_map=None, api_client=None, callable=None):
|
||||
"""Creates an endpoint
|
||||
|
||||
Args:
|
||||
settings (dict): see below key value pairs
|
||||
'response_type' (tuple/None): response type
|
||||
'auth' (list): a list of auth type keys
|
||||
'endpoint_path' (str): the endpoint path
|
||||
'operation_id' (str): endpoint string identifier
|
||||
'http_method' (str): POST/PUT/PATCH/GET etc
|
||||
'servers' (list): list of str servers that this endpoint is at
|
||||
params_map (dict): see below key value pairs
|
||||
'all' (list): list of str endpoint parameter names
|
||||
'required' (list): list of required parameter names
|
||||
'nullable' (list): list of nullable parameter names
|
||||
'enum' (list): list of parameters with enum values
|
||||
'validation' (list): list of parameters with validations
|
||||
root_map
|
||||
'validations' (dict): the dict mapping endpoint parameter tuple
|
||||
paths to their validation dictionaries
|
||||
'allowed_values' (dict): the dict mapping endpoint parameter
|
||||
tuple paths to their allowed_values (enum) dictionaries
|
||||
'openapi_types' (dict): param_name to openapi type
|
||||
'attribute_map' (dict): param_name to camelCase name
|
||||
'location_map' (dict): param_name to 'body', 'file', 'form',
|
||||
'header', 'path', 'query'
|
||||
collection_format_map (dict): param_name to `csv` etc.
|
||||
headers_map (dict): see below key value pairs
|
||||
'accept' (list): list of Accept header strings
|
||||
'content_type' (list): list of Content-Type header strings
|
||||
api_client (ApiClient) api client instance
|
||||
callable (function): the function which is invoked when the
|
||||
Endpoint is called
|
||||
"""
|
||||
self.settings = settings
|
||||
self.params_map = params_map
|
||||
self.params_map['all'].extend([
|
||||
'async_req',
|
||||
'_host_index',
|
||||
'_preload_content',
|
||||
'_request_timeout',
|
||||
'_return_http_data_only',
|
||||
'_check_input_type',
|
||||
'_check_return_type',
|
||||
'_content_type',
|
||||
'_spec_property_naming'
|
||||
])
|
||||
self.params_map['nullable'].extend(['_request_timeout'])
|
||||
self.validations = root_map['validations']
|
||||
self.allowed_values = root_map['allowed_values']
|
||||
self.openapi_types = root_map['openapi_types']
|
||||
extra_types = {
|
||||
'async_req': (bool,),
|
||||
'_host_index': (none_type, int),
|
||||
'_preload_content': (bool,),
|
||||
'_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]),
|
||||
'_return_http_data_only': (bool,),
|
||||
'_check_input_type': (bool,),
|
||||
'_check_return_type': (bool,),
|
||||
'_spec_property_naming': (bool,),
|
||||
'_content_type': (none_type, str)
|
||||
}
|
||||
self.openapi_types.update(extra_types)
|
||||
self.attribute_map = root_map['attribute_map']
|
||||
self.location_map = root_map['location_map']
|
||||
self.collection_format_map = root_map['collection_format_map']
|
||||
self.headers_map = headers_map
|
||||
self.api_client = api_client
|
||||
self.callable = callable
|
||||
|
||||
def __validate_inputs(self, kwargs):
|
||||
for param in self.params_map['enum']:
|
||||
if param in kwargs:
|
||||
check_allowed_values(
|
||||
self.allowed_values,
|
||||
(param,),
|
||||
kwargs[param]
|
||||
)
|
||||
|
||||
for param in self.params_map['validation']:
|
||||
if param in kwargs:
|
||||
check_validations(
|
||||
self.validations,
|
||||
(param,),
|
||||
kwargs[param],
|
||||
configuration=self.api_client.configuration
|
||||
)
|
||||
|
||||
if kwargs['_check_input_type'] is False:
|
||||
return
|
||||
|
||||
for key, value in kwargs.items():
|
||||
fixed_val = validate_and_convert_types(
|
||||
value,
|
||||
self.openapi_types[key],
|
||||
[key],
|
||||
kwargs['_spec_property_naming'],
|
||||
kwargs['_check_input_type'],
|
||||
configuration=self.api_client.configuration
|
||||
)
|
||||
kwargs[key] = fixed_val
|
||||
|
||||
def __gather_params(self, kwargs):
|
||||
params = {
|
||||
'body': None,
|
||||
'collection_format': {},
|
||||
'file': {},
|
||||
'form': [],
|
||||
'header': {},
|
||||
'path': {},
|
||||
'query': []
|
||||
}
|
||||
|
||||
for param_name, param_value in kwargs.items():
|
||||
param_location = self.location_map.get(param_name)
|
||||
if param_location is None:
|
||||
continue
|
||||
if param_location:
|
||||
if param_location == 'body':
|
||||
params['body'] = param_value
|
||||
continue
|
||||
base_name = self.attribute_map[param_name]
|
||||
if (param_location == 'form' and
|
||||
self.openapi_types[param_name] == (file_type,)):
|
||||
params['file'][base_name] = [param_value]
|
||||
elif (param_location == 'form' and
|
||||
self.openapi_types[param_name] == ([file_type],)):
|
||||
# param_value is already a list
|
||||
params['file'][base_name] = param_value
|
||||
elif param_location in {'form', 'query'}:
|
||||
param_value_full = (base_name, param_value)
|
||||
params[param_location].append(param_value_full)
|
||||
if param_location not in {'form', 'query'}:
|
||||
params[param_location][base_name] = param_value
|
||||
collection_format = self.collection_format_map.get(param_name)
|
||||
if collection_format:
|
||||
params['collection_format'][base_name] = collection_format
|
||||
|
||||
return params
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
""" This method is invoked when endpoints are called
|
||||
Example:
|
||||
|
||||
api_instance = JobsApi()
|
||||
api_instance.delete_job # this is an instance of the class Endpoint
|
||||
api_instance.delete_job() # this invokes api_instance.delete_job.__call__()
|
||||
which then invokes the callable functions stored in that endpoint at
|
||||
api_instance.delete_job.callable or self.callable in this class
|
||||
|
||||
"""
|
||||
return self.callable(self, *args, **kwargs)
|
||||
|
||||
def call_with_http_info(self, **kwargs):
|
||||
|
||||
try:
|
||||
index = self.api_client.configuration.server_operation_index.get(
|
||||
self.settings['operation_id'], self.api_client.configuration.server_index
|
||||
) if kwargs['_host_index'] is None else kwargs['_host_index']
|
||||
server_variables = self.api_client.configuration.server_operation_variables.get(
|
||||
self.settings['operation_id'], self.api_client.configuration.server_variables
|
||||
)
|
||||
_host = self.api_client.configuration.get_host_from_settings(
|
||||
index, variables=server_variables, servers=self.settings['servers']
|
||||
)
|
||||
except IndexError:
|
||||
if self.settings['servers']:
|
||||
raise ApiValueError(
|
||||
"Invalid host index. Must be 0 <= index < %s" %
|
||||
len(self.settings['servers'])
|
||||
)
|
||||
_host = None
|
||||
|
||||
for key, value in kwargs.items():
|
||||
if key not in self.params_map['all']:
|
||||
raise ApiTypeError(
|
||||
"Got an unexpected parameter '%s'"
|
||||
" to method `%s`" %
|
||||
(key, self.settings['operation_id'])
|
||||
)
|
||||
# only throw this nullable ApiValueError if _check_input_type
|
||||
# is False, if _check_input_type==True we catch this case
|
||||
# in self.__validate_inputs
|
||||
if (key not in self.params_map['nullable'] and value is None
|
||||
and kwargs['_check_input_type'] is False):
|
||||
raise ApiValueError(
|
||||
"Value may not be None for non-nullable parameter `%s`"
|
||||
" when calling `%s`" %
|
||||
(key, self.settings['operation_id'])
|
||||
)
|
||||
|
||||
for key in self.params_map['required']:
|
||||
if key not in kwargs.keys():
|
||||
raise ApiValueError(
|
||||
"Missing the required parameter `%s` when calling "
|
||||
"`%s`" % (key, self.settings['operation_id'])
|
||||
)
|
||||
|
||||
self.__validate_inputs(kwargs)
|
||||
|
||||
params = self.__gather_params(kwargs)
|
||||
|
||||
accept_headers_list = self.headers_map['accept']
|
||||
if accept_headers_list:
|
||||
params['header']['Accept'] = self.api_client.select_header_accept(
|
||||
accept_headers_list)
|
||||
|
||||
if kwargs.get('_content_type'):
|
||||
params['header']['Content-Type'] = kwargs['_content_type']
|
||||
else:
|
||||
content_type_headers_list = self.headers_map['content_type']
|
||||
if content_type_headers_list:
|
||||
if params['body'] != "":
|
||||
header_list = self.api_client.select_header_content_type(
|
||||
content_type_headers_list, self.settings['http_method'],
|
||||
params['body'])
|
||||
params['header']['Content-Type'] = header_list
|
||||
|
||||
return self.api_client.call_api(
|
||||
self.settings['endpoint_path'], self.settings['http_method'],
|
||||
params['path'],
|
||||
params['query'],
|
||||
params['header'],
|
||||
body=params['body'],
|
||||
post_params=params['form'],
|
||||
files=params['file'],
|
||||
response_type=self.settings['response_type'],
|
||||
auth_settings=self.settings['auth'],
|
||||
async_req=kwargs['async_req'],
|
||||
_check_type=kwargs['_check_return_type'],
|
||||
_return_http_data_only=kwargs['_return_http_data_only'],
|
||||
_preload_content=kwargs['_preload_content'],
|
||||
_request_timeout=kwargs['_request_timeout'],
|
||||
_host=_host,
|
||||
collection_formats=params['collection_format'])
|
21
addon/flamenco/manager/apis/__init__.py
generated
21
addon/flamenco/manager/apis/__init__.py
generated
@ -1,21 +0,0 @@
|
||||
|
||||
# flake8: noqa
|
||||
|
||||
# Import all APIs into this package.
|
||||
# If you have many APIs here with many many models used in each API this may
|
||||
# raise a `RecursionError`.
|
||||
# In order to avoid this, import only the API that you directly need like:
|
||||
#
|
||||
# from .api.jobs_api import JobsApi
|
||||
#
|
||||
# or import this package, but before doing it, use:
|
||||
#
|
||||
# import sys
|
||||
# sys.setrecursionlimit(n)
|
||||
|
||||
# Import APIs into API package:
|
||||
from flamenco.manager.api.jobs_api import JobsApi
|
||||
from flamenco.manager.api.meta_api import MetaApi
|
||||
from flamenco.manager.api.shaman_api import ShamanApi
|
||||
from flamenco.manager.api.worker_api import WorkerApi
|
||||
from flamenco.manager.api.worker_mgt_api import WorkerMgtApi
|
470
addon/flamenco/manager/configuration.py
generated
470
addon/flamenco/manager/configuration.py
generated
@ -1,470 +0,0 @@
|
||||
"""
|
||||
Flamenco manager
|
||||
|
||||
Render Farm manager API # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
import copy
|
||||
import logging
|
||||
import multiprocessing
|
||||
import sys
|
||||
import urllib3
|
||||
|
||||
from http import client as http_client
|
||||
from flamenco.manager.exceptions import ApiValueError
|
||||
|
||||
|
||||
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
||||
'multipleOf', 'maximum', 'exclusiveMaximum',
|
||||
'minimum', 'exclusiveMinimum', 'maxLength',
|
||||
'minLength', 'pattern', 'maxItems', 'minItems'
|
||||
}
|
||||
|
||||
class Configuration(object):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
|
||||
Ref: https://openapi-generator.tech
|
||||
Do not edit the class manually.
|
||||
|
||||
:param host: Base url
|
||||
:param api_key: Dict to store API key(s).
|
||||
Each entry in the dict specifies an API key.
|
||||
The dict key is the name of the security scheme in the OAS specification.
|
||||
The dict value is the API key secret.
|
||||
:param api_key_prefix: Dict to store API prefix (e.g. Bearer)
|
||||
The dict key is the name of the security scheme in the OAS specification.
|
||||
The dict value is an API key prefix when generating the auth data.
|
||||
:param username: Username for HTTP basic authentication
|
||||
:param password: Password for HTTP basic authentication
|
||||
:param discard_unknown_keys: Boolean value indicating whether to discard
|
||||
unknown properties. A server may send a response that includes additional
|
||||
properties that are not known by the client in the following scenarios:
|
||||
1. The OpenAPI document is incomplete, i.e. it does not match the server
|
||||
implementation.
|
||||
2. The client was generated using an older version of the OpenAPI document
|
||||
and the server has been upgraded since then.
|
||||
If a schema in the OpenAPI document defines the additionalProperties attribute,
|
||||
then all undeclared properties received by the server are injected into the
|
||||
additional properties map. In that case, there are undeclared properties, and
|
||||
nothing to discard.
|
||||
:param disabled_client_side_validations (string): Comma-separated list of
|
||||
JSON schema validation keywords to disable JSON schema structural validation
|
||||
rules. The following keywords may be specified: multipleOf, maximum,
|
||||
exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern,
|
||||
maxItems, minItems.
|
||||
By default, the validation is performed for data generated locally by the client
|
||||
and data received from the server, independent of any validation performed by
|
||||
the server side. If the input data does not satisfy the JSON schema validation
|
||||
rules specified in the OpenAPI document, an exception is raised.
|
||||
If disabled_client_side_validations is set, structural validation is
|
||||
disabled. This can be useful to troubleshoot data validation problem, such as
|
||||
when the OpenAPI document validation rules do not match the actual API data
|
||||
received by the server.
|
||||
:param server_index: Index to servers configuration.
|
||||
:param server_variables: Mapping with string values to replace variables in
|
||||
templated server configuration. The validation of enums is performed for
|
||||
variables with defined enum values before.
|
||||
:param server_operation_index: Mapping from operation ID to an index to server
|
||||
configuration.
|
||||
:param server_operation_variables: Mapping from operation ID to a mapping with
|
||||
string values to replace variables in templated server configuration.
|
||||
The validation of enums is performed for variables with defined enum values before.
|
||||
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
||||
in PEM format
|
||||
|
||||
:Example:
|
||||
|
||||
HTTP Basic Authentication Example.
|
||||
Given the following security scheme in the OpenAPI specification:
|
||||
components:
|
||||
securitySchemes:
|
||||
http_basic_auth:
|
||||
type: http
|
||||
scheme: basic
|
||||
|
||||
Configure API client with HTTP basic authentication:
|
||||
|
||||
conf = flamenco.manager.Configuration(
|
||||
username='the-user',
|
||||
password='the-password',
|
||||
)
|
||||
|
||||
"""
|
||||
|
||||
_default = None
|
||||
|
||||
def __init__(self, host=None,
|
||||
api_key=None, api_key_prefix=None,
|
||||
access_token=None,
|
||||
username=None, password=None,
|
||||
discard_unknown_keys=False,
|
||||
disabled_client_side_validations="",
|
||||
server_index=None, server_variables=None,
|
||||
server_operation_index=None, server_operation_variables=None,
|
||||
ssl_ca_cert=None,
|
||||
):
|
||||
"""Constructor
|
||||
"""
|
||||
self._base_path = "http://localhost" if host is None else host
|
||||
"""Default Base url
|
||||
"""
|
||||
self.server_index = 0 if server_index is None and host is None else server_index
|
||||
self.server_operation_index = server_operation_index or {}
|
||||
"""Default server index
|
||||
"""
|
||||
self.server_variables = server_variables or {}
|
||||
self.server_operation_variables = server_operation_variables or {}
|
||||
"""Default server variables
|
||||
"""
|
||||
self.temp_folder_path = None
|
||||
"""Temp file folder for downloading files
|
||||
"""
|
||||
# Authentication Settings
|
||||
self.access_token = access_token
|
||||
self.api_key = {}
|
||||
if api_key:
|
||||
self.api_key = api_key
|
||||
"""dict to store API key(s)
|
||||
"""
|
||||
self.api_key_prefix = {}
|
||||
if api_key_prefix:
|
||||
self.api_key_prefix = api_key_prefix
|
||||
"""dict to store API prefix (e.g. Bearer)
|
||||
"""
|
||||
self.refresh_api_key_hook = None
|
||||
"""function hook to refresh API key if expired
|
||||
"""
|
||||
self.username = username
|
||||
"""Username for HTTP basic authentication
|
||||
"""
|
||||
self.password = password
|
||||
"""Password for HTTP basic authentication
|
||||
"""
|
||||
self.discard_unknown_keys = discard_unknown_keys
|
||||
self.disabled_client_side_validations = disabled_client_side_validations
|
||||
self.logger = {}
|
||||
"""Logging Settings
|
||||
"""
|
||||
self.logger["package_logger"] = logging.getLogger("flamenco.manager")
|
||||
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
|
||||
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
|
||||
"""Log format
|
||||
"""
|
||||
self.logger_stream_handler = None
|
||||
"""Log stream handler
|
||||
"""
|
||||
self.logger_file_handler = None
|
||||
"""Log file handler
|
||||
"""
|
||||
self.logger_file = None
|
||||
"""Debug file location
|
||||
"""
|
||||
self.debug = False
|
||||
"""Debug switch
|
||||
"""
|
||||
|
||||
self.verify_ssl = True
|
||||
"""SSL/TLS verification
|
||||
Set this to false to skip verifying SSL certificate when calling API
|
||||
from https server.
|
||||
"""
|
||||
self.ssl_ca_cert = ssl_ca_cert
|
||||
"""Set this to customize the certificate file to verify the peer.
|
||||
"""
|
||||
self.cert_file = None
|
||||
"""client certificate file
|
||||
"""
|
||||
self.key_file = None
|
||||
"""client key file
|
||||
"""
|
||||
self.assert_hostname = None
|
||||
"""Set this to True/False to enable/disable SSL hostname verification.
|
||||
"""
|
||||
|
||||
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
|
||||
"""urllib3 connection pool's maximum number of connections saved
|
||||
per pool. urllib3 uses 1 connection as default value, but this is
|
||||
not the best value when you are making a lot of possibly parallel
|
||||
requests to the same host, which is often the case here.
|
||||
cpu_count * 5 is used as default value to increase performance.
|
||||
"""
|
||||
|
||||
self.proxy = None
|
||||
"""Proxy URL
|
||||
"""
|
||||
self.no_proxy = None
|
||||
"""bypass proxy for host in the no_proxy list.
|
||||
"""
|
||||
self.proxy_headers = None
|
||||
"""Proxy headers
|
||||
"""
|
||||
self.safe_chars_for_path_param = ''
|
||||
"""Safe chars for path_param
|
||||
"""
|
||||
self.retries = None
|
||||
"""Adding retries to override urllib3 default value 3
|
||||
"""
|
||||
# Enable client side validation
|
||||
self.client_side_validation = True
|
||||
|
||||
# Options to pass down to the underlying urllib3 socket
|
||||
self.socket_options = None
|
||||
|
||||
def __deepcopy__(self, memo):
|
||||
cls = self.__class__
|
||||
result = cls.__new__(cls)
|
||||
memo[id(self)] = result
|
||||
for k, v in self.__dict__.items():
|
||||
if k not in ('logger', 'logger_file_handler'):
|
||||
setattr(result, k, copy.deepcopy(v, memo))
|
||||
# shallow copy of loggers
|
||||
result.logger = copy.copy(self.logger)
|
||||
# use setters to configure loggers
|
||||
result.logger_file = self.logger_file
|
||||
result.debug = self.debug
|
||||
return result
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
object.__setattr__(self, name, value)
|
||||
if name == 'disabled_client_side_validations':
|
||||
s = set(filter(None, value.split(',')))
|
||||
for v in s:
|
||||
if v not in JSON_SCHEMA_VALIDATION_KEYWORDS:
|
||||
raise ApiValueError(
|
||||
"Invalid keyword: '{0}''".format(v))
|
||||
self._disabled_client_side_validations = s
|
||||
|
||||
@classmethod
|
||||
def set_default(cls, default):
|
||||
"""Set default instance of configuration.
|
||||
|
||||
It stores default configuration, which can be
|
||||
returned by get_default_copy method.
|
||||
|
||||
:param default: object of Configuration
|
||||
"""
|
||||
cls._default = copy.deepcopy(default)
|
||||
|
||||
@classmethod
|
||||
def get_default_copy(cls):
|
||||
"""Return new instance of configuration.
|
||||
|
||||
This method returns newly created, based on default constructor,
|
||||
object of Configuration class or returns a copy of default
|
||||
configuration passed by the set_default method.
|
||||
|
||||
:return: The configuration object.
|
||||
"""
|
||||
if cls._default is not None:
|
||||
return copy.deepcopy(cls._default)
|
||||
return Configuration()
|
||||
|
||||
@property
|
||||
def logger_file(self):
|
||||
"""The logger file.
|
||||
|
||||
If the logger_file is None, then add stream handler and remove file
|
||||
handler. Otherwise, add file handler and remove stream handler.
|
||||
|
||||
:param value: The logger_file path.
|
||||
:type: str
|
||||
"""
|
||||
return self.__logger_file
|
||||
|
||||
@logger_file.setter
|
||||
def logger_file(self, value):
|
||||
"""The logger file.
|
||||
|
||||
If the logger_file is None, then add stream handler and remove file
|
||||
handler. Otherwise, add file handler and remove stream handler.
|
||||
|
||||
:param value: The logger_file path.
|
||||
:type: str
|
||||
"""
|
||||
self.__logger_file = value
|
||||
if self.__logger_file:
|
||||
# If set logging file,
|
||||
# then add file handler and remove stream handler.
|
||||
self.logger_file_handler = logging.FileHandler(self.__logger_file)
|
||||
self.logger_file_handler.setFormatter(self.logger_formatter)
|
||||
for _, logger in self.logger.items():
|
||||
logger.addHandler(self.logger_file_handler)
|
||||
|
||||
@property
|
||||
def debug(self):
|
||||
"""Debug status
|
||||
|
||||
:param value: The debug status, True or False.
|
||||
:type: bool
|
||||
"""
|
||||
return self.__debug
|
||||
|
||||
@debug.setter
|
||||
def debug(self, value):
|
||||
"""Debug status
|
||||
|
||||
:param value: The debug status, True or False.
|
||||
:type: bool
|
||||
"""
|
||||
self.__debug = value
|
||||
if self.__debug:
|
||||
# if debug status is True, turn on debug logging
|
||||
for _, logger in self.logger.items():
|
||||
logger.setLevel(logging.DEBUG)
|
||||
# turn on http_client debug
|
||||
http_client.HTTPConnection.debuglevel = 1
|
||||
else:
|
||||
# if debug status is False, turn off debug logging,
|
||||
# setting log level to default `logging.WARNING`
|
||||
for _, logger in self.logger.items():
|
||||
logger.setLevel(logging.WARNING)
|
||||
# turn off http_client debug
|
||||
http_client.HTTPConnection.debuglevel = 0
|
||||
|
||||
@property
|
||||
def logger_format(self):
|
||||
"""The logger format.
|
||||
|
||||
The logger_formatter will be updated when sets logger_format.
|
||||
|
||||
:param value: The format string.
|
||||
:type: str
|
||||
"""
|
||||
return self.__logger_format
|
||||
|
||||
@logger_format.setter
|
||||
def logger_format(self, value):
|
||||
"""The logger format.
|
||||
|
||||
The logger_formatter will be updated when sets logger_format.
|
||||
|
||||
:param value: The format string.
|
||||
:type: str
|
||||
"""
|
||||
self.__logger_format = value
|
||||
self.logger_formatter = logging.Formatter(self.__logger_format)
|
||||
|
||||
def get_api_key_with_prefix(self, identifier, alias=None):
|
||||
"""Gets API key (with prefix if set).
|
||||
|
||||
:param identifier: The identifier of apiKey.
|
||||
:param alias: The alternative identifier of apiKey.
|
||||
:return: The token for api key authentication.
|
||||
"""
|
||||
if self.refresh_api_key_hook is not None:
|
||||
self.refresh_api_key_hook(self)
|
||||
key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
|
||||
if key:
|
||||
prefix = self.api_key_prefix.get(identifier)
|
||||
if prefix:
|
||||
return "%s %s" % (prefix, key)
|
||||
else:
|
||||
return key
|
||||
|
||||
def get_basic_auth_token(self):
|
||||
"""Gets HTTP basic authentication header (string).
|
||||
|
||||
:return: The token for basic HTTP authentication.
|
||||
"""
|
||||
username = ""
|
||||
if self.username is not None:
|
||||
username = self.username
|
||||
password = ""
|
||||
if self.password is not None:
|
||||
password = self.password
|
||||
return urllib3.util.make_headers(
|
||||
basic_auth=username + ':' + password
|
||||
).get('authorization')
|
||||
|
||||
def auth_settings(self):
|
||||
"""Gets Auth Settings dict for api client.
|
||||
|
||||
:return: The Auth Settings information dict.
|
||||
"""
|
||||
auth = {}
|
||||
if self.username is not None and self.password is not None:
|
||||
auth['worker_auth'] = {
|
||||
'type': 'basic',
|
||||
'in': 'header',
|
||||
'key': 'Authorization',
|
||||
'value': self.get_basic_auth_token()
|
||||
}
|
||||
return auth
|
||||
|
||||
def to_debug_report(self):
|
||||
"""Gets the essential information for debugging.
|
||||
|
||||
:return: The report for debugging.
|
||||
"""
|
||||
return "Python SDK Debug Report:\n"\
|
||||
"OS: {env}\n"\
|
||||
"Python Version: {pyversion}\n"\
|
||||
"Version of the API: 1.0.0\n"\
|
||||
"SDK Package Version: 3.3-alpha0".\
|
||||
format(env=sys.platform, pyversion=sys.version)
|
||||
|
||||
def get_host_settings(self):
|
||||
"""Gets an array of host settings
|
||||
|
||||
:return: An array of host settings
|
||||
"""
|
||||
return [
|
||||
{
|
||||
'url': "",
|
||||
'description': "No description provided",
|
||||
}
|
||||
]
|
||||
|
||||
def get_host_from_settings(self, index, variables=None, servers=None):
|
||||
"""Gets host URL based on the index and variables
|
||||
:param index: array index of the host settings
|
||||
:param variables: hash of variable and the corresponding value
|
||||
:param servers: an array of host settings or None
|
||||
:return: URL based on host settings
|
||||
"""
|
||||
if index is None:
|
||||
return self._base_path
|
||||
|
||||
variables = {} if variables is None else variables
|
||||
servers = self.get_host_settings() if servers is None else servers
|
||||
|
||||
try:
|
||||
server = servers[index]
|
||||
except IndexError:
|
||||
raise ValueError(
|
||||
"Invalid index {0} when selecting the host settings. "
|
||||
"Must be less than {1}".format(index, len(servers)))
|
||||
|
||||
url = server['url']
|
||||
|
||||
# go through variables and replace placeholders
|
||||
for variable_name, variable in server.get('variables', {}).items():
|
||||
used_value = variables.get(
|
||||
variable_name, variable['default_value'])
|
||||
|
||||
if 'enum_values' in variable \
|
||||
and used_value not in variable['enum_values']:
|
||||
raise ValueError(
|
||||
"The variable `{0}` in the host URL has invalid value "
|
||||
"{1}. Must be {2}.".format(
|
||||
variable_name, variables[variable_name],
|
||||
variable['enum_values']))
|
||||
|
||||
url = url.replace("{" + variable_name + "}", used_value)
|
||||
|
||||
return url
|
||||
|
||||
@property
|
||||
def host(self):
|
||||
"""Return generated host."""
|
||||
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
|
||||
|
||||
@host.setter
|
||||
def host(self, value):
|
||||
"""Fix base path."""
|
||||
self._base_path = value
|
||||
self.server_index = None
|
21
addon/flamenco/manager/docs/AssignedTask.md
generated
21
addon/flamenco/manager/docs/AssignedTask.md
generated
@ -1,21 +0,0 @@
|
||||
# AssignedTask
|
||||
|
||||
AssignedTask is a task as it is received by the Worker.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **str** | |
|
||||
**job** | **str** | |
|
||||
**name** | **str** | |
|
||||
**status** | [**TaskStatus**](TaskStatus.md) | |
|
||||
**priority** | **int** | |
|
||||
**job_priority** | **int** | |
|
||||
**job_type** | **str** | |
|
||||
**task_type** | **str** | |
|
||||
**commands** | [**[Command]**](Command.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
23
addon/flamenco/manager/docs/AvailableJobSetting.md
generated
23
addon/flamenco/manager/docs/AvailableJobSetting.md
generated
@ -1,23 +0,0 @@
|
||||
# AvailableJobSetting
|
||||
|
||||
Single setting of a Job types.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**key** | **str** | Identifier for the setting, must be unique within the job type. |
|
||||
**type** | [**AvailableJobSettingType**](AvailableJobSettingType.md) | |
|
||||
**subtype** | [**AvailableJobSettingSubtype**](AvailableJobSettingSubtype.md) | | [optional]
|
||||
**choices** | **[str]** | When given, limit the valid values to these choices. Only usable with string type. | [optional]
|
||||
**propargs** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Any extra arguments to the bpy.props.SomeProperty() call used to create this property. | [optional]
|
||||
**description** | **bool, date, datetime, dict, float, int, list, str, none_type** | The description/tooltip shown in the user interface. | [optional]
|
||||
**default** | **bool, date, datetime, dict, float, int, list, str, none_type** | The default value shown to the user when determining this setting. | [optional]
|
||||
**eval** | **str** | Python expression to be evaluated in order to determine the default value for this setting. | [optional]
|
||||
**visible** | [**AvailableJobSettingVisibility**](AvailableJobSettingVisibility.md) | | [optional]
|
||||
**required** | **bool** | Whether to immediately reject a job definition, of this type, without this particular setting. | [optional] if omitted the server will use the default value of False
|
||||
**editable** | **bool** | Whether to allow editing this setting after the job has been submitted. Would imply deleting all existing tasks for this job, and recompiling it. | [optional] if omitted the server will use the default value of False
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
# AvailableJobSettingSubtype
|
||||
|
||||
Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `\"/######\"` appended.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `\"/######\"` appended. | must be one of ["file_path", "dir_path", "file_name", "hashed_file_path", ]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
# AvailableJobSettingType
|
||||
|
||||
Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported. | must be one of ["string", "int32", "float", "bool", ]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
# AvailableJobSettingVisibility
|
||||
|
||||
When to show this setting. `visible`: always show. `submission`: only show in the UI of a job submitter (like a Blender add-on). `web`: only show in the web interface for management, but not when submitting the job. `hidden`: never show; only available to the job compiler script as internal setting.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | When to show this setting. `visible`: always show. `submission`: only show in the UI of a job submitter (like a Blender add-on). `web`: only show in the web interface for management, but not when submitting the job. `hidden`: never show; only available to the job compiler script as internal setting. | defaults to "visible", must be one of ["visible", "hidden", "submission", "web", ]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
16
addon/flamenco/manager/docs/AvailableJobType.md
generated
16
addon/flamenco/manager/docs/AvailableJobType.md
generated
@ -1,16 +0,0 @@
|
||||
# AvailableJobType
|
||||
|
||||
Job type supported by this Manager, and its parameters.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
**label** | **str** | |
|
||||
**settings** | [**[AvailableJobSetting]**](AvailableJobSetting.md) | |
|
||||
**etag** | **str** | Hash of the job type. If the job settings or the label change, this etag will change. This is used on job submission to ensure that the submitted job settings are up to date. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
13
addon/flamenco/manager/docs/AvailableJobTypes.md
generated
13
addon/flamenco/manager/docs/AvailableJobTypes.md
generated
@ -1,13 +0,0 @@
|
||||
# AvailableJobTypes
|
||||
|
||||
List of job types supported by this Manager.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**job_types** | [**[AvailableJobType]**](AvailableJobType.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
# BlenderPathCheckResult
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**input** | **str** | The input that was given to find this Blender. |
|
||||
**path** | **str** | The path that was found. |
|
||||
**source** | [**BlenderPathSource**](BlenderPathSource.md) | |
|
||||
**is_usable** | **bool** | Whether the path is usable or not. |
|
||||
**cause** | **str** | Description of why this path is (not) usable. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/BlenderPathFindResult.md
generated
11
addon/flamenco/manager/docs/BlenderPathFindResult.md
generated
@ -1,11 +0,0 @@
|
||||
# BlenderPathFindResult
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | [**[BlenderPathCheckResult]**](BlenderPathCheckResult.md) | |
|
||||
|
||||
[[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
addon/flamenco/manager/docs/BlenderPathSource.md
generated
11
addon/flamenco/manager/docs/BlenderPathSource.md
generated
@ -1,11 +0,0 @@
|
||||
# BlenderPathSource
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | | must be one of ["file_association", "path_envvar", "input_path", ]
|
||||
|
||||
[[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
addon/flamenco/manager/docs/Command.md
generated
14
addon/flamenco/manager/docs/Command.md
generated
@ -1,14 +0,0 @@
|
||||
# Command
|
||||
|
||||
Command represents a single command to execute by the Worker.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
**parameters** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/Error.md
generated
14
addon/flamenco/manager/docs/Error.md
generated
@ -1,14 +0,0 @@
|
||||
# Error
|
||||
|
||||
Generic error response.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **int** | HTTP status code of this response. Is included in the payload so that a single object represents all error information. Code 503 is used when the database is busy. The HTTP response will contain a 'Retry-After' HTTP header that indicates after which time the request can be retried. Following the header is not mandatory, and it's up to the client to do something reasonable like exponential backoff. |
|
||||
**message** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
15
addon/flamenco/manager/docs/FlamencoVersion.md
generated
15
addon/flamenco/manager/docs/FlamencoVersion.md
generated
@ -1,15 +0,0 @@
|
||||
# FlamencoVersion
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**version** | **str** | Version of this Manager, meant for human consumption. For release builds it is the same as `shortversion`, for other builds it also includes the `git` version info. |
|
||||
**shortversion** | **str** | |
|
||||
**name** | **str** | |
|
||||
**git** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
26
addon/flamenco/manager/docs/Job.md
generated
26
addon/flamenco/manager/docs/Job.md
generated
@ -1,26 +0,0 @@
|
||||
# Job
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
**type** | **str** | |
|
||||
**submitter_platform** | **str** | Operating system of the submitter. This is used to recognise two-way variables. This should be a lower-case version of the platform, like \"linux\", \"windows\", \"darwin\", \"openbsd\", etc. Should be ompatible with Go's `runtime.GOOS`; run `go tool dist list` to get a list of possible platforms. As a special case, the platform \"manager\" can be given, which will be interpreted as \"the Manager's platform\". This is mostly to make test/debug scripts easier, as they can use a static document on all platforms. |
|
||||
**id** | **str** | UUID of the Job |
|
||||
**created** | **datetime** | Creation timestamp |
|
||||
**updated** | **datetime** | Timestamp of last update. |
|
||||
**status** | [**JobStatus**](JobStatus.md) | |
|
||||
**activity** | **str** | Description of the last activity on this job. |
|
||||
**priority** | **int** | | defaults to 50
|
||||
**type_etag** | **str** | Hash of the job type, copied from the `AvailableJobType.etag` property of the job type. The job will be rejected if this field doesn't match the actual job type on the Manager. This prevents job submission with old settings, after the job compiler script has been updated. If this field is ommitted, the check is bypassed. | [optional]
|
||||
**settings** | [**JobSettings**](JobSettings.md) | | [optional]
|
||||
**metadata** | [**JobMetadata**](JobMetadata.md) | | [optional]
|
||||
**storage** | [**JobStorageInfo**](JobStorageInfo.md) | | [optional]
|
||||
**worker_tag** | **str** | Worker tag that should execute this job. When a tag ID is given, only Workers in that tag will be scheduled to work on it. If empty or ommitted, all workers can work on this job. | [optional]
|
||||
**delete_requested_at** | **datetime** | If job deletion was requested, this is the timestamp at which that request was stored on Flamenco Manager. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
17
addon/flamenco/manager/docs/JobAllOf.md
generated
17
addon/flamenco/manager/docs/JobAllOf.md
generated
@ -1,17 +0,0 @@
|
||||
# JobAllOf
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | UUID of the Job |
|
||||
**created** | **datetime** | Creation timestamp |
|
||||
**updated** | **datetime** | Timestamp of last update. |
|
||||
**status** | [**JobStatus**](JobStatus.md) | |
|
||||
**activity** | **str** | Description of the last activity on this job. |
|
||||
**delete_requested_at** | **datetime** | If job deletion was requested, this is the timestamp at which that request was stored on Flamenco Manager. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
12
addon/flamenco/manager/docs/JobBlocklist.md
generated
12
addon/flamenco/manager/docs/JobBlocklist.md
generated
@ -1,12 +0,0 @@
|
||||
# JobBlocklist
|
||||
|
||||
List of workers that are not allowed certain task types on a specific job.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | [**[JobBlocklistEntry]**](JobBlocklistEntry.md) | List of workers that are not allowed certain task types on a specific job. |
|
||||
|
||||
[[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
addon/flamenco/manager/docs/JobBlocklistEntry.md
generated
14
addon/flamenco/manager/docs/JobBlocklistEntry.md
generated
@ -1,14 +0,0 @@
|
||||
# JobBlocklistEntry
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**worker_id** | **str** | |
|
||||
**task_type** | **str** | |
|
||||
**worker_name** | **str** | | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
13
addon/flamenco/manager/docs/JobDeletionInfo.md
generated
13
addon/flamenco/manager/docs/JobDeletionInfo.md
generated
@ -1,13 +0,0 @@
|
||||
# JobDeletionInfo
|
||||
|
||||
Info about what will be deleted when this job is deleted.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**shaman_checkout** | **bool** | Whether the Shaman checkout directory will be removed along with the job. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
# JobLastRenderedImageInfo
|
||||
|
||||
Enough information for a client to piece together different strings to form a host-relative URL to the last-rendered image. To construct the URL, concatenate \"{base}/{one of the suffixes}\".
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**base** | **str** | |
|
||||
**suffixes** | **[str]** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
12
addon/flamenco/manager/docs/JobMetadata.md
generated
12
addon/flamenco/manager/docs/JobMetadata.md
generated
@ -1,12 +0,0 @@
|
||||
# JobMetadata
|
||||
|
||||
Arbitrary metadata strings. More complex structures can be modeled by using `a.b.c` notation for the key.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**any string name** | **str** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
12
addon/flamenco/manager/docs/JobPriorityChange.md
generated
12
addon/flamenco/manager/docs/JobPriorityChange.md
generated
@ -1,12 +0,0 @@
|
||||
# JobPriorityChange
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**priority** | **int** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/JobSettings.md
generated
11
addon/flamenco/manager/docs/JobSettings.md
generated
@ -1,11 +0,0 @@
|
||||
# JobSettings
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/JobStatus.md
generated
11
addon/flamenco/manager/docs/JobStatus.md
generated
@ -1,11 +0,0 @@
|
||||
# JobStatus
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | | must be one of ["active", "canceled", "completed", "failed", "paused", "queued", "cancel-requested", "requeueing", "under-construction", ]
|
||||
|
||||
[[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
addon/flamenco/manager/docs/JobStatusChange.md
generated
13
addon/flamenco/manager/docs/JobStatusChange.md
generated
@ -1,13 +0,0 @@
|
||||
# JobStatusChange
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**status** | [**JobStatus**](JobStatus.md) | |
|
||||
**reason** | **str** | The reason for this status change. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
13
addon/flamenco/manager/docs/JobStorageInfo.md
generated
13
addon/flamenco/manager/docs/JobStorageInfo.md
generated
@ -1,13 +0,0 @@
|
||||
# JobStorageInfo
|
||||
|
||||
Storage info of a job, which Flamenco can use to remove job-related files when necessary.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**shaman_checkout_id** | **str** | 'Checkout ID' used when creating the Shaman checkout for this job. Aids in removing the checkout directory when the job is removed from Flamenco. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
13
addon/flamenco/manager/docs/JobTasksSummary.md
generated
13
addon/flamenco/manager/docs/JobTasksSummary.md
generated
@ -1,13 +0,0 @@
|
||||
# JobTasksSummary
|
||||
|
||||
Simplified list of tasks of a job. Contains all tasks, but not all info of each task.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**tasks** | [**[TaskSummary]**](TaskSummary.md) | | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
1351
addon/flamenco/manager/docs/JobsApi.md
generated
1351
addon/flamenco/manager/docs/JobsApi.md
generated
File diff suppressed because it is too large
Load Diff
17
addon/flamenco/manager/docs/JobsQuery.md
generated
17
addon/flamenco/manager/docs/JobsQuery.md
generated
@ -1,17 +0,0 @@
|
||||
# JobsQuery
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**offset** | **int** | | [optional]
|
||||
**limit** | **int** | | [optional]
|
||||
**order_by** | **[str]** | | [optional]
|
||||
**status_in** | [**[JobStatus]**](JobStatus.md) | Return only jobs with a status in this array. | [optional]
|
||||
**metadata** | **{str: (str,)}** | Filter by metadata, using `LIKE` notation. | [optional]
|
||||
**settings** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Filter by job settings, using `LIKE` notation. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
12
addon/flamenco/manager/docs/JobsQueryResult.md
generated
12
addon/flamenco/manager/docs/JobsQueryResult.md
generated
@ -1,12 +0,0 @@
|
||||
# JobsQueryResult
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**jobs** | [**[Job]**](Job.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/ManagerConfiguration.md
generated
14
addon/flamenco/manager/docs/ManagerConfiguration.md
generated
@ -1,14 +0,0 @@
|
||||
# ManagerConfiguration
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**storage_location** | **str** | Directory used for job file storage. |
|
||||
**shaman_enabled** | **bool** | Whether the Shaman file transfer API is available. |
|
||||
**is_first_run** | **bool** | Whether this is considered the first time the Manager runs. This is determined by a few factors, like a non-existent configuration file or certain settings being empty while they shouldn't be. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
13
addon/flamenco/manager/docs/ManagerVariable.md
generated
13
addon/flamenco/manager/docs/ManagerVariable.md
generated
@ -1,13 +0,0 @@
|
||||
# ManagerVariable
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | |
|
||||
**is_twoway** | **bool** | One-way variables are the most common one, and are simple replacement from `{name}` to their value, which happens when a Task is given to a Worker. Two-way variables are also replaced when submitting a job, where the platform-specific value is replaced by `{name}`. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
# ManagerVariableAudience
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | | must be one of ["workers", "users", ]
|
||||
|
||||
[[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
addon/flamenco/manager/docs/ManagerVariables.md
generated
12
addon/flamenco/manager/docs/ManagerVariables.md
generated
@ -1,12 +0,0 @@
|
||||
# ManagerVariables
|
||||
|
||||
Mapping from variable name to its properties.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**any string name** | [**ManagerVariable**](ManagerVariable.md) | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
15
addon/flamenco/manager/docs/MayKeepRunning.md
generated
15
addon/flamenco/manager/docs/MayKeepRunning.md
generated
@ -1,15 +0,0 @@
|
||||
# MayKeepRunning
|
||||
|
||||
Indicates whether the worker may keep running the task.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**may_keep_running** | **bool** | |
|
||||
**reason** | **str** | |
|
||||
**status_change_requested** | **bool** | Indicates that a status change requested for the worker. It should use the `workerState` operation to determine which state to go to next. If this is `true`, `mayKeepRunning` MUST be `false`. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
616
addon/flamenco/manager/docs/MetaApi.md
generated
616
addon/flamenco/manager/docs/MetaApi.md
generated
@ -1,616 +0,0 @@
|
||||
# flamenco.manager.MetaApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**check_blender_exe_path**](MetaApi.md#check_blender_exe_path) | **POST** /api/v3/configuration/check/blender | Validate a CLI command for use as way to start Blender
|
||||
[**check_shared_storage_path**](MetaApi.md#check_shared_storage_path) | **POST** /api/v3/configuration/check/shared-storage | Validate a path for use as shared storage.
|
||||
[**find_blender_exe_path**](MetaApi.md#find_blender_exe_path) | **GET** /api/v3/configuration/check/blender | Find one or more CLI commands for use as way to start Blender
|
||||
[**get_configuration**](MetaApi.md#get_configuration) | **GET** /api/v3/configuration | Get the configuration of this Manager.
|
||||
[**get_configuration_file**](MetaApi.md#get_configuration_file) | **GET** /api/v3/configuration/file | Retrieve the configuration of Flamenco Manager.
|
||||
[**get_shared_storage**](MetaApi.md#get_shared_storage) | **GET** /api/v3/configuration/shared-storage/{audience}/{platform} | Get the shared storage location of this Manager, adjusted for the given audience and platform.
|
||||
[**get_variables**](MetaApi.md#get_variables) | **GET** /api/v3/configuration/variables/{audience}/{platform} | Get the variables of this Manager. Used by the Blender add-on to recognise two-way variables, and for the web interface to do variable replacement based on the browser's platform.
|
||||
[**get_version**](MetaApi.md#get_version) | **GET** /api/v3/version | Get the Flamenco version of this Manager
|
||||
[**save_setup_assistant_config**](MetaApi.md#save_setup_assistant_config) | **POST** /api/v3/configuration/setup-assistant | Update the Manager's configuration, and restart it in fully functional mode.
|
||||
|
||||
|
||||
# **check_blender_exe_path**
|
||||
> BlenderPathCheckResult check_blender_exe_path()
|
||||
|
||||
Validate a CLI command for use as way to start Blender
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import meta_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.path_check_input import PathCheckInput
|
||||
from flamenco.manager.model.blender_path_check_result import BlenderPathCheckResult
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = meta_api.MetaApi(api_client)
|
||||
path_check_input = PathCheckInput(
|
||||
path="path_example",
|
||||
) # PathCheckInput | Command or executable path to check (optional)
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
# and optional values
|
||||
try:
|
||||
# Validate a CLI command for use as way to start Blender
|
||||
api_response = api_instance.check_blender_exe_path(path_check_input=path_check_input)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling MetaApi->check_blender_exe_path: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**path_check_input** | [**PathCheckInput**](PathCheckInput.md)| Command or executable path to check | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**BlenderPathCheckResult**](BlenderPathCheckResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Normal response, path check went fine. | - |
|
||||
**0** | Something went wrong. | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **check_shared_storage_path**
|
||||
> PathCheckResult check_shared_storage_path()
|
||||
|
||||
Validate a path for use as shared storage.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import meta_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.path_check_result import PathCheckResult
|
||||
from flamenco.manager.model.path_check_input import PathCheckInput
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = meta_api.MetaApi(api_client)
|
||||
path_check_input = PathCheckInput(
|
||||
path="path_example",
|
||||
) # PathCheckInput | Path to check (optional)
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
# and optional values
|
||||
try:
|
||||
# Validate a path for use as shared storage.
|
||||
api_response = api_instance.check_shared_storage_path(path_check_input=path_check_input)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling MetaApi->check_shared_storage_path: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**path_check_input** | [**PathCheckInput**](PathCheckInput.md)| Path to check | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**PathCheckResult**](PathCheckResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Normal response, path check went fine. | - |
|
||||
**0** | Something went wrong. | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **find_blender_exe_path**
|
||||
> BlenderPathFindResult find_blender_exe_path()
|
||||
|
||||
Find one or more CLI commands for use as way to start Blender
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import meta_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.blender_path_find_result import BlenderPathFindResult
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = meta_api.MetaApi(api_client)
|
||||
|
||||
# example, this endpoint has no required or optional parameters
|
||||
try:
|
||||
# Find one or more CLI commands for use as way to start Blender
|
||||
api_response = api_instance.find_blender_exe_path()
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling MetaApi->find_blender_exe_path: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**BlenderPathFindResult**](BlenderPathFindResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Found locations of Blender. | - |
|
||||
**0** | Something went wrong. | - |
|
||||
|
||||
[[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_configuration**
|
||||
> ManagerConfiguration get_configuration()
|
||||
|
||||
Get the configuration of this Manager.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import meta_api
|
||||
from flamenco.manager.model.manager_configuration import ManagerConfiguration
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = meta_api.MetaApi(api_client)
|
||||
|
||||
# example, this endpoint has no required or optional parameters
|
||||
try:
|
||||
# Get the configuration of this Manager.
|
||||
api_response = api_instance.get_configuration()
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling MetaApi->get_configuration: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**ManagerConfiguration**](ManagerConfiguration.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | normal 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_configuration_file**
|
||||
> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} get_configuration_file()
|
||||
|
||||
Retrieve the configuration of Flamenco Manager.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import meta_api
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = meta_api.MetaApi(api_client)
|
||||
|
||||
# example, this endpoint has no required or optional parameters
|
||||
try:
|
||||
# Retrieve the configuration of Flamenco Manager.
|
||||
api_response = api_instance.get_configuration_file()
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling MetaApi->get_configuration_file: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/yaml
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Normal 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_shared_storage**
|
||||
> SharedStorageLocation get_shared_storage(audience, platform)
|
||||
|
||||
Get the shared storage location of this Manager, adjusted for the given audience and platform.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import meta_api
|
||||
from flamenco.manager.model.manager_variable_audience import ManagerVariableAudience
|
||||
from flamenco.manager.model.shared_storage_location import SharedStorageLocation
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = meta_api.MetaApi(api_client)
|
||||
audience = ManagerVariableAudience("workers") # ManagerVariableAudience |
|
||||
platform = "platform_example" # str |
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Get the shared storage location of this Manager, adjusted for the given audience and platform.
|
||||
api_response = api_instance.get_shared_storage(audience, platform)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling MetaApi->get_shared_storage: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**audience** | **ManagerVariableAudience**| |
|
||||
**platform** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**SharedStorageLocation**](SharedStorageLocation.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Normal 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_variables**
|
||||
> ManagerVariables get_variables(audience, platform)
|
||||
|
||||
Get the variables of this Manager. Used by the Blender add-on to recognise two-way variables, and for the web interface to do variable replacement based on the browser's platform.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import meta_api
|
||||
from flamenco.manager.model.manager_variable_audience import ManagerVariableAudience
|
||||
from flamenco.manager.model.manager_variables import ManagerVariables
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = meta_api.MetaApi(api_client)
|
||||
audience = ManagerVariableAudience("workers") # ManagerVariableAudience |
|
||||
platform = "platform_example" # str |
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Get the variables of this Manager. Used by the Blender add-on to recognise two-way variables, and for the web interface to do variable replacement based on the browser's platform.
|
||||
api_response = api_instance.get_variables(audience, platform)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling MetaApi->get_variables: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**audience** | **ManagerVariableAudience**| |
|
||||
**platform** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ManagerVariables**](ManagerVariables.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Normal 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_version**
|
||||
> FlamencoVersion get_version()
|
||||
|
||||
Get the Flamenco version of this Manager
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import meta_api
|
||||
from flamenco.manager.model.flamenco_version import FlamencoVersion
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = meta_api.MetaApi(api_client)
|
||||
|
||||
# example, this endpoint has no required or optional parameters
|
||||
try:
|
||||
# Get the Flamenco version of this Manager
|
||||
api_response = api_instance.get_version()
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling MetaApi->get_version: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**FlamencoVersion**](FlamencoVersion.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | normal 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)
|
||||
|
||||
# **save_setup_assistant_config**
|
||||
> save_setup_assistant_config()
|
||||
|
||||
Update the Manager's configuration, and restart it in fully functional mode.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import meta_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.setup_assistant_config import SetupAssistantConfig
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = meta_api.MetaApi(api_client)
|
||||
setup_assistant_config = SetupAssistantConfig(
|
||||
storage_location="storage_location_example",
|
||||
blender_executable=BlenderPathCheckResult(
|
||||
input="input_example",
|
||||
path="path_example",
|
||||
source=BlenderPathSource("file_association"),
|
||||
is_usable=True,
|
||||
cause="cause_example",
|
||||
),
|
||||
) # SetupAssistantConfig | Configuration to save. (optional)
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
# and optional values
|
||||
try:
|
||||
# Update the Manager's configuration, and restart it in fully functional mode.
|
||||
api_instance.save_setup_assistant_config(setup_assistant_config=setup_assistant_config)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling MetaApi->save_setup_assistant_config: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**setup_assistant_config** | [**SetupAssistantConfig**](SetupAssistantConfig.md)| Configuration to save. | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | Normal response. The webapp should do a full refresh at this point. | - |
|
||||
**0** | Something went wrong. | - |
|
||||
|
||||
[[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)
|
||||
|
12
addon/flamenco/manager/docs/PathCheckInput.md
generated
12
addon/flamenco/manager/docs/PathCheckInput.md
generated
@ -1,12 +0,0 @@
|
||||
# PathCheckInput
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**path** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/PathCheckResult.md
generated
14
addon/flamenco/manager/docs/PathCheckResult.md
generated
@ -1,14 +0,0 @@
|
||||
# PathCheckResult
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**path** | **str** | The path that was checked. |
|
||||
**is_usable** | **bool** | Whether the path is usable or not. |
|
||||
**cause** | **str** | Description of why this path is (not) usable. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
18
addon/flamenco/manager/docs/RegisteredWorker.md
generated
18
addon/flamenco/manager/docs/RegisteredWorker.md
generated
@ -1,18 +0,0 @@
|
||||
# RegisteredWorker
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | **str** | |
|
||||
**name** | **str** | |
|
||||
**address** | **str** | |
|
||||
**status** | [**WorkerStatus**](WorkerStatus.md) | |
|
||||
**platform** | **str** | |
|
||||
**software** | **str** | |
|
||||
**supported_task_types** | **[str]** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
12
addon/flamenco/manager/docs/SecurityError.md
generated
12
addon/flamenco/manager/docs/SecurityError.md
generated
@ -1,12 +0,0 @@
|
||||
# SecurityError
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**message** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/SetupAssistantConfig.md
generated
14
addon/flamenco/manager/docs/SetupAssistantConfig.md
generated
@ -1,14 +0,0 @@
|
||||
# SetupAssistantConfig
|
||||
|
||||
Configuration obtained from the Setup Assistant.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**storage_location** | **str** | Directory used for job file storage. |
|
||||
**blender_executable** | [**BlenderPathCheckResult**](BlenderPathCheckResult.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
320
addon/flamenco/manager/docs/ShamanApi.md
generated
320
addon/flamenco/manager/docs/ShamanApi.md
generated
@ -1,320 +0,0 @@
|
||||
# flamenco.manager.ShamanApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**shaman_checkout**](ShamanApi.md#shaman_checkout) | **POST** /api/v3/shaman/checkout/create | Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
|
||||
[**shaman_checkout_requirements**](ShamanApi.md#shaman_checkout_requirements) | **POST** /api/v3/shaman/checkout/requirements | Checks a Shaman Requirements file, and reports which files are unknown.
|
||||
[**shaman_file_store**](ShamanApi.md#shaman_file_store) | **POST** /api/v3/shaman/files/{checksum}/{filesize} | Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file's contents should be sent in the request body.
|
||||
[**shaman_file_store_check**](ShamanApi.md#shaman_file_store_check) | **GET** /api/v3/shaman/files/{checksum}/{filesize} | Check the status of a file on the Shaman server.
|
||||
|
||||
|
||||
# **shaman_checkout**
|
||||
> ShamanCheckoutResult shaman_checkout(shaman_checkout)
|
||||
|
||||
Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import shaman_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.shaman_checkout import ShamanCheckout
|
||||
from flamenco.manager.model.shaman_checkout_result import ShamanCheckoutResult
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = shaman_api.ShamanApi(api_client)
|
||||
shaman_checkout = ShamanCheckout(
|
||||
files=[
|
||||
ShamanFileSpec(
|
||||
sha="sha_example",
|
||||
size=1,
|
||||
path="path_example",
|
||||
),
|
||||
],
|
||||
checkout_path="checkout_path_example",
|
||||
) # ShamanCheckout | Set of files to check out.
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
|
||||
api_response = api_instance.shaman_checkout(shaman_checkout)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling ShamanApi->shaman_checkout: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**shaman_checkout** | [**ShamanCheckout**](ShamanCheckout.md)| Set of files to check out. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ShamanCheckoutResult**](ShamanCheckoutResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Checkout was created succesfully. | - |
|
||||
**424** | There were files missing. Use `shamanCheckoutRequirements` to figure out which ones. | - |
|
||||
**409** | Checkout already exists. | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **shaman_checkout_requirements**
|
||||
> ShamanRequirementsResponse shaman_checkout_requirements(shaman_requirements_request)
|
||||
|
||||
Checks a Shaman Requirements file, and reports which files are unknown.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import shaman_api
|
||||
from flamenco.manager.model.shaman_requirements_request import ShamanRequirementsRequest
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.shaman_requirements_response import ShamanRequirementsResponse
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = shaman_api.ShamanApi(api_client)
|
||||
shaman_requirements_request = ShamanRequirementsRequest(
|
||||
files=[
|
||||
ShamanFileSpec(
|
||||
sha="sha_example",
|
||||
size=1,
|
||||
path="path_example",
|
||||
),
|
||||
],
|
||||
) # ShamanRequirementsRequest | Set of files to check
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Checks a Shaman Requirements file, and reports which files are unknown.
|
||||
api_response = api_instance.shaman_checkout_requirements(shaman_requirements_request)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling ShamanApi->shaman_checkout_requirements: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**shaman_requirements_request** | [**ShamanRequirementsRequest**](ShamanRequirementsRequest.md)| Set of files to check |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ShamanRequirementsResponse**](ShamanRequirementsResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Subset of the posted requirements, indicating the unknown files. | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **shaman_file_store**
|
||||
> shaman_file_store(checksum, filesize, body)
|
||||
|
||||
Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file's contents should be sent in the request body.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import shaman_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = shaman_api.ShamanApi(api_client)
|
||||
checksum = "checksum_example" # str | SHA256 checksum of the file.
|
||||
filesize = 1 # int | Size of the file in bytes.
|
||||
body = open('/path/to/file', 'rb') # file_type | Contents of the file
|
||||
x_shaman_can_defer_upload = True # bool | The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file. (optional)
|
||||
x_shaman_original_filename = "X-Shaman-Original-Filename_example" # str | The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging. (optional)
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file's contents should be sent in the request body.
|
||||
api_instance.shaman_file_store(checksum, filesize, body)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling ShamanApi->shaman_file_store: %s\n" % e)
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
# and optional values
|
||||
try:
|
||||
# Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file's contents should be sent in the request body.
|
||||
api_instance.shaman_file_store(checksum, filesize, body, x_shaman_can_defer_upload=x_shaman_can_defer_upload, x_shaman_original_filename=x_shaman_original_filename)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling ShamanApi->shaman_file_store: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**checksum** | **str**| SHA256 checksum of the file. |
|
||||
**filesize** | **int**| Size of the file in bytes. |
|
||||
**body** | **file_type**| Contents of the file |
|
||||
**x_shaman_can_defer_upload** | **bool**| The client indicates that it can defer uploading this file. The \"208\" response will not only be returned when the file is already fully known to the Shaman server, but also when someone else is currently uploading this file. | [optional]
|
||||
**x_shaman_original_filename** | **str**| The original filename. If sent along with the request, it will be included in the server logs, which can aid in debugging. | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/octet-stream
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | The file was accepted. | - |
|
||||
**208** | The file was already known to the server. | - |
|
||||
**417** | There was a mismatch between the request parameters and the actual file size or checksum of the uploaded file. | - |
|
||||
**425** | Client should defer uploading this file. The file is currently in the process of being uploaded by someone else, and `X-Shaman-Can-Defer-Upload: true` was sent in the request. | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **shaman_file_store_check**
|
||||
> ShamanSingleFileStatus shaman_file_store_check(checksum, filesize)
|
||||
|
||||
Check the status of a file on the Shaman server.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import shaman_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.shaman_single_file_status import ShamanSingleFileStatus
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = shaman_api.ShamanApi(api_client)
|
||||
checksum = "checksum_example" # str | SHA256 checksum of the file.
|
||||
filesize = 1 # int | Size of the file in bytes.
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Check the status of a file on the Shaman server.
|
||||
api_response = api_instance.shaman_file_store_check(checksum, filesize)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling ShamanApi->shaman_file_store_check: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**checksum** | **str**| SHA256 checksum of the file. |
|
||||
**filesize** | **int**| Size of the file in bytes. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ShamanSingleFileStatus**](ShamanSingleFileStatus.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Normal response. | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
14
addon/flamenco/manager/docs/ShamanCheckout.md
generated
14
addon/flamenco/manager/docs/ShamanCheckout.md
generated
@ -1,14 +0,0 @@
|
||||
# ShamanCheckout
|
||||
|
||||
Set of files with their SHA256 checksum, size in bytes, and desired location in the checkout directory.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**files** | [**[ShamanFileSpec]**](ShamanFileSpec.md) | |
|
||||
**checkout_path** | **str** | Path where the Manager should create this checkout. It is relative to the Shaman checkout path as configured on the Manager. In older versions of the Shaman this was just the \"checkout ID\", but in this version it can be a path like `project-slug/scene-name/unique-ID`. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
13
addon/flamenco/manager/docs/ShamanCheckoutResult.md
generated
13
addon/flamenco/manager/docs/ShamanCheckoutResult.md
generated
@ -1,13 +0,0 @@
|
||||
# ShamanCheckoutResult
|
||||
|
||||
The result of a Shaman checkout.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**checkout_path** | **str** | Path where the Manager created this checkout. This can be different than what was requested, as the Manager will ensure a unique directory. The path is relative to the Shaman checkout path as configured on the Manager. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
15
addon/flamenco/manager/docs/ShamanFileSpec.md
generated
15
addon/flamenco/manager/docs/ShamanFileSpec.md
generated
@ -1,15 +0,0 @@
|
||||
# ShamanFileSpec
|
||||
|
||||
Specification of a file in the Shaman storage.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sha** | **str** | SHA256 checksum of the file |
|
||||
**size** | **int** | File size in bytes |
|
||||
**path** | **str** | Location of the file in the checkout |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
# ShamanFileSpecWithStatus
|
||||
|
||||
Specification of a file, which could be in the Shaman storage, or not, depending on its status.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sha** | **str** | SHA256 checksum of the file |
|
||||
**size** | **int** | File size in bytes |
|
||||
**path** | **str** | Location of the file in the checkout |
|
||||
**status** | [**ShamanFileStatus**](ShamanFileStatus.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/ShamanFileStatus.md
generated
11
addon/flamenco/manager/docs/ShamanFileStatus.md
generated
@ -1,11 +0,0 @@
|
||||
# ShamanFileStatus
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | | must be one of ["unknown", "uploading", "stored", ]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
# ShamanRequirementsRequest
|
||||
|
||||
Set of files with their SHA256 checksum and size in bytes.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**files** | [**[ShamanFileSpec]**](ShamanFileSpec.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
# ShamanRequirementsResponse
|
||||
|
||||
The files from a requirements request, with their status on the Shaman server. Files that are known to Shaman are excluded from the response.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**files** | [**[ShamanFileSpecWithStatus]**](ShamanFileSpecWithStatus.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
# ShamanSingleFileStatus
|
||||
|
||||
Status of a file in the Shaman storage.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**status** | [**ShamanFileStatus**](ShamanFileStatus.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
16
addon/flamenco/manager/docs/SharedStorageLocation.md
generated
16
addon/flamenco/manager/docs/SharedStorageLocation.md
generated
@ -1,16 +0,0 @@
|
||||
# SharedStorageLocation
|
||||
|
||||
Location of the shared storage, adjusted for a specific audience & platform. This uses two-way variables to adjust the shared storage path from the Manager's configuration.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**location** | **str** | |
|
||||
**audience** | [**ManagerVariableAudience**](ManagerVariableAudience.md) | |
|
||||
**platform** | **str** | |
|
||||
**shaman_enabled** | **bool** | Whether the Shaman file transfer API is available. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
22
addon/flamenco/manager/docs/SocketIOJobUpdate.md
generated
22
addon/flamenco/manager/docs/SocketIOJobUpdate.md
generated
@ -1,22 +0,0 @@
|
||||
# SocketIOJobUpdate
|
||||
|
||||
Subset of a Job, sent over SocketIO when a job changes. For new jobs, `previous_status` will be excluded.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | UUID of the Job |
|
||||
**updated** | **datetime** | Timestamp of last update |
|
||||
**status** | [**JobStatus**](JobStatus.md) | |
|
||||
**type** | **str** | |
|
||||
**refresh_tasks** | **bool** | Indicates that the client should refresh all the job's tasks. This is sent for mass updates, where updating each individual task would generate too many updates to be practical. |
|
||||
**priority** | **int** | | defaults to 50
|
||||
**name** | **str** | Name of the job | [optional]
|
||||
**previous_status** | [**JobStatus**](JobStatus.md) | | [optional]
|
||||
**delete_requested_at** | **datetime** | If job deletion was requested, this is the timestamp at which that request was stored on Flamenco Manager. | [optional]
|
||||
**was_deleted** | **bool** | When a job was just deleted, this is set to `true`. If this is specified, only the 'id' field is set, the rest will be empty. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
# SocketIOLastRenderedUpdate
|
||||
|
||||
Indicator that the last-rendered image of this job was updated.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**job_id** | **str** | |
|
||||
**thumbnail** | [**JobLastRenderedImageInfo**](JobLastRenderedImageInfo.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
15
addon/flamenco/manager/docs/SocketIOSubscription.md
generated
15
addon/flamenco/manager/docs/SocketIOSubscription.md
generated
@ -1,15 +0,0 @@
|
||||
# SocketIOSubscription
|
||||
|
||||
Send by SocketIO clients as `/subscription` event type, to manage their subscription to job updates. Clients always get job updates, but for task updates or task logs they need to explicitly subscribe. For simplicity, clients can only subscribe to one job (to get task updates for that job) and one task's log at a time.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**op** | [**SocketIOSubscriptionOperation**](SocketIOSubscriptionOperation.md) | |
|
||||
**type** | [**SocketIOSubscriptionType**](SocketIOSubscriptionType.md) | |
|
||||
**uuid** | **str** | UUID of the thing to subscribe to / unsubscribe from. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
# SocketIOSubscriptionOperation
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | | must be one of ["subscribe", "unsubscribe", ]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
# SocketIOSubscriptionType
|
||||
|
||||
What kind of thing to subscribe to / unsubscribe from.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | What kind of thing to subscribe to / unsubscribe from. | must be one of ["allJobs", "allWorkers", "job", "tasklog", "allLastRendered", ]
|
||||
|
||||
[[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
addon/flamenco/manager/docs/SocketIOTaskLogUpdate.md
generated
14
addon/flamenco/manager/docs/SocketIOTaskLogUpdate.md
generated
@ -1,14 +0,0 @@
|
||||
# SocketIOTaskLogUpdate
|
||||
|
||||
Task log chunk, sent to a SocketIO room dedicated to a single task, to avoid sending too many updates.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**task_id** | **str** | UUID of the Task |
|
||||
**log** | **str** | Chunk of the task log. May contain multiple lines of text. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
19
addon/flamenco/manager/docs/SocketIOTaskUpdate.md
generated
19
addon/flamenco/manager/docs/SocketIOTaskUpdate.md
generated
@ -1,19 +0,0 @@
|
||||
# SocketIOTaskUpdate
|
||||
|
||||
Subset of a Task, sent over SocketIO when a task changes. For new tasks, `previous_status` will be excluded.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | UUID of the Task |
|
||||
**job_id** | **str** | |
|
||||
**name** | **str** | Name of the task |
|
||||
**updated** | **datetime** | Timestamp of last update |
|
||||
**status** | [**TaskStatus**](TaskStatus.md) | |
|
||||
**activity** | **str** | |
|
||||
**previous_status** | [**TaskStatus**](TaskStatus.md) | | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
21
addon/flamenco/manager/docs/SocketIOWorkerUpdate.md
generated
21
addon/flamenco/manager/docs/SocketIOWorkerUpdate.md
generated
@ -1,21 +0,0 @@
|
||||
# SocketIOWorkerUpdate
|
||||
|
||||
Subset of a Worker, sent over SocketIO when a worker changes.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | UUID of the Worker |
|
||||
**name** | **str** | Name of the worker |
|
||||
**updated** | **datetime** | Timestamp of last update |
|
||||
**status** | [**WorkerStatus**](WorkerStatus.md) | |
|
||||
**version** | **str** | |
|
||||
**last_seen** | **datetime** | Last time this worker was seen by the Manager. | [optional]
|
||||
**previous_status** | [**WorkerStatus**](WorkerStatus.md) | | [optional]
|
||||
**status_change** | [**WorkerStatusChangeRequest**](WorkerStatusChangeRequest.md) | | [optional]
|
||||
**deleted_at** | **datetime** | This is only set when the worker was deleted. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
21
addon/flamenco/manager/docs/SubmittedJob.md
generated
21
addon/flamenco/manager/docs/SubmittedJob.md
generated
@ -1,21 +0,0 @@
|
||||
# SubmittedJob
|
||||
|
||||
Job definition submitted to Flamenco.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
**type** | **str** | |
|
||||
**submitter_platform** | **str** | Operating system of the submitter. This is used to recognise two-way variables. This should be a lower-case version of the platform, like \"linux\", \"windows\", \"darwin\", \"openbsd\", etc. Should be ompatible with Go's `runtime.GOOS`; run `go tool dist list` to get a list of possible platforms. As a special case, the platform \"manager\" can be given, which will be interpreted as \"the Manager's platform\". This is mostly to make test/debug scripts easier, as they can use a static document on all platforms. |
|
||||
**priority** | **int** | | defaults to 50
|
||||
**type_etag** | **str** | Hash of the job type, copied from the `AvailableJobType.etag` property of the job type. The job will be rejected if this field doesn't match the actual job type on the Manager. This prevents job submission with old settings, after the job compiler script has been updated. If this field is ommitted, the check is bypassed. | [optional]
|
||||
**settings** | [**JobSettings**](JobSettings.md) | | [optional]
|
||||
**metadata** | [**JobMetadata**](JobMetadata.md) | | [optional]
|
||||
**storage** | [**JobStorageInfo**](JobStorageInfo.md) | | [optional]
|
||||
**worker_tag** | **str** | Worker tag that should execute this job. When a tag ID is given, only Workers in that tag will be scheduled to work on it. If empty or ommitted, all workers can work on this job. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
25
addon/flamenco/manager/docs/Task.md
generated
25
addon/flamenco/manager/docs/Task.md
generated
@ -1,25 +0,0 @@
|
||||
# Task
|
||||
|
||||
The task as it exists in the Manager database, i.e. before variable replacement.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | |
|
||||
**created** | **datetime** | Creation timestamp |
|
||||
**updated** | **datetime** | Timestamp of last update. |
|
||||
**job_id** | **str** | |
|
||||
**name** | **str** | |
|
||||
**status** | [**TaskStatus**](TaskStatus.md) | |
|
||||
**priority** | **int** | |
|
||||
**task_type** | **str** | |
|
||||
**activity** | **str** | |
|
||||
**commands** | [**[Command]**](Command.md) | |
|
||||
**worker** | [**TaskWorker**](TaskWorker.md) | | [optional]
|
||||
**last_touched** | **datetime** | Timestamp of when any worker worked on this task. | [optional]
|
||||
**failed_by_workers** | [**[TaskWorker]**](TaskWorker.md) | | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
16
addon/flamenco/manager/docs/TaskLogInfo.md
generated
16
addon/flamenco/manager/docs/TaskLogInfo.md
generated
@ -1,16 +0,0 @@
|
||||
# TaskLogInfo
|
||||
|
||||
Info about the log of a single task.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**task_id** | **str** | |
|
||||
**job_id** | **str** | |
|
||||
**url** | **str** | The URL at which the task log itself can be downloaded. |
|
||||
**size** | **int** | The size of the task log, in bytes. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/TaskStatus.md
generated
11
addon/flamenco/manager/docs/TaskStatus.md
generated
@ -1,11 +0,0 @@
|
||||
# TaskStatus
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | | must be one of ["active", "canceled", "completed", "failed", "queued", "soft-failed", "paused", ]
|
||||
|
||||
[[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
addon/flamenco/manager/docs/TaskStatusChange.md
generated
13
addon/flamenco/manager/docs/TaskStatusChange.md
generated
@ -1,13 +0,0 @@
|
||||
# TaskStatusChange
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**status** | [**TaskStatus**](TaskStatus.md) | |
|
||||
**reason** | **str** | The reason for this status change. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
18
addon/flamenco/manager/docs/TaskSummary.md
generated
18
addon/flamenco/manager/docs/TaskSummary.md
generated
@ -1,18 +0,0 @@
|
||||
# TaskSummary
|
||||
|
||||
Just enough information about the task to show in the job's task list.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | |
|
||||
**name** | **str** | |
|
||||
**status** | [**TaskStatus**](TaskStatus.md) | |
|
||||
**priority** | **int** | |
|
||||
**task_type** | **str** | |
|
||||
**updated** | **datetime** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
15
addon/flamenco/manager/docs/TaskUpdate.md
generated
15
addon/flamenco/manager/docs/TaskUpdate.md
generated
@ -1,15 +0,0 @@
|
||||
# TaskUpdate
|
||||
|
||||
TaskUpdate is sent by a Worker to update the status & logs of a task it's executing. All properties are optional; omitted properties are ignored (i.e. omitting `activity` will not erase the activity property of the task).
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**task_status** | [**TaskStatus**](TaskStatus.md) | | [optional]
|
||||
**activity** | **str** | One-liner to indicate what's currently happening with the task. Overwrites previously sent activity strings. | [optional]
|
||||
**log** | **str** | Log lines for this task, will be appended to logs sent earlier. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
15
addon/flamenco/manager/docs/TaskWorker.md
generated
15
addon/flamenco/manager/docs/TaskWorker.md
generated
@ -1,15 +0,0 @@
|
||||
# TaskWorker
|
||||
|
||||
Worker reference, as used in Task objects.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | |
|
||||
**name** | **str** | |
|
||||
**address** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
23
addon/flamenco/manager/docs/Worker.md
generated
23
addon/flamenco/manager/docs/Worker.md
generated
@ -1,23 +0,0 @@
|
||||
# Worker
|
||||
|
||||
All information about a Worker
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | |
|
||||
**name** | **str** | |
|
||||
**status** | [**WorkerStatus**](WorkerStatus.md) | |
|
||||
**version** | **str** | Version of Flamenco this Worker is running |
|
||||
**ip_address** | **str** | IP address of the Worker |
|
||||
**platform** | **str** | Operating system of the Worker |
|
||||
**supported_task_types** | **[str]** | |
|
||||
**status_change** | [**WorkerStatusChangeRequest**](WorkerStatusChangeRequest.md) | | [optional]
|
||||
**last_seen** | **datetime** | Last time this worker was seen by the Manager. | [optional]
|
||||
**task** | [**WorkerTask**](WorkerTask.md) | | [optional]
|
||||
**tags** | [**[WorkerTag]**](WorkerTag.md) | Tags of which this Worker is a member. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
16
addon/flamenco/manager/docs/WorkerAllOf.md
generated
16
addon/flamenco/manager/docs/WorkerAllOf.md
generated
@ -1,16 +0,0 @@
|
||||
# WorkerAllOf
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ip_address** | **str** | IP address of the Worker |
|
||||
**platform** | **str** | Operating system of the Worker |
|
||||
**supported_task_types** | **[str]** | |
|
||||
**task** | [**WorkerTask**](WorkerTask.md) | | [optional]
|
||||
**tags** | [**[WorkerTag]**](WorkerTag.md) | Tags of which this Worker is a member. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
724
addon/flamenco/manager/docs/WorkerApi.md
generated
724
addon/flamenco/manager/docs/WorkerApi.md
generated
@ -1,724 +0,0 @@
|
||||
# flamenco.manager.WorkerApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**may_worker_run**](WorkerApi.md#may_worker_run) | **GET** /api/v3/worker/task/{task_id}/may-i-run | The response indicates whether the worker is allowed to run / keep running the task. Optionally contains a queued worker status change.
|
||||
[**register_worker**](WorkerApi.md#register_worker) | **POST** /api/v3/worker/register-worker | Register a new worker
|
||||
[**schedule_task**](WorkerApi.md#schedule_task) | **POST** /api/v3/worker/task | Obtain a new task to execute
|
||||
[**sign_off**](WorkerApi.md#sign_off) | **POST** /api/v3/worker/sign-off | Mark the worker as offline
|
||||
[**sign_on**](WorkerApi.md#sign_on) | **POST** /api/v3/worker/sign-on | Authenticate & sign in the worker.
|
||||
[**task_output_produced**](WorkerApi.md#task_output_produced) | **POST** /api/v3/worker/task/{task_id}/output-produced | Store the most recently rendered frame here. Note that it is up to the Worker to ensure this is in a format that's digestable by the Manager. Currently only PNG and JPEG support is planned.
|
||||
[**task_update**](WorkerApi.md#task_update) | **POST** /api/v3/worker/task/{task_id} | Update the task, typically to indicate progress, completion, or failure.
|
||||
[**worker_state**](WorkerApi.md#worker_state) | **GET** /api/v3/worker/state |
|
||||
[**worker_state_changed**](WorkerApi.md#worker_state_changed) | **POST** /api/v3/worker/state-changed | Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
|
||||
|
||||
|
||||
# **may_worker_run**
|
||||
> MayKeepRunning may_worker_run(task_id)
|
||||
|
||||
The response indicates whether the worker is allowed to run / keep running the task. Optionally contains a queued worker status change.
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (worker_auth):
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.may_keep_running import MayKeepRunning
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: worker_auth
|
||||
configuration = flamenco.manager.Configuration(
|
||||
username = 'YOUR_USERNAME',
|
||||
password = 'YOUR_PASSWORD'
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_api.WorkerApi(api_client)
|
||||
task_id = "task_id_example" # str |
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# The response indicates whether the worker is allowed to run / keep running the task. Optionally contains a queued worker status change.
|
||||
api_response = api_instance.may_worker_run(task_id)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerApi->may_worker_run: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**task_id** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**MayKeepRunning**](MayKeepRunning.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[worker_auth](../README.md#worker_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | normal response | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **register_worker**
|
||||
> RegisteredWorker register_worker(worker_registration)
|
||||
|
||||
Register a new worker
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_registration import WorkerRegistration
|
||||
from flamenco.manager.model.registered_worker import RegisteredWorker
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_api.WorkerApi(api_client)
|
||||
worker_registration = WorkerRegistration(
|
||||
secret="secret_example",
|
||||
platform="platform_example",
|
||||
supported_task_types=[
|
||||
"supported_task_types_example",
|
||||
],
|
||||
name="name_example",
|
||||
) # WorkerRegistration | Worker to register
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Register a new worker
|
||||
api_response = api_instance.register_worker(worker_registration)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerApi->register_worker: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_registration** | [**WorkerRegistration**](WorkerRegistration.md)| Worker to register |
|
||||
|
||||
### Return type
|
||||
|
||||
[**RegisteredWorker**](RegisteredWorker.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | normal response | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **schedule_task**
|
||||
> AssignedTask schedule_task()
|
||||
|
||||
Obtain a new task to execute
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (worker_auth):
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_api
|
||||
from flamenco.manager.model.worker_state_change import WorkerStateChange
|
||||
from flamenco.manager.model.security_error import SecurityError
|
||||
from flamenco.manager.model.assigned_task import AssignedTask
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: worker_auth
|
||||
configuration = flamenco.manager.Configuration(
|
||||
username = 'YOUR_USERNAME',
|
||||
password = 'YOUR_PASSWORD'
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_api.WorkerApi(api_client)
|
||||
|
||||
# example, this endpoint has no required or optional parameters
|
||||
try:
|
||||
# Obtain a new task to execute
|
||||
api_response = api_instance.schedule_task()
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerApi->schedule_task: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**AssignedTask**](AssignedTask.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[worker_auth](../README.md#worker_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | No tasks available for this Worker. | - |
|
||||
**200** | Task to execute. | - |
|
||||
**403** | Permission Denied | - |
|
||||
**409** | Worker is not in the active state, so is not allowed to execute tasks right now. | - |
|
||||
**423** | Worker cannot obtain new tasks, but must go to another state. | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **sign_off**
|
||||
> sign_off()
|
||||
|
||||
Mark the worker as offline
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (worker_auth):
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: worker_auth
|
||||
configuration = flamenco.manager.Configuration(
|
||||
username = 'YOUR_USERNAME',
|
||||
password = 'YOUR_PASSWORD'
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_api.WorkerApi(api_client)
|
||||
|
||||
# example, this endpoint has no required or optional parameters
|
||||
try:
|
||||
# Mark the worker as offline
|
||||
api_instance.sign_off()
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerApi->sign_off: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[worker_auth](../README.md#worker_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | normal response | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **sign_on**
|
||||
> WorkerStateChange sign_on(worker_sign_on)
|
||||
|
||||
Authenticate & sign in the worker.
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (worker_auth):
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_state_change import WorkerStateChange
|
||||
from flamenco.manager.model.worker_sign_on import WorkerSignOn
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: worker_auth
|
||||
configuration = flamenco.manager.Configuration(
|
||||
username = 'YOUR_USERNAME',
|
||||
password = 'YOUR_PASSWORD'
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_api.WorkerApi(api_client)
|
||||
worker_sign_on = WorkerSignOn(
|
||||
name="name_example",
|
||||
supported_task_types=[
|
||||
"supported_task_types_example",
|
||||
],
|
||||
software_version="software_version_example",
|
||||
) # WorkerSignOn | Worker metadata
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Authenticate & sign in the worker.
|
||||
api_response = api_instance.sign_on(worker_sign_on)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerApi->sign_on: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_sign_on** | [**WorkerSignOn**](WorkerSignOn.md)| Worker metadata |
|
||||
|
||||
### Return type
|
||||
|
||||
[**WorkerStateChange**](WorkerStateChange.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[worker_auth](../README.md#worker_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | normal response | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **task_output_produced**
|
||||
> task_output_produced(task_id, body)
|
||||
|
||||
Store the most recently rendered frame here. Note that it is up to the Worker to ensure this is in a format that's digestable by the Manager. Currently only PNG and JPEG support is planned.
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (worker_auth):
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: worker_auth
|
||||
configuration = flamenco.manager.Configuration(
|
||||
username = 'YOUR_USERNAME',
|
||||
password = 'YOUR_PASSWORD'
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_api.WorkerApi(api_client)
|
||||
task_id = "task_id_example" # str |
|
||||
body = open('/path/to/file', 'rb') # file_type | Contents of the file
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Store the most recently rendered frame here. Note that it is up to the Worker to ensure this is in a format that's digestable by the Manager. Currently only PNG and JPEG support is planned.
|
||||
api_instance.task_output_produced(task_id, body)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerApi->task_output_produced: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**task_id** | **str**| |
|
||||
**body** | **file_type**| Contents of the file |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[worker_auth](../README.md#worker_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: image/jpeg, image/png
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**202** | The file was accepted for processing. | - |
|
||||
**411** | Length required; the client did not send a Content-Length header. | - |
|
||||
**413** | Payload too large. | - |
|
||||
**415** | Unsupported Media Type, the image format cannot be processed by the Manager. | - |
|
||||
**429** | The client is sending too many frames, and should throttle itself. | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **task_update**
|
||||
> task_update(task_id, task_update)
|
||||
|
||||
Update the task, typically to indicate progress, completion, or failure.
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (worker_auth):
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.task_update import TaskUpdate
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: worker_auth
|
||||
configuration = flamenco.manager.Configuration(
|
||||
username = 'YOUR_USERNAME',
|
||||
password = 'YOUR_PASSWORD'
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_api.WorkerApi(api_client)
|
||||
task_id = "task_id_example" # str |
|
||||
task_update = TaskUpdate(
|
||||
task_status=TaskStatus("active"),
|
||||
activity="activity_example",
|
||||
log="log_example",
|
||||
) # TaskUpdate | Task update information
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Update the task, typically to indicate progress, completion, or failure.
|
||||
api_instance.task_update(task_id, task_update)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerApi->task_update: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**task_id** | **str**| |
|
||||
**task_update** | [**TaskUpdate**](TaskUpdate.md)| Task update information |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[worker_auth](../README.md#worker_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | The update was accepted. | - |
|
||||
**409** | The task is assigned to another worker, so the update was not accepted. | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **worker_state**
|
||||
> WorkerStateChange worker_state()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (worker_auth):
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_state_change import WorkerStateChange
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: worker_auth
|
||||
configuration = flamenco.manager.Configuration(
|
||||
username = 'YOUR_USERNAME',
|
||||
password = 'YOUR_PASSWORD'
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_api.WorkerApi(api_client)
|
||||
|
||||
# example, this endpoint has no required or optional parameters
|
||||
try:
|
||||
api_response = api_instance.worker_state()
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerApi->worker_state: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**WorkerStateChange**](WorkerStateChange.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[worker_auth](../README.md#worker_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | no state change requested | - |
|
||||
**200** | state change requested | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **worker_state_changed**
|
||||
> worker_state_changed(worker_state_changed)
|
||||
|
||||
Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (worker_auth):
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_state_changed import WorkerStateChanged
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: worker_auth
|
||||
configuration = flamenco.manager.Configuration(
|
||||
username = 'YOUR_USERNAME',
|
||||
password = 'YOUR_PASSWORD'
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_api.WorkerApi(api_client)
|
||||
worker_state_changed = WorkerStateChanged(
|
||||
status=WorkerStatus("starting"),
|
||||
) # WorkerStateChanged | New worker state
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.
|
||||
api_instance.worker_state_changed(worker_state_changed)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerApi->worker_state_changed: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_state_changed** | [**WorkerStateChanged**](WorkerStateChanged.md)| New worker state |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[worker_auth](../README.md#worker_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | normal response | - |
|
||||
**0** | unexpected error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
13
addon/flamenco/manager/docs/WorkerList.md
generated
13
addon/flamenco/manager/docs/WorkerList.md
generated
@ -1,13 +0,0 @@
|
||||
# WorkerList
|
||||
|
||||
List of workers.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**workers** | [**[WorkerSummary]**](WorkerSummary.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
825
addon/flamenco/manager/docs/WorkerMgtApi.md
generated
825
addon/flamenco/manager/docs/WorkerMgtApi.md
generated
@ -1,825 +0,0 @@
|
||||
# flamenco.manager.WorkerMgtApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**create_worker_tag**](WorkerMgtApi.md#create_worker_tag) | **POST** /api/v3/worker-mgt/tags | Create a new worker tag.
|
||||
[**delete_worker**](WorkerMgtApi.md#delete_worker) | **DELETE** /api/v3/worker-mgt/workers/{worker_id} | Remove the given worker. It is recommended to only call this function when the worker is in `offline` state. If the worker is still running, stop it first. Any task still assigned to the worker will be requeued.
|
||||
[**delete_worker_tag**](WorkerMgtApi.md#delete_worker_tag) | **DELETE** /api/v3/worker-mgt/tag/{tag_id} | Remove this worker tag. This unassigns all workers from the tag and removes it.
|
||||
[**fetch_worker**](WorkerMgtApi.md#fetch_worker) | **GET** /api/v3/worker-mgt/workers/{worker_id} | Fetch info about the worker.
|
||||
[**fetch_worker_sleep_schedule**](WorkerMgtApi.md#fetch_worker_sleep_schedule) | **GET** /api/v3/worker-mgt/workers/{worker_id}/sleep-schedule |
|
||||
[**fetch_worker_tag**](WorkerMgtApi.md#fetch_worker_tag) | **GET** /api/v3/worker-mgt/tag/{tag_id} | Get a single worker tag.
|
||||
[**fetch_worker_tags**](WorkerMgtApi.md#fetch_worker_tags) | **GET** /api/v3/worker-mgt/tags | Get list of worker tags.
|
||||
[**fetch_workers**](WorkerMgtApi.md#fetch_workers) | **GET** /api/v3/worker-mgt/workers | Get list of workers.
|
||||
[**request_worker_status_change**](WorkerMgtApi.md#request_worker_status_change) | **POST** /api/v3/worker-mgt/workers/{worker_id}/setstatus |
|
||||
[**set_worker_sleep_schedule**](WorkerMgtApi.md#set_worker_sleep_schedule) | **POST** /api/v3/worker-mgt/workers/{worker_id}/sleep-schedule |
|
||||
[**set_worker_tags**](WorkerMgtApi.md#set_worker_tags) | **POST** /api/v3/worker-mgt/workers/{worker_id}/settags |
|
||||
[**update_worker_tag**](WorkerMgtApi.md#update_worker_tag) | **PUT** /api/v3/worker-mgt/tag/{tag_id} | Update an existing worker tag.
|
||||
|
||||
|
||||
# **create_worker_tag**
|
||||
> WorkerTag create_worker_tag(worker_tag)
|
||||
|
||||
Create a new worker tag.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_tag import WorkerTag
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
worker_tag = WorkerTag(
|
||||
id="id_example",
|
||||
name="name_example",
|
||||
description="description_example",
|
||||
) # WorkerTag | The worker tag.
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Create a new worker tag.
|
||||
api_response = api_instance.create_worker_tag(worker_tag)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->create_worker_tag: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_tag** | [**WorkerTag**](WorkerTag.md)| The worker tag. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**WorkerTag**](WorkerTag.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | The tag was created. The created tag is returned, so that the caller can know its UUID. | - |
|
||||
**0** | Error message | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **delete_worker**
|
||||
> delete_worker(worker_id)
|
||||
|
||||
Remove the given worker. It is recommended to only call this function when the worker is in `offline` state. If the worker is still running, stop it first. Any task still assigned to the worker will be requeued.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
worker_id = "worker_id_example" # str |
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Remove the given worker. It is recommended to only call this function when the worker is in `offline` state. If the worker is still running, stop it first. Any task still assigned to the worker will be requeued.
|
||||
api_instance.delete_worker(worker_id)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->delete_worker: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_id** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | Normal response, worker has been deleted | - |
|
||||
**0** | Unexpected error. | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **delete_worker_tag**
|
||||
> delete_worker_tag(tag_id)
|
||||
|
||||
Remove this worker tag. This unassigns all workers from the tag and removes it.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
tag_id = "tag_id_example" # str |
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Remove this worker tag. This unassigns all workers from the tag and removes it.
|
||||
api_instance.delete_worker_tag(tag_id)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->delete_worker_tag: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tag_id** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | The tag has been removed. | - |
|
||||
**0** | Unexpected error. | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **fetch_worker**
|
||||
> Worker fetch_worker(worker_id)
|
||||
|
||||
Fetch info about the worker.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.worker import Worker
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
worker_id = "worker_id_example" # str |
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Fetch info about the worker.
|
||||
api_response = api_instance.fetch_worker(worker_id)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->fetch_worker: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_id** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Worker**](Worker.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Worker info | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **fetch_worker_sleep_schedule**
|
||||
> WorkerSleepSchedule fetch_worker_sleep_schedule(worker_id)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_sleep_schedule import WorkerSleepSchedule
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
worker_id = "worker_id_example" # str |
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
api_response = api_instance.fetch_worker_sleep_schedule(worker_id)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->fetch_worker_sleep_schedule: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_id** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**WorkerSleepSchedule**](WorkerSleepSchedule.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Normal response, the sleep schedule. | - |
|
||||
**204** | The worker has no sleep schedule. | - |
|
||||
**0** | Unexpected error. | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **fetch_worker_tag**
|
||||
> WorkerTag fetch_worker_tag(tag_id)
|
||||
|
||||
Get a single worker tag.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.worker_tag import WorkerTag
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
tag_id = "tag_id_example" # str |
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Get a single worker tag.
|
||||
api_response = api_instance.fetch_worker_tag(tag_id)
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->fetch_worker_tag: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tag_id** | **str**| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**WorkerTag**](WorkerTag.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | The worker tag. | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **fetch_worker_tags**
|
||||
> WorkerTagList fetch_worker_tags()
|
||||
|
||||
Get list of worker tags.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.worker_tag_list import WorkerTagList
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
|
||||
# example, this endpoint has no required or optional parameters
|
||||
try:
|
||||
# Get list of worker tags.
|
||||
api_response = api_instance.fetch_worker_tags()
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->fetch_worker_tags: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**WorkerTagList**](WorkerTagList.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Worker tags. | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **fetch_workers**
|
||||
> WorkerList fetch_workers()
|
||||
|
||||
Get list of workers.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.worker_list import WorkerList
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
|
||||
# example, this endpoint has no required or optional parameters
|
||||
try:
|
||||
# Get list of workers.
|
||||
api_response = api_instance.fetch_workers()
|
||||
pprint(api_response)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->fetch_workers: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**WorkerList**](WorkerList.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Known workers | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **request_worker_status_change**
|
||||
> request_worker_status_change(worker_id, worker_status_change_request)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_status_change_request import WorkerStatusChangeRequest
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
worker_id = "worker_id_example" # str |
|
||||
worker_status_change_request = WorkerStatusChangeRequest(
|
||||
status=WorkerStatus("starting"),
|
||||
is_lazy=True,
|
||||
) # WorkerStatusChangeRequest | The status change to request.
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
api_instance.request_worker_status_change(worker_id, worker_status_change_request)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->request_worker_status_change: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_id** | **str**| |
|
||||
**worker_status_change_request** | [**WorkerStatusChangeRequest**](WorkerStatusChangeRequest.md)| The status change to request. |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | Status change was accepted. | - |
|
||||
**0** | Unexpected error. | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **set_worker_sleep_schedule**
|
||||
> set_worker_sleep_schedule(worker_id, worker_sleep_schedule)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_sleep_schedule import WorkerSleepSchedule
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
worker_id = "worker_id_example" # str |
|
||||
worker_sleep_schedule = WorkerSleepSchedule(
|
||||
is_active=True,
|
||||
days_of_week="days_of_week_example",
|
||||
start_time="start_time_example",
|
||||
end_time="end_time_example",
|
||||
) # WorkerSleepSchedule | The new sleep schedule.
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
api_instance.set_worker_sleep_schedule(worker_id, worker_sleep_schedule)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->set_worker_sleep_schedule: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_id** | **str**| |
|
||||
**worker_sleep_schedule** | [**WorkerSleepSchedule**](WorkerSleepSchedule.md)| The new sleep schedule. |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | The schedule has been stored. | - |
|
||||
**0** | Unexpected error. | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **set_worker_tags**
|
||||
> set_worker_tags(worker_id, worker_tag_change_request)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_tag_change_request import WorkerTagChangeRequest
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
worker_id = "worker_id_example" # str |
|
||||
worker_tag_change_request = WorkerTagChangeRequest(
|
||||
tag_ids=[
|
||||
"tag_ids_example",
|
||||
],
|
||||
) # WorkerTagChangeRequest | The list of worker tag IDs this worker should be a member of.
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
api_instance.set_worker_tags(worker_id, worker_tag_change_request)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->set_worker_tags: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**worker_id** | **str**| |
|
||||
**worker_tag_change_request** | [**WorkerTagChangeRequest**](WorkerTagChangeRequest.md)| The list of worker tag IDs this worker should be a member of. |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | Status change was accepted. | - |
|
||||
**0** | Unexpected error. | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_worker_tag**
|
||||
> update_worker_tag(tag_id, worker_tag)
|
||||
|
||||
Update an existing worker tag.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
```python
|
||||
import time
|
||||
import flamenco.manager
|
||||
from flamenco.manager.api import worker_mgt_api
|
||||
from flamenco.manager.model.error import Error
|
||||
from flamenco.manager.model.worker_tag import WorkerTag
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = flamenco.manager.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with flamenco.manager.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = worker_mgt_api.WorkerMgtApi(api_client)
|
||||
tag_id = "tag_id_example" # str |
|
||||
worker_tag = WorkerTag(
|
||||
id="id_example",
|
||||
name="name_example",
|
||||
description="description_example",
|
||||
) # WorkerTag | The updated worker tag.
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Update an existing worker tag.
|
||||
api_instance.update_worker_tag(tag_id, worker_tag)
|
||||
except flamenco.manager.ApiException as e:
|
||||
print("Exception when calling WorkerMgtApi->update_worker_tag: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tag_id** | **str**| |
|
||||
**worker_tag** | [**WorkerTag**](WorkerTag.md)| The updated worker tag. |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | The tag update has been stored. | - |
|
||||
**0** | Error message | - |
|
||||
|
||||
[[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)
|
||||
|
15
addon/flamenco/manager/docs/WorkerRegistration.md
generated
15
addon/flamenco/manager/docs/WorkerRegistration.md
generated
@ -1,15 +0,0 @@
|
||||
# WorkerRegistration
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**secret** | **str** | |
|
||||
**platform** | **str** | |
|
||||
**supported_task_types** | **[str]** | |
|
||||
**name** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/WorkerSignOn.md
generated
14
addon/flamenco/manager/docs/WorkerSignOn.md
generated
@ -1,14 +0,0 @@
|
||||
# WorkerSignOn
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
**supported_task_types** | **[str]** | |
|
||||
**software_version** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
16
addon/flamenco/manager/docs/WorkerSleepSchedule.md
generated
16
addon/flamenco/manager/docs/WorkerSleepSchedule.md
generated
@ -1,16 +0,0 @@
|
||||
# WorkerSleepSchedule
|
||||
|
||||
Sleep schedule for a single Worker. Start and end time indicate the time of each day at which the schedule is active. Applies only when today is in `days_of_week`, or when `days_of_week` is empty. Start and end time are in 24-hour HH:MM notation.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**is_active** | **bool** | |
|
||||
**days_of_week** | **str** | Space-separated two-letter strings indicating days of week the schedule is active (\"mo\", \"tu\", etc.). Empty means \"every day\". |
|
||||
**start_time** | **str** | |
|
||||
**end_time** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
12
addon/flamenco/manager/docs/WorkerStateChange.md
generated
12
addon/flamenco/manager/docs/WorkerStateChange.md
generated
@ -1,12 +0,0 @@
|
||||
# WorkerStateChange
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**status_requested** | [**WorkerStatus**](WorkerStatus.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
12
addon/flamenco/manager/docs/WorkerStateChanged.md
generated
12
addon/flamenco/manager/docs/WorkerStateChanged.md
generated
@ -1,12 +0,0 @@
|
||||
# WorkerStateChanged
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**status** | [**WorkerStatus**](WorkerStatus.md) | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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
addon/flamenco/manager/docs/WorkerStatus.md
generated
11
addon/flamenco/manager/docs/WorkerStatus.md
generated
@ -1,11 +0,0 @@
|
||||
# WorkerStatus
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | | must be one of ["starting", "awake", "asleep", "error", "testing", "offline", ]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
# WorkerStatusChangeRequest
|
||||
|
||||
Request for a Worker to change its status to `status`.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**status** | [**WorkerStatus**](WorkerStatus.md) | |
|
||||
**is_lazy** | **bool** | Whether the status change should happen immediately, or after the worker's current task is finished. |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
18
addon/flamenco/manager/docs/WorkerSummary.md
generated
18
addon/flamenco/manager/docs/WorkerSummary.md
generated
@ -1,18 +0,0 @@
|
||||
# WorkerSummary
|
||||
|
||||
Basic information about a Worker.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | |
|
||||
**name** | **str** | |
|
||||
**status** | [**WorkerStatus**](WorkerStatus.md) | |
|
||||
**version** | **str** | Version of Flamenco this Worker is running |
|
||||
**status_change** | [**WorkerStatusChangeRequest**](WorkerStatusChangeRequest.md) | | [optional]
|
||||
**last_seen** | **datetime** | Last time this worker was seen by the Manager. | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
15
addon/flamenco/manager/docs/WorkerTag.md
generated
15
addon/flamenco/manager/docs/WorkerTag.md
generated
@ -1,15 +0,0 @@
|
||||
# WorkerTag
|
||||
|
||||
Tag of workers. A job can optionally specify which tag it should be limited to. Workers can be part of multiple tags simultaneously.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
**id** | **str** | UUID of the tag. Can be ommitted when creating a new tag, in which case a random UUID will be assigned. | [optional]
|
||||
**description** | **str** | | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
# WorkerTagChangeRequest
|
||||
|
||||
Request to change which tags this Worker is assigned to.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**tag_ids** | **[str]** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
12
addon/flamenco/manager/docs/WorkerTagList.md
generated
12
addon/flamenco/manager/docs/WorkerTagList.md
generated
@ -1,12 +0,0 @@
|
||||
# WorkerTagList
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**tags** | [**[WorkerTag]**](WorkerTag.md) | | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
19
addon/flamenco/manager/docs/WorkerTask.md
generated
19
addon/flamenco/manager/docs/WorkerTask.md
generated
@ -1,19 +0,0 @@
|
||||
# WorkerTask
|
||||
|
||||
Task assigned to a Worker.
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | |
|
||||
**name** | **str** | |
|
||||
**status** | [**TaskStatus**](TaskStatus.md) | |
|
||||
**priority** | **int** | |
|
||||
**task_type** | **str** | |
|
||||
**updated** | **datetime** | |
|
||||
**job_id** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
12
addon/flamenco/manager/docs/WorkerTaskAllOf.md
generated
12
addon/flamenco/manager/docs/WorkerTaskAllOf.md
generated
@ -1,12 +0,0 @@
|
||||
# WorkerTaskAllOf
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**job_id** | **str** | |
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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)
|
||||
|
||||
|
159
addon/flamenco/manager/exceptions.py
generated
159
addon/flamenco/manager/exceptions.py
generated
@ -1,159 +0,0 @@
|
||||
"""
|
||||
Flamenco manager
|
||||
|
||||
Render Farm manager API # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
|
||||
class OpenApiException(Exception):
|
||||
"""The base exception class for all OpenAPIExceptions"""
|
||||
|
||||
|
||||
class ApiTypeError(OpenApiException, TypeError):
|
||||
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
||||
key_type=None):
|
||||
""" Raises an exception for TypeErrors
|
||||
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
|
||||
Keyword Args:
|
||||
path_to_item (list): a list of keys an indices to get to the
|
||||
current_item
|
||||
None if unset
|
||||
valid_classes (tuple): the primitive classes that current item
|
||||
should be an instance of
|
||||
None if unset
|
||||
key_type (bool): False if our value is a value in a dict
|
||||
True if it is a key in a dict
|
||||
False if our item is an item in a list
|
||||
None if unset
|
||||
"""
|
||||
self.path_to_item = path_to_item
|
||||
self.valid_classes = valid_classes
|
||||
self.key_type = key_type
|
||||
full_msg = msg
|
||||
if path_to_item:
|
||||
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
||||
super(ApiTypeError, self).__init__(full_msg)
|
||||
|
||||
|
||||
class ApiValueError(OpenApiException, ValueError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
|
||||
Keyword Args:
|
||||
path_to_item (list) the path to the exception in the
|
||||
received_data dict. None if unset
|
||||
"""
|
||||
|
||||
self.path_to_item = path_to_item
|
||||
full_msg = msg
|
||||
if path_to_item:
|
||||
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
||||
super(ApiValueError, self).__init__(full_msg)
|
||||
|
||||
|
||||
class ApiAttributeError(OpenApiException, AttributeError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
"""
|
||||
Raised when an attribute reference or assignment fails.
|
||||
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
|
||||
Keyword Args:
|
||||
path_to_item (None/list) the path to the exception in the
|
||||
received_data dict
|
||||
"""
|
||||
self.path_to_item = path_to_item
|
||||
full_msg = msg
|
||||
if path_to_item:
|
||||
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
||||
super(ApiAttributeError, self).__init__(full_msg)
|
||||
|
||||
|
||||
class ApiKeyError(OpenApiException, KeyError):
|
||||
def __init__(self, msg, path_to_item=None):
|
||||
"""
|
||||
Args:
|
||||
msg (str): the exception message
|
||||
|
||||
Keyword Args:
|
||||
path_to_item (None/list) the path to the exception in the
|
||||
received_data dict
|
||||
"""
|
||||
self.path_to_item = path_to_item
|
||||
full_msg = msg
|
||||
if path_to_item:
|
||||
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
||||
super(ApiKeyError, self).__init__(full_msg)
|
||||
|
||||
|
||||
class ApiException(OpenApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
if http_resp:
|
||||
self.status = http_resp.status
|
||||
self.reason = http_resp.reason
|
||||
self.body = http_resp.data
|
||||
self.headers = http_resp.getheaders()
|
||||
else:
|
||||
self.status = status
|
||||
self.reason = reason
|
||||
self.body = None
|
||||
self.headers = None
|
||||
|
||||
def __str__(self):
|
||||
"""Custom error messages for exception"""
|
||||
error_message = "({0})\n"\
|
||||
"Reason: {1}\n".format(self.status, self.reason)
|
||||
if self.headers:
|
||||
error_message += "HTTP response headers: {0}\n".format(
|
||||
self.headers)
|
||||
|
||||
if self.body:
|
||||
error_message += "HTTP response body: {0}\n".format(self.body)
|
||||
|
||||
return error_message
|
||||
|
||||
|
||||
class NotFoundException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
super(NotFoundException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class UnauthorizedException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
super(UnauthorizedException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ForbiddenException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
super(ForbiddenException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
class ServiceException(ApiException):
|
||||
|
||||
def __init__(self, status=None, reason=None, http_resp=None):
|
||||
super(ServiceException, self).__init__(status, reason, http_resp)
|
||||
|
||||
|
||||
def render_path(path_to_item):
|
||||
"""Returns a string representation of a path"""
|
||||
result = ""
|
||||
for pth in path_to_item:
|
||||
if isinstance(pth, int):
|
||||
result += "[{0}]".format(pth)
|
||||
else:
|
||||
result += "['{0}']".format(pth)
|
||||
return result
|
5
addon/flamenco/manager/model/__init__.py
generated
5
addon/flamenco/manager/model/__init__.py
generated
@ -1,5 +0,0 @@
|
||||
# we can not import model classes here because that would create a circular
|
||||
# reference which would not work in python2
|
||||
# do not import all models into this module because that uses a lot of memory and stack frames
|
||||
# if you need the ability to import all models from one package, import them with
|
||||
# from {{packageName}.models import ModelA, ModelB
|
317
addon/flamenco/manager/model/assigned_task.py
generated
317
addon/flamenco/manager/model/assigned_task.py
generated
@ -1,317 +0,0 @@
|
||||
"""
|
||||
Flamenco manager
|
||||
|
||||
Render Farm manager API # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
|
||||
from flamenco.manager.model_utils import ( # noqa: F401
|
||||
ApiTypeError,
|
||||
ModelComposed,
|
||||
ModelNormal,
|
||||
ModelSimple,
|
||||
cached_property,
|
||||
change_keys_js_to_python,
|
||||
convert_js_args_to_python_args,
|
||||
date,
|
||||
datetime,
|
||||
file_type,
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
OpenApiModel
|
||||
)
|
||||
from flamenco.manager.exceptions import ApiAttributeError
|
||||
|
||||
|
||||
def lazy_import():
|
||||
from flamenco.manager.model.command import Command
|
||||
from flamenco.manager.model.task_status import TaskStatus
|
||||
globals()['Command'] = Command
|
||||
globals()['TaskStatus'] = TaskStatus
|
||||
|
||||
|
||||
class AssignedTask(ModelNormal):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
Attributes:
|
||||
allowed_values (dict): The key is the tuple path to the attribute
|
||||
and the for var_name this is (var_name,). The value is a dict
|
||||
with a capitalized key describing the allowed value and an allowed
|
||||
value. These dicts store the allowed enum values.
|
||||
attribute_map (dict): The key is attribute name
|
||||
and the value is json key in definition.
|
||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
||||
variable value to the discriminator class name.
|
||||
validations (dict): The key is the tuple path to the attribute
|
||||
and the for var_name this is (var_name,). The value is a dict
|
||||
that stores validations for max_length, min_length, max_items,
|
||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
||||
inclusive_minimum, and regex.
|
||||
additional_properties_type (tuple): A tuple of classes accepted
|
||||
as additional properties values.
|
||||
"""
|
||||
|
||||
allowed_values = {
|
||||
}
|
||||
|
||||
validations = {
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
lazy_import()
|
||||
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'uuid': (str,), # noqa: E501
|
||||
'job': (str,), # noqa: E501
|
||||
'name': (str,), # noqa: E501
|
||||
'status': (TaskStatus,), # noqa: E501
|
||||
'priority': (int,), # noqa: E501
|
||||
'job_priority': (int,), # noqa: E501
|
||||
'job_type': (str,), # noqa: E501
|
||||
'task_type': (str,), # noqa: E501
|
||||
'commands': ([Command],), # noqa: E501
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'uuid': 'uuid', # noqa: E501
|
||||
'job': 'job', # noqa: E501
|
||||
'name': 'name', # noqa: E501
|
||||
'status': 'status', # noqa: E501
|
||||
'priority': 'priority', # noqa: E501
|
||||
'job_priority': 'job_priority', # noqa: E501
|
||||
'job_type': 'job_type', # noqa: E501
|
||||
'task_type': 'task_type', # noqa: E501
|
||||
'commands': 'commands', # noqa: E501
|
||||
}
|
||||
|
||||
read_only_vars = {
|
||||
}
|
||||
|
||||
_composed_schemas = {}
|
||||
|
||||
@classmethod
|
||||
@convert_js_args_to_python_args
|
||||
def _from_openapi_data(cls, uuid, job, name, status, priority, job_priority, job_type, task_type, commands, *args, **kwargs): # noqa: E501
|
||||
"""AssignedTask - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
uuid (str):
|
||||
job (str):
|
||||
name (str):
|
||||
status (TaskStatus):
|
||||
priority (int):
|
||||
job_priority (int):
|
||||
job_type (str):
|
||||
task_type (str):
|
||||
commands ([Command]):
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
will be type checked and a TypeError will be
|
||||
raised if the wrong type is input.
|
||||
Defaults to True
|
||||
_path_to_item (tuple/list): This is a list of keys or values to
|
||||
drill down to the model in received_data
|
||||
when deserializing a response
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_configuration (Configuration): the instance to use when
|
||||
deserializing a file_type parameter.
|
||||
If passed, type conversion is attempted
|
||||
If omitted no type conversion is done.
|
||||
_visited_composed_classes (tuple): This stores a tuple of
|
||||
classes that we have traveled through so that
|
||||
if we see that class again we will not use its
|
||||
discriminator again.
|
||||
When traveling through a discriminator, the
|
||||
composed schema that is
|
||||
is traveled through is added to this set.
|
||||
For example if Animal has a discriminator
|
||||
petType and we pass in "Dog", and the class Dog
|
||||
allOf includes Animal, we move through Animal
|
||||
once using the discriminator, and pick Dog.
|
||||
Then in Dog, we will make an instance of the
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
"""
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||
_configuration = kwargs.pop('_configuration', None)
|
||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||
|
||||
self = super(OpenApiModel, cls).__new__(cls)
|
||||
|
||||
if args:
|
||||
raise ApiTypeError(
|
||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||
args,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
self._data_store = {}
|
||||
self._check_type = _check_type
|
||||
self._spec_property_naming = _spec_property_naming
|
||||
self._path_to_item = _path_to_item
|
||||
self._configuration = _configuration
|
||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||
|
||||
self.uuid = uuid
|
||||
self.job = job
|
||||
self.name = name
|
||||
self.status = status
|
||||
self.priority = priority
|
||||
self.job_priority = job_priority
|
||||
self.job_type = job_type
|
||||
self.task_type = task_type
|
||||
self.commands = commands
|
||||
for var_name, var_value in kwargs.items():
|
||||
if var_name not in self.attribute_map and \
|
||||
self._configuration is not None and \
|
||||
self._configuration.discard_unknown_keys and \
|
||||
self.additional_properties_type is None:
|
||||
# discard variable.
|
||||
continue
|
||||
setattr(self, var_name, var_value)
|
||||
return self
|
||||
|
||||
required_properties = set([
|
||||
'_data_store',
|
||||
'_check_type',
|
||||
'_spec_property_naming',
|
||||
'_path_to_item',
|
||||
'_configuration',
|
||||
'_visited_composed_classes',
|
||||
])
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, uuid, job, name, status, priority, job_priority, job_type, task_type, commands, *args, **kwargs): # noqa: E501
|
||||
"""AssignedTask - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
uuid (str):
|
||||
job (str):
|
||||
name (str):
|
||||
status (TaskStatus):
|
||||
priority (int):
|
||||
job_priority (int):
|
||||
job_type (str):
|
||||
task_type (str):
|
||||
commands ([Command]):
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
will be type checked and a TypeError will be
|
||||
raised if the wrong type is input.
|
||||
Defaults to True
|
||||
_path_to_item (tuple/list): This is a list of keys or values to
|
||||
drill down to the model in received_data
|
||||
when deserializing a response
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_configuration (Configuration): the instance to use when
|
||||
deserializing a file_type parameter.
|
||||
If passed, type conversion is attempted
|
||||
If omitted no type conversion is done.
|
||||
_visited_composed_classes (tuple): This stores a tuple of
|
||||
classes that we have traveled through so that
|
||||
if we see that class again we will not use its
|
||||
discriminator again.
|
||||
When traveling through a discriminator, the
|
||||
composed schema that is
|
||||
is traveled through is added to this set.
|
||||
For example if Animal has a discriminator
|
||||
petType and we pass in "Dog", and the class Dog
|
||||
allOf includes Animal, we move through Animal
|
||||
once using the discriminator, and pick Dog.
|
||||
Then in Dog, we will make an instance of the
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
"""
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||
_configuration = kwargs.pop('_configuration', None)
|
||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||
|
||||
if args:
|
||||
raise ApiTypeError(
|
||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||
args,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
self._data_store = {}
|
||||
self._check_type = _check_type
|
||||
self._spec_property_naming = _spec_property_naming
|
||||
self._path_to_item = _path_to_item
|
||||
self._configuration = _configuration
|
||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||
|
||||
self.uuid = uuid
|
||||
self.job = job
|
||||
self.name = name
|
||||
self.status = status
|
||||
self.priority = priority
|
||||
self.job_priority = job_priority
|
||||
self.job_type = job_type
|
||||
self.task_type = task_type
|
||||
self.commands = commands
|
||||
for var_name, var_value in kwargs.items():
|
||||
if var_name not in self.attribute_map and \
|
||||
self._configuration is not None and \
|
||||
self._configuration.discard_unknown_keys and \
|
||||
self.additional_properties_type is None:
|
||||
# discard variable.
|
||||
continue
|
||||
setattr(self, var_name, var_value)
|
||||
if var_name in self.read_only_vars:
|
||||
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
||||
f"class with read only attributes.")
|
313
addon/flamenco/manager/model/available_job_setting.py
generated
313
addon/flamenco/manager/model/available_job_setting.py
generated
@ -1,313 +0,0 @@
|
||||
"""
|
||||
Flamenco manager
|
||||
|
||||
Render Farm manager API # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
|
||||
from flamenco.manager.model_utils import ( # noqa: F401
|
||||
ApiTypeError,
|
||||
ModelComposed,
|
||||
ModelNormal,
|
||||
ModelSimple,
|
||||
cached_property,
|
||||
change_keys_js_to_python,
|
||||
convert_js_args_to_python_args,
|
||||
date,
|
||||
datetime,
|
||||
file_type,
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
OpenApiModel
|
||||
)
|
||||
from flamenco.manager.exceptions import ApiAttributeError
|
||||
|
||||
|
||||
def lazy_import():
|
||||
from flamenco.manager.model.available_job_setting_subtype import AvailableJobSettingSubtype
|
||||
from flamenco.manager.model.available_job_setting_type import AvailableJobSettingType
|
||||
from flamenco.manager.model.available_job_setting_visibility import AvailableJobSettingVisibility
|
||||
globals()['AvailableJobSettingSubtype'] = AvailableJobSettingSubtype
|
||||
globals()['AvailableJobSettingType'] = AvailableJobSettingType
|
||||
globals()['AvailableJobSettingVisibility'] = AvailableJobSettingVisibility
|
||||
|
||||
|
||||
class AvailableJobSetting(ModelNormal):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
Attributes:
|
||||
allowed_values (dict): The key is the tuple path to the attribute
|
||||
and the for var_name this is (var_name,). The value is a dict
|
||||
with a capitalized key describing the allowed value and an allowed
|
||||
value. These dicts store the allowed enum values.
|
||||
attribute_map (dict): The key is attribute name
|
||||
and the value is json key in definition.
|
||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
||||
variable value to the discriminator class name.
|
||||
validations (dict): The key is the tuple path to the attribute
|
||||
and the for var_name this is (var_name,). The value is a dict
|
||||
that stores validations for max_length, min_length, max_items,
|
||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
||||
inclusive_minimum, and regex.
|
||||
additional_properties_type (tuple): A tuple of classes accepted
|
||||
as additional properties values.
|
||||
"""
|
||||
|
||||
allowed_values = {
|
||||
}
|
||||
|
||||
validations = {
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
lazy_import()
|
||||
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'key': (str,), # noqa: E501
|
||||
'type': (AvailableJobSettingType,), # noqa: E501
|
||||
'subtype': (AvailableJobSettingSubtype,), # noqa: E501
|
||||
'choices': ([str],), # noqa: E501
|
||||
'propargs': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
|
||||
'description': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
|
||||
'default': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
|
||||
'eval': (str,), # noqa: E501
|
||||
'visible': (AvailableJobSettingVisibility,), # noqa: E501
|
||||
'required': (bool,), # noqa: E501
|
||||
'editable': (bool,), # noqa: E501
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'key': 'key', # noqa: E501
|
||||
'type': 'type', # noqa: E501
|
||||
'subtype': 'subtype', # noqa: E501
|
||||
'choices': 'choices', # noqa: E501
|
||||
'propargs': 'propargs', # noqa: E501
|
||||
'description': 'description', # noqa: E501
|
||||
'default': 'default', # noqa: E501
|
||||
'eval': 'eval', # noqa: E501
|
||||
'visible': 'visible', # noqa: E501
|
||||
'required': 'required', # noqa: E501
|
||||
'editable': 'editable', # noqa: E501
|
||||
}
|
||||
|
||||
read_only_vars = {
|
||||
}
|
||||
|
||||
_composed_schemas = {}
|
||||
|
||||
@classmethod
|
||||
@convert_js_args_to_python_args
|
||||
def _from_openapi_data(cls, key, type, *args, **kwargs): # noqa: E501
|
||||
"""AvailableJobSetting - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
key (str): Identifier for the setting, must be unique within the job type.
|
||||
type (AvailableJobSettingType):
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
will be type checked and a TypeError will be
|
||||
raised if the wrong type is input.
|
||||
Defaults to True
|
||||
_path_to_item (tuple/list): This is a list of keys or values to
|
||||
drill down to the model in received_data
|
||||
when deserializing a response
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_configuration (Configuration): the instance to use when
|
||||
deserializing a file_type parameter.
|
||||
If passed, type conversion is attempted
|
||||
If omitted no type conversion is done.
|
||||
_visited_composed_classes (tuple): This stores a tuple of
|
||||
classes that we have traveled through so that
|
||||
if we see that class again we will not use its
|
||||
discriminator again.
|
||||
When traveling through a discriminator, the
|
||||
composed schema that is
|
||||
is traveled through is added to this set.
|
||||
For example if Animal has a discriminator
|
||||
petType and we pass in "Dog", and the class Dog
|
||||
allOf includes Animal, we move through Animal
|
||||
once using the discriminator, and pick Dog.
|
||||
Then in Dog, we will make an instance of the
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
subtype (AvailableJobSettingSubtype): [optional] # noqa: E501
|
||||
choices ([str]): When given, limit the valid values to these choices. Only usable with string type.. [optional] # noqa: E501
|
||||
propargs ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Any extra arguments to the bpy.props.SomeProperty() call used to create this property.. [optional] # noqa: E501
|
||||
description (bool, date, datetime, dict, float, int, list, str, none_type): The description/tooltip shown in the user interface.. [optional] # noqa: E501
|
||||
default (bool, date, datetime, dict, float, int, list, str, none_type): The default value shown to the user when determining this setting.. [optional] # noqa: E501
|
||||
eval (str): Python expression to be evaluated in order to determine the default value for this setting.. [optional] # noqa: E501
|
||||
visible (AvailableJobSettingVisibility): [optional] # noqa: E501
|
||||
required (bool): Whether to immediately reject a job definition, of this type, without this particular setting. . [optional] if omitted the server will use the default value of False # noqa: E501
|
||||
editable (bool): Whether to allow editing this setting after the job has been submitted. Would imply deleting all existing tasks for this job, and recompiling it. . [optional] if omitted the server will use the default value of False # noqa: E501
|
||||
"""
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||
_configuration = kwargs.pop('_configuration', None)
|
||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||
|
||||
self = super(OpenApiModel, cls).__new__(cls)
|
||||
|
||||
if args:
|
||||
raise ApiTypeError(
|
||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||
args,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
self._data_store = {}
|
||||
self._check_type = _check_type
|
||||
self._spec_property_naming = _spec_property_naming
|
||||
self._path_to_item = _path_to_item
|
||||
self._configuration = _configuration
|
||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||
|
||||
self.key = key
|
||||
self.type = type
|
||||
for var_name, var_value in kwargs.items():
|
||||
if var_name not in self.attribute_map and \
|
||||
self._configuration is not None and \
|
||||
self._configuration.discard_unknown_keys and \
|
||||
self.additional_properties_type is None:
|
||||
# discard variable.
|
||||
continue
|
||||
setattr(self, var_name, var_value)
|
||||
return self
|
||||
|
||||
required_properties = set([
|
||||
'_data_store',
|
||||
'_check_type',
|
||||
'_spec_property_naming',
|
||||
'_path_to_item',
|
||||
'_configuration',
|
||||
'_visited_composed_classes',
|
||||
])
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, key, type, *args, **kwargs): # noqa: E501
|
||||
"""AvailableJobSetting - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
key (str): Identifier for the setting, must be unique within the job type.
|
||||
type (AvailableJobSettingType):
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
will be type checked and a TypeError will be
|
||||
raised if the wrong type is input.
|
||||
Defaults to True
|
||||
_path_to_item (tuple/list): This is a list of keys or values to
|
||||
drill down to the model in received_data
|
||||
when deserializing a response
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_configuration (Configuration): the instance to use when
|
||||
deserializing a file_type parameter.
|
||||
If passed, type conversion is attempted
|
||||
If omitted no type conversion is done.
|
||||
_visited_composed_classes (tuple): This stores a tuple of
|
||||
classes that we have traveled through so that
|
||||
if we see that class again we will not use its
|
||||
discriminator again.
|
||||
When traveling through a discriminator, the
|
||||
composed schema that is
|
||||
is traveled through is added to this set.
|
||||
For example if Animal has a discriminator
|
||||
petType and we pass in "Dog", and the class Dog
|
||||
allOf includes Animal, we move through Animal
|
||||
once using the discriminator, and pick Dog.
|
||||
Then in Dog, we will make an instance of the
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
subtype (AvailableJobSettingSubtype): [optional] # noqa: E501
|
||||
choices ([str]): When given, limit the valid values to these choices. Only usable with string type.. [optional] # noqa: E501
|
||||
propargs ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Any extra arguments to the bpy.props.SomeProperty() call used to create this property.. [optional] # noqa: E501
|
||||
description (bool, date, datetime, dict, float, int, list, str, none_type): The description/tooltip shown in the user interface.. [optional] # noqa: E501
|
||||
default (bool, date, datetime, dict, float, int, list, str, none_type): The default value shown to the user when determining this setting.. [optional] # noqa: E501
|
||||
eval (str): Python expression to be evaluated in order to determine the default value for this setting.. [optional] # noqa: E501
|
||||
visible (AvailableJobSettingVisibility): [optional] # noqa: E501
|
||||
required (bool): Whether to immediately reject a job definition, of this type, without this particular setting. . [optional] if omitted the server will use the default value of False # noqa: E501
|
||||
editable (bool): Whether to allow editing this setting after the job has been submitted. Would imply deleting all existing tasks for this job, and recompiling it. . [optional] if omitted the server will use the default value of False # noqa: E501
|
||||
"""
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||
_configuration = kwargs.pop('_configuration', None)
|
||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||
|
||||
if args:
|
||||
raise ApiTypeError(
|
||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||
args,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
self._data_store = {}
|
||||
self._check_type = _check_type
|
||||
self._spec_property_naming = _spec_property_naming
|
||||
self._path_to_item = _path_to_item
|
||||
self._configuration = _configuration
|
||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||
|
||||
self.key = key
|
||||
self.type = type
|
||||
for var_name, var_value in kwargs.items():
|
||||
if var_name not in self.attribute_map and \
|
||||
self._configuration is not None and \
|
||||
self._configuration.discard_unknown_keys and \
|
||||
self.additional_properties_type is None:
|
||||
# discard variable.
|
||||
continue
|
||||
setattr(self, var_name, var_value)
|
||||
if var_name in self.read_only_vars:
|
||||
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
||||
f"class with read only attributes.")
|
@ -1,284 +0,0 @@
|
||||
"""
|
||||
Flamenco manager
|
||||
|
||||
Render Farm manager API # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
|
||||
from flamenco.manager.model_utils import ( # noqa: F401
|
||||
ApiTypeError,
|
||||
ModelComposed,
|
||||
ModelNormal,
|
||||
ModelSimple,
|
||||
cached_property,
|
||||
change_keys_js_to_python,
|
||||
convert_js_args_to_python_args,
|
||||
date,
|
||||
datetime,
|
||||
file_type,
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
OpenApiModel
|
||||
)
|
||||
from flamenco.manager.exceptions import ApiAttributeError
|
||||
|
||||
|
||||
|
||||
class AvailableJobSettingSubtype(ModelSimple):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
Attributes:
|
||||
allowed_values (dict): The key is the tuple path to the attribute
|
||||
and the for var_name this is (var_name,). The value is a dict
|
||||
with a capitalized key describing the allowed value and an allowed
|
||||
value. These dicts store the allowed enum values.
|
||||
validations (dict): The key is the tuple path to the attribute
|
||||
and the for var_name this is (var_name,). The value is a dict
|
||||
that stores validations for max_length, min_length, max_items,
|
||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
||||
inclusive_minimum, and regex.
|
||||
additional_properties_type (tuple): A tuple of classes accepted
|
||||
as additional properties values.
|
||||
"""
|
||||
|
||||
allowed_values = {
|
||||
('value',): {
|
||||
'FILE_PATH': "file_path",
|
||||
'DIR_PATH': "dir_path",
|
||||
'FILE_NAME': "file_name",
|
||||
'HASHED_FILE_PATH': "hashed_file_path",
|
||||
},
|
||||
}
|
||||
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = None
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
return {
|
||||
'value': (str,),
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {}
|
||||
|
||||
read_only_vars = set()
|
||||
|
||||
_composed_schemas = None
|
||||
|
||||
required_properties = set([
|
||||
'_data_store',
|
||||
'_check_type',
|
||||
'_spec_property_naming',
|
||||
'_path_to_item',
|
||||
'_configuration',
|
||||
'_visited_composed_classes',
|
||||
])
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""AvailableJobSettingSubtype - a model defined in OpenAPI
|
||||
|
||||
Note that value can be passed either in args or in kwargs, but not in both.
|
||||
|
||||
Args:
|
||||
args[0] (str): Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `\"/######\"` appended. ., must be one of ["file_path", "dir_path", "file_name", "hashed_file_path", ] # noqa: E501
|
||||
|
||||
Keyword Args:
|
||||
value (str): Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `\"/######\"` appended. ., must be one of ["file_path", "dir_path", "file_name", "hashed_file_path", ] # noqa: E501
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
will be type checked and a TypeError will be
|
||||
raised if the wrong type is input.
|
||||
Defaults to True
|
||||
_path_to_item (tuple/list): This is a list of keys or values to
|
||||
drill down to the model in received_data
|
||||
when deserializing a response
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_configuration (Configuration): the instance to use when
|
||||
deserializing a file_type parameter.
|
||||
If passed, type conversion is attempted
|
||||
If omitted no type conversion is done.
|
||||
_visited_composed_classes (tuple): This stores a tuple of
|
||||
classes that we have traveled through so that
|
||||
if we see that class again we will not use its
|
||||
discriminator again.
|
||||
When traveling through a discriminator, the
|
||||
composed schema that is
|
||||
is traveled through is added to this set.
|
||||
For example if Animal has a discriminator
|
||||
petType and we pass in "Dog", and the class Dog
|
||||
allOf includes Animal, we move through Animal
|
||||
once using the discriminator, and pick Dog.
|
||||
Then in Dog, we will make an instance of the
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
"""
|
||||
# required up here when default value is not given
|
||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||
|
||||
if 'value' in kwargs:
|
||||
value = kwargs.pop('value')
|
||||
elif args:
|
||||
args = list(args)
|
||||
value = args.pop(0)
|
||||
else:
|
||||
raise ApiTypeError(
|
||||
"value is required, but not passed in args or kwargs and doesn't have default",
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||
_configuration = kwargs.pop('_configuration', None)
|
||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||
|
||||
if args:
|
||||
raise ApiTypeError(
|
||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||
args,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
self._data_store = {}
|
||||
self._check_type = _check_type
|
||||
self._spec_property_naming = _spec_property_naming
|
||||
self._path_to_item = _path_to_item
|
||||
self._configuration = _configuration
|
||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||
self.value = value
|
||||
if kwargs:
|
||||
raise ApiTypeError(
|
||||
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
|
||||
kwargs,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@convert_js_args_to_python_args
|
||||
def _from_openapi_data(cls, *args, **kwargs):
|
||||
"""AvailableJobSettingSubtype - a model defined in OpenAPI
|
||||
|
||||
Note that value can be passed either in args or in kwargs, but not in both.
|
||||
|
||||
Args:
|
||||
args[0] (str): Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `\"/######\"` appended. ., must be one of ["file_path", "dir_path", "file_name", "hashed_file_path", ] # noqa: E501
|
||||
|
||||
Keyword Args:
|
||||
value (str): Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `\"/######\"` appended. ., must be one of ["file_path", "dir_path", "file_name", "hashed_file_path", ] # noqa: E501
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
will be type checked and a TypeError will be
|
||||
raised if the wrong type is input.
|
||||
Defaults to True
|
||||
_path_to_item (tuple/list): This is a list of keys or values to
|
||||
drill down to the model in received_data
|
||||
when deserializing a response
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_configuration (Configuration): the instance to use when
|
||||
deserializing a file_type parameter.
|
||||
If passed, type conversion is attempted
|
||||
If omitted no type conversion is done.
|
||||
_visited_composed_classes (tuple): This stores a tuple of
|
||||
classes that we have traveled through so that
|
||||
if we see that class again we will not use its
|
||||
discriminator again.
|
||||
When traveling through a discriminator, the
|
||||
composed schema that is
|
||||
is traveled through is added to this set.
|
||||
For example if Animal has a discriminator
|
||||
petType and we pass in "Dog", and the class Dog
|
||||
allOf includes Animal, we move through Animal
|
||||
once using the discriminator, and pick Dog.
|
||||
Then in Dog, we will make an instance of the
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
"""
|
||||
# required up here when default value is not given
|
||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||
|
||||
self = super(OpenApiModel, cls).__new__(cls)
|
||||
|
||||
if 'value' in kwargs:
|
||||
value = kwargs.pop('value')
|
||||
elif args:
|
||||
args = list(args)
|
||||
value = args.pop(0)
|
||||
else:
|
||||
raise ApiTypeError(
|
||||
"value is required, but not passed in args or kwargs and doesn't have default",
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||
_configuration = kwargs.pop('_configuration', None)
|
||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||
|
||||
if args:
|
||||
raise ApiTypeError(
|
||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||
args,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
self._data_store = {}
|
||||
self._check_type = _check_type
|
||||
self._spec_property_naming = _spec_property_naming
|
||||
self._path_to_item = _path_to_item
|
||||
self._configuration = _configuration
|
||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||
self.value = value
|
||||
if kwargs:
|
||||
raise ApiTypeError(
|
||||
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
|
||||
kwargs,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
return self
|
@ -1,284 +0,0 @@
|
||||
"""
|
||||
Flamenco manager
|
||||
|
||||
Render Farm manager API # noqa: E501
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
|
||||
from flamenco.manager.model_utils import ( # noqa: F401
|
||||
ApiTypeError,
|
||||
ModelComposed,
|
||||
ModelNormal,
|
||||
ModelSimple,
|
||||
cached_property,
|
||||
change_keys_js_to_python,
|
||||
convert_js_args_to_python_args,
|
||||
date,
|
||||
datetime,
|
||||
file_type,
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
OpenApiModel
|
||||
)
|
||||
from flamenco.manager.exceptions import ApiAttributeError
|
||||
|
||||
|
||||
|
||||
class AvailableJobSettingType(ModelSimple):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
Attributes:
|
||||
allowed_values (dict): The key is the tuple path to the attribute
|
||||
and the for var_name this is (var_name,). The value is a dict
|
||||
with a capitalized key describing the allowed value and an allowed
|
||||
value. These dicts store the allowed enum values.
|
||||
validations (dict): The key is the tuple path to the attribute
|
||||
and the for var_name this is (var_name,). The value is a dict
|
||||
that stores validations for max_length, min_length, max_items,
|
||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
||||
inclusive_minimum, and regex.
|
||||
additional_properties_type (tuple): A tuple of classes accepted
|
||||
as additional properties values.
|
||||
"""
|
||||
|
||||
allowed_values = {
|
||||
('value',): {
|
||||
'STRING': "string",
|
||||
'INT32': "int32",
|
||||
'FLOAT': "float",
|
||||
'BOOL': "bool",
|
||||
},
|
||||
}
|
||||
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = None
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
return {
|
||||
'value': (str,),
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {}
|
||||
|
||||
read_only_vars = set()
|
||||
|
||||
_composed_schemas = None
|
||||
|
||||
required_properties = set([
|
||||
'_data_store',
|
||||
'_check_type',
|
||||
'_spec_property_naming',
|
||||
'_path_to_item',
|
||||
'_configuration',
|
||||
'_visited_composed_classes',
|
||||
])
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""AvailableJobSettingType - a model defined in OpenAPI
|
||||
|
||||
Note that value can be passed either in args or in kwargs, but not in both.
|
||||
|
||||
Args:
|
||||
args[0] (str): Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported. ., must be one of ["string", "int32", "float", "bool", ] # noqa: E501
|
||||
|
||||
Keyword Args:
|
||||
value (str): Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported. ., must be one of ["string", "int32", "float", "bool", ] # noqa: E501
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
will be type checked and a TypeError will be
|
||||
raised if the wrong type is input.
|
||||
Defaults to True
|
||||
_path_to_item (tuple/list): This is a list of keys or values to
|
||||
drill down to the model in received_data
|
||||
when deserializing a response
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_configuration (Configuration): the instance to use when
|
||||
deserializing a file_type parameter.
|
||||
If passed, type conversion is attempted
|
||||
If omitted no type conversion is done.
|
||||
_visited_composed_classes (tuple): This stores a tuple of
|
||||
classes that we have traveled through so that
|
||||
if we see that class again we will not use its
|
||||
discriminator again.
|
||||
When traveling through a discriminator, the
|
||||
composed schema that is
|
||||
is traveled through is added to this set.
|
||||
For example if Animal has a discriminator
|
||||
petType and we pass in "Dog", and the class Dog
|
||||
allOf includes Animal, we move through Animal
|
||||
once using the discriminator, and pick Dog.
|
||||
Then in Dog, we will make an instance of the
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
"""
|
||||
# required up here when default value is not given
|
||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||
|
||||
if 'value' in kwargs:
|
||||
value = kwargs.pop('value')
|
||||
elif args:
|
||||
args = list(args)
|
||||
value = args.pop(0)
|
||||
else:
|
||||
raise ApiTypeError(
|
||||
"value is required, but not passed in args or kwargs and doesn't have default",
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||
_configuration = kwargs.pop('_configuration', None)
|
||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||
|
||||
if args:
|
||||
raise ApiTypeError(
|
||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||
args,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
self._data_store = {}
|
||||
self._check_type = _check_type
|
||||
self._spec_property_naming = _spec_property_naming
|
||||
self._path_to_item = _path_to_item
|
||||
self._configuration = _configuration
|
||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||
self.value = value
|
||||
if kwargs:
|
||||
raise ApiTypeError(
|
||||
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
|
||||
kwargs,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@convert_js_args_to_python_args
|
||||
def _from_openapi_data(cls, *args, **kwargs):
|
||||
"""AvailableJobSettingType - a model defined in OpenAPI
|
||||
|
||||
Note that value can be passed either in args or in kwargs, but not in both.
|
||||
|
||||
Args:
|
||||
args[0] (str): Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported. ., must be one of ["string", "int32", "float", "bool", ] # noqa: E501
|
||||
|
||||
Keyword Args:
|
||||
value (str): Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported. ., must be one of ["string", "int32", "float", "bool", ] # noqa: E501
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
will be type checked and a TypeError will be
|
||||
raised if the wrong type is input.
|
||||
Defaults to True
|
||||
_path_to_item (tuple/list): This is a list of keys or values to
|
||||
drill down to the model in received_data
|
||||
when deserializing a response
|
||||
_spec_property_naming (bool): True if the variable names in the input data
|
||||
are serialized names, as specified in the OpenAPI document.
|
||||
False if the variable names in the input data
|
||||
are pythonic names, e.g. snake case (default)
|
||||
_configuration (Configuration): the instance to use when
|
||||
deserializing a file_type parameter.
|
||||
If passed, type conversion is attempted
|
||||
If omitted no type conversion is done.
|
||||
_visited_composed_classes (tuple): This stores a tuple of
|
||||
classes that we have traveled through so that
|
||||
if we see that class again we will not use its
|
||||
discriminator again.
|
||||
When traveling through a discriminator, the
|
||||
composed schema that is
|
||||
is traveled through is added to this set.
|
||||
For example if Animal has a discriminator
|
||||
petType and we pass in "Dog", and the class Dog
|
||||
allOf includes Animal, we move through Animal
|
||||
once using the discriminator, and pick Dog.
|
||||
Then in Dog, we will make an instance of the
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
"""
|
||||
# required up here when default value is not given
|
||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
||||
|
||||
self = super(OpenApiModel, cls).__new__(cls)
|
||||
|
||||
if 'value' in kwargs:
|
||||
value = kwargs.pop('value')
|
||||
elif args:
|
||||
args = list(args)
|
||||
value = args.pop(0)
|
||||
else:
|
||||
raise ApiTypeError(
|
||||
"value is required, but not passed in args or kwargs and doesn't have default",
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
||||
_configuration = kwargs.pop('_configuration', None)
|
||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
||||
|
||||
if args:
|
||||
raise ApiTypeError(
|
||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
||||
args,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
self._data_store = {}
|
||||
self._check_type = _check_type
|
||||
self._spec_property_naming = _spec_property_naming
|
||||
self._path_to_item = _path_to_item
|
||||
self._configuration = _configuration
|
||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
||||
self.value = value
|
||||
if kwargs:
|
||||
raise ApiTypeError(
|
||||
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
|
||||
kwargs,
|
||||
self.__class__.__name__,
|
||||
),
|
||||
path_to_item=_path_to_item,
|
||||
valid_classes=(self.__class__,),
|
||||
)
|
||||
|
||||
return self
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user