From ae2cb281b4ef205a3dfeac2922f5fa0f887f7406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 8 Jul 2022 11:34:06 +0200 Subject: [PATCH] OAPI: regenerate code --- addon/flamenco/manager/__init__.py | 2 +- addon/flamenco/manager/api/meta_api.py | 138 ++++++++ addon/flamenco/manager/api_client.py | 2 +- addon/flamenco/manager/configuration.py | 2 +- .../flamenco/manager/docs/ManagerVariable.md | 13 + .../manager/docs/ManagerVariableAudience.md | 11 + .../flamenco/manager/docs/ManagerVariables.md | 12 + addon/flamenco/manager/docs/MetaApi.md | 69 ++++ .../manager/model/manager_variable.py | 267 ++++++++++++++++ .../model/manager_variable_audience.py | 282 +++++++++++++++++ .../manager/model/manager_variables.py | 257 +++++++++++++++ addon/flamenco/manager/models/__init__.py | 3 + addon/flamenco/manager_README.md | 6 +- internal/worker/mocks/client.gen.go | 20 ++ pkg/api/openapi_client.gen.go | 116 +++++++ pkg/api/openapi_server.gen.go | 28 ++ pkg/api/openapi_spec.gen.go | 299 +++++++++--------- pkg/api/openapi_types.gen.go | 75 +++++ web/app/src/manager-api/ApiClient.js | 2 +- web/app/src/manager-api/index.js | 14 + web/app/src/manager-api/manager/MetaApi.js | 55 ++++ .../src/manager-api/model/ManagerVariable.js | 84 +++++ .../model/ManagerVariableAudience.js | 46 +++ 23 files changed, 1651 insertions(+), 152 deletions(-) create mode 100644 addon/flamenco/manager/docs/ManagerVariable.md create mode 100644 addon/flamenco/manager/docs/ManagerVariableAudience.md create mode 100644 addon/flamenco/manager/docs/ManagerVariables.md create mode 100644 addon/flamenco/manager/model/manager_variable.py create mode 100644 addon/flamenco/manager/model/manager_variable_audience.py create mode 100644 addon/flamenco/manager/model/manager_variables.py create mode 100644 web/app/src/manager-api/model/ManagerVariable.js create mode 100644 web/app/src/manager-api/model/ManagerVariableAudience.js diff --git a/addon/flamenco/manager/__init__.py b/addon/flamenco/manager/__init__.py index bc213cc4..d7fd3978 100644 --- a/addon/flamenco/manager/__init__.py +++ b/addon/flamenco/manager/__init__.py @@ -10,7 +10,7 @@ """ -__version__ = "b34fee51" +__version__ = "fd807980" # import ApiClient from flamenco.manager.api_client import ApiClient diff --git a/addon/flamenco/manager/api/meta_api.py b/addon/flamenco/manager/api/meta_api.py index aa42eb5a..7e241b5b 100644 --- a/addon/flamenco/manager/api/meta_api.py +++ b/addon/flamenco/manager/api/meta_api.py @@ -23,6 +23,8 @@ from flamenco.manager.model_utils import ( # noqa: F401 ) from flamenco.manager.model.flamenco_version import FlamencoVersion from flamenco.manager.model.manager_configuration import ManagerConfiguration +from flamenco.manager.model.manager_variable_audience import ManagerVariableAudience +from flamenco.manager.model.manager_variables import ManagerVariables class MetaApi(object): @@ -78,6 +80,61 @@ class MetaApi(object): }, api_client=api_client ) + self.get_variables_endpoint = _Endpoint( + settings={ + 'response_type': (ManagerVariables,), + 'auth': [], + 'endpoint_path': '/api/v3/configuration/variables/{audience}/{platform}', + 'operation_id': 'get_variables', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'audience', + 'platform', + ], + 'required': [ + 'audience', + 'platform', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'audience': + (ManagerVariableAudience,), + 'platform': + (str,), + }, + 'attribute_map': { + 'audience': 'audience', + 'platform': 'platform', + }, + 'location_map': { + 'audience': 'path', + 'platform': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) self.get_version_endpoint = _Endpoint( settings={ 'response_type': (FlamencoVersion,), @@ -193,6 +250,87 @@ class MetaApi(object): kwargs['_host_index'] = kwargs.get('_host_index') return self.get_configuration_endpoint.call_with_http_info(**kwargs) + def get_variables( + self, + audience, + platform, + **kwargs + ): + """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. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_variables(audience, platform, async_req=True) + >>> result = thread.get() + + Args: + audience (ManagerVariableAudience): + platform (str): + + 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: + ManagerVariables + 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['audience'] = \ + audience + kwargs['platform'] = \ + platform + return self.get_variables_endpoint.call_with_http_info(**kwargs) + def get_version( self, **kwargs diff --git a/addon/flamenco/manager/api_client.py b/addon/flamenco/manager/api_client.py index 2bf32ab1..eee5720f 100644 --- a/addon/flamenco/manager/api_client.py +++ b/addon/flamenco/manager/api_client.py @@ -76,7 +76,7 @@ class ApiClient(object): self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Flamenco/b34fee51 (Blender add-on)' + self.user_agent = 'Flamenco/fd807980 (Blender add-on)' def __enter__(self): return self diff --git a/addon/flamenco/manager/configuration.py b/addon/flamenco/manager/configuration.py index 89ffdd54..04fca0e2 100644 --- a/addon/flamenco/manager/configuration.py +++ b/addon/flamenco/manager/configuration.py @@ -404,7 +404,7 @@ conf = flamenco.manager.Configuration( "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: b34fee51".\ + "SDK Package Version: fd807980".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/addon/flamenco/manager/docs/ManagerVariable.md b/addon/flamenco/manager/docs/ManagerVariable.md new file mode 100644 index 00000000..8d6292e2 --- /dev/null +++ b/addon/flamenco/manager/docs/ManagerVariable.md @@ -0,0 +1,13 @@ +# 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) + + diff --git a/addon/flamenco/manager/docs/ManagerVariableAudience.md b/addon/flamenco/manager/docs/ManagerVariableAudience.md new file mode 100644 index 00000000..24476419 --- /dev/null +++ b/addon/flamenco/manager/docs/ManagerVariableAudience.md @@ -0,0 +1,11 @@ +# 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) + + diff --git a/addon/flamenco/manager/docs/ManagerVariables.md b/addon/flamenco/manager/docs/ManagerVariables.md new file mode 100644 index 00000000..24866693 --- /dev/null +++ b/addon/flamenco/manager/docs/ManagerVariables.md @@ -0,0 +1,12 @@ +# 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) + + diff --git a/addon/flamenco/manager/docs/MetaApi.md b/addon/flamenco/manager/docs/MetaApi.md index d1bbcca6..88a75d46 100644 --- a/addon/flamenco/manager/docs/MetaApi.md +++ b/addon/flamenco/manager/docs/MetaApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_configuration**](MetaApi.md#get_configuration) | **GET** /api/v3/configuration | Get the configuration of this Manager. +[**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 @@ -69,6 +70,74 @@ No authorization required [[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() diff --git a/addon/flamenco/manager/model/manager_variable.py b/addon/flamenco/manager/model/manager_variable.py new file mode 100644 index 00000000..02bf6dbe --- /dev/null +++ b/addon/flamenco/manager/model/manager_variable.py @@ -0,0 +1,267 @@ +""" + 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 ManagerVariable(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 + """ + 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. + """ + return { + 'value': (str,), # noqa: E501 + 'is_twoway': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'value': 'value', # noqa: E501 + 'is_twoway': 'is_twoway', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, value, is_twoway, *args, **kwargs): # noqa: E501 + """ManagerVariable - a model defined in OpenAPI + + Args: + 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}`. + + 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.value = value + self.is_twoway = is_twoway + 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, value, is_twoway, *args, **kwargs): # noqa: E501 + """ManagerVariable - a model defined in OpenAPI + + Args: + 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}`. + + 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.value = value + self.is_twoway = is_twoway + 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.") diff --git a/addon/flamenco/manager/model/manager_variable_audience.py b/addon/flamenco/manager/model/manager_variable_audience.py new file mode 100644 index 00000000..1fe6ace4 --- /dev/null +++ b/addon/flamenco/manager/model/manager_variable_audience.py @@ -0,0 +1,282 @@ +""" + 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 ManagerVariableAudience(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',): { + 'WORKERS': "workers", + 'USERS': "users", + }, + } + + 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): + """ManagerVariableAudience - 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):, must be one of ["workers", "users", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["workers", "users", ] # 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): + """ManagerVariableAudience - 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):, must be one of ["workers", "users", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["workers", "users", ] # 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 diff --git a/addon/flamenco/manager/model/manager_variables.py b/addon/flamenco/manager/model/manager_variables.py new file mode 100644 index 00000000..44d885c8 --- /dev/null +++ b/addon/flamenco/manager/model/manager_variables.py @@ -0,0 +1,257 @@ +""" + 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.manager_variable import ManagerVariable + globals()['ManagerVariable'] = ManagerVariable + + +class ManagerVariables(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 (ManagerVariable,) # 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 { + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ManagerVariables - a model defined in OpenAPI + + 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__,) + + 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, *args, **kwargs): # noqa: E501 + """ManagerVariables - a model defined in OpenAPI + + 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__,) + + 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.") diff --git a/addon/flamenco/manager/models/__init__.py b/addon/flamenco/manager/models/__init__.py index 01cfbb55..90826beb 100644 --- a/addon/flamenco/manager/models/__init__.py +++ b/addon/flamenco/manager/models/__init__.py @@ -32,6 +32,9 @@ from flamenco.manager.model.job_tasks_summary import JobTasksSummary from flamenco.manager.model.jobs_query import JobsQuery from flamenco.manager.model.jobs_query_result import JobsQueryResult from flamenco.manager.model.manager_configuration import ManagerConfiguration +from flamenco.manager.model.manager_variable import ManagerVariable +from flamenco.manager.model.manager_variable_audience import ManagerVariableAudience +from flamenco.manager.model.manager_variables import ManagerVariables from flamenco.manager.model.may_keep_running import MayKeepRunning from flamenco.manager.model.registered_worker import RegisteredWorker from flamenco.manager.model.security_error import SecurityError diff --git a/addon/flamenco/manager_README.md b/addon/flamenco/manager_README.md index 536df9d5..adf5ff7a 100644 --- a/addon/flamenco/manager_README.md +++ b/addon/flamenco/manager_README.md @@ -4,7 +4,7 @@ Render Farm manager API The `flamenco.manager` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: b34fee51 +- Package version: fd807980 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://flamenco.io/](https://flamenco.io/) @@ -87,6 +87,7 @@ Class | Method | HTTP request | Description *JobsApi* | [**set_task_status**](flamenco/manager/docs/JobsApi.md#set_task_status) | **POST** /api/v3/tasks/{task_id}/setstatus | *JobsApi* | [**submit_job**](flamenco/manager/docs/JobsApi.md#submit_job) | **POST** /api/v3/jobs | Submit a new job for Flamenco Manager to execute. *MetaApi* | [**get_configuration**](flamenco/manager/docs/MetaApi.md#get_configuration) | **GET** /api/v3/configuration | Get the configuration of this Manager. +*MetaApi* | [**get_variables**](flamenco/manager/docs/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. *MetaApi* | [**get_version**](flamenco/manager/docs/MetaApi.md#get_version) | **GET** /api/v3/version | Get the Flamenco version of this Manager *ShamanApi* | [**shaman_checkout**](flamenco/manager/docs/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. *ShamanApi* | [**shaman_checkout_requirements**](flamenco/manager/docs/ShamanApi.md#shaman_checkout_requirements) | **POST** /api/v3/shaman/checkout/requirements | Checks a Shaman Requirements file, and reports which files are unknown. @@ -131,6 +132,9 @@ Class | Method | HTTP request | Description - [JobsQuery](flamenco/manager/docs/JobsQuery.md) - [JobsQueryResult](flamenco/manager/docs/JobsQueryResult.md) - [ManagerConfiguration](flamenco/manager/docs/ManagerConfiguration.md) + - [ManagerVariable](flamenco/manager/docs/ManagerVariable.md) + - [ManagerVariableAudience](flamenco/manager/docs/ManagerVariableAudience.md) + - [ManagerVariables](flamenco/manager/docs/ManagerVariables.md) - [MayKeepRunning](flamenco/manager/docs/MayKeepRunning.md) - [RegisteredWorker](flamenco/manager/docs/RegisteredWorker.md) - [SecurityError](flamenco/manager/docs/SecurityError.md) diff --git a/internal/worker/mocks/client.gen.go b/internal/worker/mocks/client.gen.go index 176c91bc..7451ab3d 100644 --- a/internal/worker/mocks/client.gen.go +++ b/internal/worker/mocks/client.gen.go @@ -276,6 +276,26 @@ func (mr *MockFlamencoClientMockRecorder) GetJobTypesWithResponse(arg0 interface return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJobTypesWithResponse", reflect.TypeOf((*MockFlamencoClient)(nil).GetJobTypesWithResponse), varargs...) } +// GetVariablesWithResponse mocks base method. +func (m *MockFlamencoClient) GetVariablesWithResponse(arg0 context.Context, arg1 api.ManagerVariableAudience, arg2 string, arg3 ...api.RequestEditorFn) (*api.GetVariablesResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetVariablesWithResponse", varargs...) + ret0, _ := ret[0].(*api.GetVariablesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetVariablesWithResponse indicates an expected call of GetVariablesWithResponse. +func (mr *MockFlamencoClientMockRecorder) GetVariablesWithResponse(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVariablesWithResponse", reflect.TypeOf((*MockFlamencoClient)(nil).GetVariablesWithResponse), varargs...) +} + // GetVersionWithResponse mocks base method. func (m *MockFlamencoClient) GetVersionWithResponse(arg0 context.Context, arg1 ...api.RequestEditorFn) (*api.GetVersionResponse, error) { m.ctrl.T.Helper() diff --git a/pkg/api/openapi_client.gen.go b/pkg/api/openapi_client.gen.go index 5392d7b8..baabc736 100644 --- a/pkg/api/openapi_client.gen.go +++ b/pkg/api/openapi_client.gen.go @@ -93,6 +93,9 @@ type ClientInterface interface { // GetConfiguration request GetConfiguration(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetVariables request + GetVariables(ctx context.Context, audience ManagerVariableAudience, platform string, reqEditors ...RequestEditorFn) (*http.Response, error) + // SubmitJob request with any body SubmitJobWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -223,6 +226,18 @@ func (c *Client) GetConfiguration(ctx context.Context, reqEditors ...RequestEdit return c.Client.Do(req) } +func (c *Client) GetVariables(ctx context.Context, audience ManagerVariableAudience, platform string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVariablesRequest(c.Server, audience, platform) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) SubmitJobWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewSubmitJobRequestWithBody(c.Server, contentType, body) if err != nil { @@ -766,6 +781,47 @@ func NewGetConfigurationRequest(server string) (*http.Request, error) { return req, nil } +// NewGetVariablesRequest generates requests for GetVariables +func NewGetVariablesRequest(server string, audience ManagerVariableAudience, platform string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "audience", runtime.ParamLocationPath, audience) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "platform", runtime.ParamLocationPath, platform) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/v3/configuration/variables/%s/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewSubmitJobRequest calls the generic SubmitJob builder with application/json body func NewSubmitJobRequest(server string, body SubmitJobJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -1964,6 +2020,9 @@ type ClientWithResponsesInterface interface { // GetConfiguration request GetConfigurationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetConfigurationResponse, error) + // GetVariables request + GetVariablesWithResponse(ctx context.Context, audience ManagerVariableAudience, platform string, reqEditors ...RequestEditorFn) (*GetVariablesResponse, error) + // SubmitJob request with any body SubmitJobWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SubmitJobResponse, error) @@ -2104,6 +2163,28 @@ func (r GetConfigurationResponse) StatusCode() int { return 0 } +type GetVariablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ManagerVariables +} + +// Status returns HTTPResponse.Status +func (r GetVariablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVariablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type SubmitJobResponse struct { Body []byte HTTPResponse *http.Response @@ -2815,6 +2896,15 @@ func (c *ClientWithResponses) GetConfigurationWithResponse(ctx context.Context, return ParseGetConfigurationResponse(rsp) } +// GetVariablesWithResponse request returning *GetVariablesResponse +func (c *ClientWithResponses) GetVariablesWithResponse(ctx context.Context, audience ManagerVariableAudience, platform string, reqEditors ...RequestEditorFn) (*GetVariablesResponse, error) { + rsp, err := c.GetVariables(ctx, audience, platform, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVariablesResponse(rsp) +} + // SubmitJobWithBodyWithResponse request with arbitrary body returning *SubmitJobResponse func (c *ClientWithResponses) SubmitJobWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SubmitJobResponse, error) { rsp, err := c.SubmitJobWithBody(ctx, contentType, body, reqEditors...) @@ -3216,6 +3306,32 @@ func ParseGetConfigurationResponse(rsp *http.Response) (*GetConfigurationRespons return response, nil } +// ParseGetVariablesResponse parses an HTTP response from a GetVariablesWithResponse call +func ParseGetVariablesResponse(rsp *http.Response) (*GetVariablesResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVariablesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ManagerVariables + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + // ParseSubmitJobResponse parses an HTTP response from a SubmitJobWithResponse call func ParseSubmitJobResponse(rsp *http.Response) (*SubmitJobResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) diff --git a/pkg/api/openapi_server.gen.go b/pkg/api/openapi_server.gen.go index 1618a903..2d56323f 100644 --- a/pkg/api/openapi_server.gen.go +++ b/pkg/api/openapi_server.gen.go @@ -16,6 +16,9 @@ type ServerInterface interface { // Get the configuration of this Manager. // (GET /api/v3/configuration) GetConfiguration(ctx echo.Context) error + // 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 /api/v3/configuration/variables/{audience}/{platform}) + GetVariables(ctx echo.Context, audience ManagerVariableAudience, platform string) error // Submit a new job for Flamenco Manager to execute. // (POST /api/v3/jobs) SubmitJob(ctx echo.Context) error @@ -126,6 +129,30 @@ func (w *ServerInterfaceWrapper) GetConfiguration(ctx echo.Context) error { return err } +// GetVariables converts echo context to params. +func (w *ServerInterfaceWrapper) GetVariables(ctx echo.Context) error { + var err error + // ------------- Path parameter "audience" ------------- + var audience ManagerVariableAudience + + err = runtime.BindStyledParameterWithLocation("simple", false, "audience", runtime.ParamLocationPath, ctx.Param("audience"), &audience) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter audience: %s", err)) + } + + // ------------- Path parameter "platform" ------------- + var platform string + + err = runtime.BindStyledParameterWithLocation("simple", false, "platform", runtime.ParamLocationPath, ctx.Param("platform"), &platform) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter platform: %s", err)) + } + + // Invoke the callback with all the unmarshalled arguments + err = w.Handler.GetVariables(ctx, audience, platform) + return err +} + // SubmitJob converts echo context to params. func (w *ServerInterfaceWrapper) SubmitJob(ctx echo.Context) error { var err error @@ -620,6 +647,7 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL } router.GET(baseURL+"/api/v3/configuration", wrapper.GetConfiguration) + router.GET(baseURL+"/api/v3/configuration/variables/:audience/:platform", wrapper.GetVariables) router.POST(baseURL+"/api/v3/jobs", wrapper.SubmitJob) router.GET(baseURL+"/api/v3/jobs/last-rendered", wrapper.FetchGlobalLastRenderedInfo) router.POST(baseURL+"/api/v3/jobs/query", wrapper.QueryJobs) diff --git a/pkg/api/openapi_spec.gen.go b/pkg/api/openapi_spec.gen.go index 1a8d48b6..b54db85f 100644 --- a/pkg/api/openapi_spec.gen.go +++ b/pkg/api/openapi_spec.gen.go @@ -18,153 +18,158 @@ import ( // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+R97XIbt7Lgq6B4typJLUXqy3as82d9/JEjHzv2WvLJVh27JHCmScIaAgyAEc24VHUf", - "Yt9k91btj72/9gVy32gL3cAMhoMhKdmyldz8cCTNDNBoNPq7G596mZrNlQRpTe/oU89kU5hx/PGRMWIi", - "IT/l5sL9noPJtJhboWTvqPGUCcM4s+4nbpiw7ncNGYhLyNloyewU2C9KX4Ae9Pq9uVZz0FYAzpKp2YzL", - "HH8WFmb4w3/RMO4d9f5lWAM39JANH9MHvat+zy7n0Dvqca350v3+QY3c1/7PxmohJ/7vZ3MtlBZ2Gb0g", - "pIUJ6PAG/TXxueSz9IP1YxrLbblxOQ5/J/SmWxE3F92AlKXI3YOx0jNue0f0h/7qi1f9noZfS6Eh7x39", - "M7zkkOPXUsEWLWEFSxFKYqj69X69r+ZVow+QWQfgo0suCj4q4LkanYC1DpwW5ZwIOSmAGXrO1Jhx9lyN", - "mBvNJAhkqkRGPzbH+WUKkk3EJcg+K8RMWKSzS16I3P1bgmFWub8ZYH6QAXsliyUrjYORLYSdMkIaTu7m", - "rkiwhfxVYsthzMvCtuE6nQLzDwkOZqZqIT0wrDSg2cLBnoMFPRMS558KE1AyoOGjMdNTVH8ZWqUKK+Z+", - "IiHriRw96jHPAAeFXFi3dBrRwz/mhYF+G7l2CtoBzYtCLZj7dBVQxsfWvT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Y7QwEBrwdj/p20Pt/NGB/NNn2vT+OvTtPAUIGQubgUeckpqsAW", - "OMsEJGjyAyk243IZBvHZz3PNMysyXnQmz14fid21CtcN3H9G3D4RrffVClE9Q3MP1521OPjcdej8litd", - "b3kiSlxlK7mD5+wZD2k6H20rR1C/Z6flbCQxdrlxo9Jx9FSmWh2Xp5+qSdZhyrGe7iqFE5AYuK24EB0K", - "40yt86GJvj1ncInGH6Z+W+VTPoN0jt50Dx0yPWUP2OMwJmWqTsDGz8nkR1erOyfhPITfCzVBq3LJJIBP", - "q5sXIhO2WIZpR0Cs0mC4LxN22a8W4qxXSmAN77oxlKTU0u+tQngaU48DyXxQox9QZ3Svu1e+Mw4ehk5j", - "R/spfqvmG4VNYmteBdfxtsntqUFCzmNwWHYzfUoms6qJlSErZf0HpygNNouGFUJV83U58OuXHlkLFRgY", - "4K5/SxoKXahIBGq4ZRfC7ej4WjioYv5F8VyNMNeoKMjTbKrCLUchhZrQw/hYr4X6lJuLF2rSxcVO/SFg", - "2bSUF15zsIrx+sxqpWYsBxJwOT30yZQOJDyt/FKJ3H2c06Kb0idFx24l7QQ1B0RFRB60AXvJl1Uq5aws", - "rJhjfqIEcgDCR5vMEQi8bC2pnpJP/HpUWHNJt4x1lOiG30ZtO0VMduttiIyW4uYTCm6mucUZiNfO99sO", - "bf3rSLXNKqCPX3yuDtgsuLzJN19TtalEsw/1rE1MXEOJxE62oUV6cx01+tBroMcbmAU+5rcFBTksnhmA", - "hHrhmGBIkhYmQOW0LPd+SIyPKgC2y3XdTIiLAP3nkmIrmvgZX51lVebVth834rS3SdjXyMPeQOthnCSp", - "xynXyeKaOnhXl6g6+RXyy1ecNdtkOX1+LqF/cPD7/2T/8a+//9vv//77//793/7jX3//P7//++//KzZh", - "0DaNk378LGfZLO8d9T75X68wPFTKizPy1xy4NVln+p3xMhcqpAWNRQE+zDgkq2VoxsMPamQo3LW3fzDA", - "IeNNfv3zT+7Xuekd7R/2e2PNZ+7E9/Z29nZ7/R4aP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wpfGpFz5OvIT8+PLHng1451", + "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", + "VBsdc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oTQPm2JpEL0QShMJmU08DYXvuF6rD0SJlgyRU5U+HFwHQoCrSkKI", + "u6P27nZZ2xsqcjYDpdF2a+0xeRoSXzFN/fXPPyKef3r9w4/EkZIZtCwo56FL9NYKT7hiWY3x3gtYerbE", + "pC3399yeWO7v1SDEqLz03Ny2tR0PIidU97bqRhy30z7QU0oQB5jY0M1h/0lMvJsUdbRfK5DMkF/dUnDY", + "at4zalRcq8SgT14fN5saxi4ysVhU3N0owvQ80fq1Fc1NTOCo4WWAiTx5fTzsbwVqm7yZZZizIkXhIepM", + "hnHHRJWGzXwNs6CcqNN2HQaxTNb8bm/lt2WD8Rwu0/b6/fX/DwAA//9in5sSR7IAAA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/pkg/api/openapi_types.gen.go b/pkg/api/openapi_types.gen.go index 22551bec..7d370919 100644 --- a/pkg/api/openapi_types.gen.go +++ b/pkg/api/openapi_types.gen.go @@ -73,6 +73,13 @@ const ( JobStatusUnderConstruction JobStatus = "under-construction" ) +// Defines values for ManagerVariableAudience. +const ( + ManagerVariableAudienceUsers ManagerVariableAudience = "users" + + ManagerVariableAudienceWorkers ManagerVariableAudience = "workers" +) + // Defines values for ShamanFileStatus. const ( ShamanFileStatusStored ShamanFileStatus = "stored" @@ -323,6 +330,21 @@ type ManagerConfiguration struct { StorageLocation string `json:"storageLocation"` } +// ManagerVariable defines model for ManagerVariable. +type ManagerVariable struct { + // 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}`. + IsTwoway bool `json:"is_twoway"` + Value string `json:"value"` +} + +// ManagerVariableAudience defines model for ManagerVariableAudience. +type ManagerVariableAudience string + +// Mapping from variable name to its properties. +type ManagerVariables struct { + AdditionalProperties map[string]ManagerVariable `json:"-"` +} + // Indicates whether the worker may keep running the task. type MayKeepRunning struct { MayKeepRunning bool `json:"mayKeepRunning"` @@ -928,3 +950,56 @@ func (a JobsQuery_Settings) MarshalJSON() ([]byte, error) { } return json.Marshal(object) } + +// Getter for additional properties for ManagerVariables. Returns the specified +// element and whether it was found +func (a ManagerVariables) Get(fieldName string) (value ManagerVariable, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ManagerVariables +func (a *ManagerVariables) Set(fieldName string, value ManagerVariable) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]ManagerVariable) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ManagerVariables to handle AdditionalProperties +func (a *ManagerVariables) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]ManagerVariable) + for fieldName, fieldBuf := range object { + var fieldVal ManagerVariable + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ManagerVariables to handle AdditionalProperties +func (a ManagerVariables) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} diff --git a/web/app/src/manager-api/ApiClient.js b/web/app/src/manager-api/ApiClient.js index b7b6afec..23c557d7 100644 --- a/web/app/src/manager-api/ApiClient.js +++ b/web/app/src/manager-api/ApiClient.js @@ -55,7 +55,7 @@ class ApiClient { * @default {} */ this.defaultHeaders = { - 'User-Agent': 'Flamenco/b34fee51 / webbrowser' + 'User-Agent': 'Flamenco/fd807980 / webbrowser' }; /** diff --git a/web/app/src/manager-api/index.js b/web/app/src/manager-api/index.js index 1a4610e5..bb527b94 100644 --- a/web/app/src/manager-api/index.js +++ b/web/app/src/manager-api/index.js @@ -33,6 +33,8 @@ import JobTasksSummary from './model/JobTasksSummary'; import JobsQuery from './model/JobsQuery'; import JobsQueryResult from './model/JobsQueryResult'; import ManagerConfiguration from './model/ManagerConfiguration'; +import ManagerVariable from './model/ManagerVariable'; +import ManagerVariableAudience from './model/ManagerVariableAudience'; import MayKeepRunning from './model/MayKeepRunning'; import RegisteredWorker from './model/RegisteredWorker'; import SecurityError from './model/SecurityError'; @@ -234,6 +236,18 @@ export { */ ManagerConfiguration, + /** + * The ManagerVariable model constructor. + * @property {module:model/ManagerVariable} + */ + ManagerVariable, + + /** + * The ManagerVariableAudience model constructor. + * @property {module:model/ManagerVariableAudience} + */ + ManagerVariableAudience, + /** * The MayKeepRunning model constructor. * @property {module:model/MayKeepRunning} diff --git a/web/app/src/manager-api/manager/MetaApi.js b/web/app/src/manager-api/manager/MetaApi.js index 0dc0587e..95e06c51 100644 --- a/web/app/src/manager-api/manager/MetaApi.js +++ b/web/app/src/manager-api/manager/MetaApi.js @@ -15,6 +15,8 @@ import ApiClient from "../ApiClient"; import FlamencoVersion from '../model/FlamencoVersion'; import ManagerConfiguration from '../model/ManagerConfiguration'; +import ManagerVariable from '../model/ManagerVariable'; +import ManagerVariableAudience from '../model/ManagerVariableAudience'; /** * Meta service. @@ -75,6 +77,59 @@ export default class MetaApi { } + /** + * 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. + * @param {module:model/ManagerVariableAudience} audience + * @param {String} platform + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object.} and HTTP response + */ + getVariablesWithHttpInfo(audience, platform) { + let postBody = null; + // verify the required parameter 'audience' is set + if (audience === undefined || audience === null) { + throw new Error("Missing the required parameter 'audience' when calling getVariables"); + } + // verify the required parameter 'platform' is set + if (platform === undefined || platform === null) { + throw new Error("Missing the required parameter 'platform' when calling getVariables"); + } + + let pathParams = { + 'audience': audience, + 'platform': platform + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = {'String': ManagerVariable}; + return this.apiClient.callApi( + '/api/v3/configuration/variables/{audience}/{platform}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * 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. + * @param {module:model/ManagerVariableAudience} audience + * @param {String} platform + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object.} + */ + getVariables(audience, platform) { + return this.getVariablesWithHttpInfo(audience, platform) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + /** * Get the Flamenco version of this Manager * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FlamencoVersion} and HTTP response diff --git a/web/app/src/manager-api/model/ManagerVariable.js b/web/app/src/manager-api/model/ManagerVariable.js new file mode 100644 index 00000000..6a9b88d2 --- /dev/null +++ b/web/app/src/manager-api/model/ManagerVariable.js @@ -0,0 +1,84 @@ +/** + * Flamenco manager + * Render Farm manager API + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ManagerVariable model module. + * @module model/ManagerVariable + * @version 0.0.0 + */ +class ManagerVariable { + /** + * Constructs a new ManagerVariable. + * @alias module:model/ManagerVariable + * @param value {String} + * @param isTwoway {Boolean} 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}`. + */ + constructor(value, isTwoway) { + + ManagerVariable.initialize(this, value, isTwoway); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, value, isTwoway) { + obj['value'] = value; + obj['is_twoway'] = isTwoway; + } + + /** + * Constructs a ManagerVariable from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ManagerVariable} obj Optional instance to populate. + * @return {module:model/ManagerVariable} The populated ManagerVariable instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ManagerVariable(); + + if (data.hasOwnProperty('value')) { + obj['value'] = ApiClient.convertToType(data['value'], 'String'); + } + if (data.hasOwnProperty('is_twoway')) { + obj['is_twoway'] = ApiClient.convertToType(data['is_twoway'], 'Boolean'); + } + } + return obj; + } + + +} + +/** + * @member {String} value + */ +ManagerVariable.prototype['value'] = undefined; + +/** + * 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}`. + * @member {Boolean} is_twoway + */ +ManagerVariable.prototype['is_twoway'] = undefined; + + + + + + +export default ManagerVariable; + diff --git a/web/app/src/manager-api/model/ManagerVariableAudience.js b/web/app/src/manager-api/model/ManagerVariableAudience.js new file mode 100644 index 00000000..e69ee4d6 --- /dev/null +++ b/web/app/src/manager-api/model/ManagerVariableAudience.js @@ -0,0 +1,46 @@ +/** + * Flamenco manager + * Render Farm manager API + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +/** +* Enum class ManagerVariableAudience. +* @enum {} +* @readonly +*/ +export default class ManagerVariableAudience { + + /** + * value: "workers" + * @const + */ + "workers" = "workers"; + + + /** + * value: "users" + * @const + */ + "users" = "users"; + + + + /** + * Returns a ManagerVariableAudience enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/ManagerVariableAudience} The enum ManagerVariableAudience value. + */ + static constructFromObject(object) { + return object; + } +} +