2025-12-01

This commit is contained in:
2026-03-17 14:58:51 -06:00
parent 183e865f8b
commit 4b82b57113
6846 changed files with 954887 additions and 162606 deletions
@@ -98,6 +98,8 @@ class AssignedTask(ModelNormal):
'job_type': (str,), # noqa: E501
'task_type': (str,), # noqa: E501
'commands': ([Command],), # noqa: E501
'steps_completed': (int,), # noqa: E501
'steps_total': (int,), # noqa: E501
}
@cached_property
@@ -115,6 +117,8 @@ class AssignedTask(ModelNormal):
'job_type': 'job_type', # noqa: E501
'task_type': 'task_type', # noqa: E501
'commands': 'commands', # noqa: E501
'steps_completed': 'steps_completed', # noqa: E501
'steps_total': 'steps_total', # noqa: E501
}
read_only_vars = {
@@ -124,7 +128,7 @@ class AssignedTask(ModelNormal):
@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
def _from_openapi_data(cls, uuid, job, name, status, priority, job_priority, job_type, task_type, commands, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""AssignedTask - a model defined in OpenAPI
Args:
@@ -137,6 +141,8 @@ class AssignedTask(ModelNormal):
job_type (str):
task_type (str):
commands ([Command]):
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -205,6 +211,8 @@ class AssignedTask(ModelNormal):
self.job_type = job_type
self.task_type = task_type
self.commands = commands
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -225,7 +233,7 @@ class AssignedTask(ModelNormal):
])
@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
def __init__(self, uuid, job, name, status, priority, job_priority, job_type, task_type, commands, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""AssignedTask - a model defined in OpenAPI
Args:
@@ -238,6 +246,8 @@ class AssignedTask(ModelNormal):
job_type (str):
task_type (str):
commands ([Command]):
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -304,6 +314,8 @@ class AssignedTask(ModelNormal):
self.job_type = job_type
self.task_type = task_type
self.commands = commands
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -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 AssignedWorker(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 {
'name': (str,), # noqa: E501
'uuid': (str,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'name': 'name', # noqa: E501
'uuid': 'uuid', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, name, uuid, *args, **kwargs): # noqa: E501
"""AssignedWorker - a model defined in OpenAPI
Args:
name (str):
uuid (str):
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.name = name
self.uuid = uuid
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, name, uuid, *args, **kwargs): # noqa: E501
"""AssignedWorker - a model defined in OpenAPI
Args:
name (str):
uuid (str):
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.name = name
self.uuid = uuid
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.")
@@ -83,6 +83,7 @@ class Command(ModelNormal):
return {
'name': (str,), # noqa: E501
'parameters': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
'total_step_count': (int,), # noqa: E501
}
@cached_property
@@ -93,6 +94,7 @@ class Command(ModelNormal):
attribute_map = {
'name': 'name', # noqa: E501
'parameters': 'parameters', # noqa: E501
'total_step_count': 'total_step_count', # noqa: E501
}
read_only_vars = {
@@ -102,12 +104,13 @@ class Command(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, name, parameters, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, name, parameters, total_step_count, *args, **kwargs): # noqa: E501
"""Command - a model defined in OpenAPI
Args:
name (str):
parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}):
total_step_count (int): Number of steps this command executes. This has to be implemented in the command's implementation on the Worker (to recognise what a \"step\" is), as well as given in the authoring code of the job type JavaScript script (to indicate how many steps the command invocation will perform). If not given, or set to 0, the command is not expected to send any step progress. In this case, the Worker will send a step update at completion of the command.
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -169,6 +172,7 @@ class Command(ModelNormal):
self.name = name
self.parameters = parameters
self.total_step_count = total_step_count
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -189,12 +193,13 @@ class Command(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, name, parameters, *args, **kwargs): # noqa: E501
def __init__(self, name, parameters, total_step_count, *args, **kwargs): # noqa: E501
"""Command - a model defined in OpenAPI
Args:
name (str):
parameters ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}):
total_step_count (int): Number of steps this command executes. This has to be implemented in the command's implementation on the Worker (to recognise what a \"step\" is), as well as given in the authoring code of the job type JavaScript script (to indicate how many steps the command invocation will perform). If not given, or set to 0, the command is not expected to send any step progress. In this case, the Worker will send a step update at completion of the command.
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -254,6 +259,7 @@ class Command(ModelNormal):
self.name = name
self.parameters = parameters
self.total_step_count = total_step_count
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -93,6 +93,8 @@ class EventJobUpdate(ModelNormal):
'type': (str,), # noqa: E501
'priority': (int,), # noqa: E501
'refresh_tasks': (bool,), # noqa: E501
'steps_completed': (int,), # noqa: E501
'steps_total': (int,), # noqa: E501
'name': (str,), # noqa: E501
'previous_status': (JobStatus,), # noqa: E501
'delete_requested_at': (datetime,), # noqa: E501
@@ -111,6 +113,8 @@ class EventJobUpdate(ModelNormal):
'type': 'type', # noqa: E501
'priority': 'priority', # noqa: E501
'refresh_tasks': 'refresh_tasks', # noqa: E501
'steps_completed': 'steps_completed', # noqa: E501
'steps_total': 'steps_total', # noqa: E501
'name': 'name', # noqa: E501
'previous_status': 'previous_status', # noqa: E501
'delete_requested_at': 'delete_requested_at', # noqa: E501
@@ -124,7 +128,7 @@ class EventJobUpdate(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, id, updated, status, type, refresh_tasks, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, id, updated, status, type, refresh_tasks, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""EventJobUpdate - a model defined in OpenAPI
Args:
@@ -133,6 +137,8 @@ class EventJobUpdate(ModelNormal):
status (JobStatus):
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.
steps_completed (int):
steps_total (int):
Keyword Args:
priority (int): defaults to 50 # noqa: E501
@@ -204,6 +210,8 @@ class EventJobUpdate(ModelNormal):
self.type = type
self.priority = priority
self.refresh_tasks = refresh_tasks
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -224,7 +232,7 @@ class EventJobUpdate(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, id, updated, status, type, refresh_tasks, *args, **kwargs): # noqa: E501
def __init__(self, id, updated, status, type, refresh_tasks, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""EventJobUpdate - a model defined in OpenAPI
Args:
@@ -233,6 +241,8 @@ class EventJobUpdate(ModelNormal):
status (JobStatus):
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.
steps_completed (int):
steps_total (int):
Keyword Args:
priority (int): defaults to 50 # noqa: E501
@@ -302,6 +312,8 @@ class EventJobUpdate(ModelNormal):
self.type = type
self.priority = priority
self.refresh_tasks = refresh_tasks
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -30,7 +30,9 @@ from flamenco.manager.exceptions import ApiAttributeError
def lazy_import():
from flamenco.manager.model.assigned_worker import AssignedWorker
from flamenco.manager.model.task_status import TaskStatus
globals()['AssignedWorker'] = AssignedWorker
globals()['TaskStatus'] = TaskStatus
@@ -93,6 +95,9 @@ class EventTaskUpdate(ModelNormal):
'updated': (datetime,), # noqa: E501
'status': (TaskStatus,), # noqa: E501
'activity': (str,), # noqa: E501
'steps_completed': (int,), # noqa: E501
'steps_total': (int,), # noqa: E501
'worker': (AssignedWorker,), # noqa: E501
'previous_status': (TaskStatus,), # noqa: E501
}
@@ -108,6 +113,9 @@ class EventTaskUpdate(ModelNormal):
'updated': 'updated', # noqa: E501
'status': 'status', # noqa: E501
'activity': 'activity', # noqa: E501
'steps_completed': 'steps_completed', # noqa: E501
'steps_total': 'steps_total', # noqa: E501
'worker': 'worker', # noqa: E501
'previous_status': 'previous_status', # noqa: E501
}
@@ -118,7 +126,7 @@ class EventTaskUpdate(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, id, job_id, name, updated, status, activity, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, id, job_id, name, updated, status, activity, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""EventTaskUpdate - a model defined in OpenAPI
Args:
@@ -128,6 +136,8 @@ class EventTaskUpdate(ModelNormal):
updated (datetime): Timestamp of last update
status (TaskStatus):
activity (str):
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -160,6 +170,7 @@ class EventTaskUpdate(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
worker (AssignedWorker): [optional] # noqa: E501
previous_status (TaskStatus): [optional] # noqa: E501
"""
@@ -194,6 +205,8 @@ class EventTaskUpdate(ModelNormal):
self.updated = updated
self.status = status
self.activity = activity
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -214,7 +227,7 @@ class EventTaskUpdate(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, id, job_id, name, updated, status, activity, *args, **kwargs): # noqa: E501
def __init__(self, id, job_id, name, updated, status, activity, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""EventTaskUpdate - a model defined in OpenAPI
Args:
@@ -224,6 +237,8 @@ class EventTaskUpdate(ModelNormal):
updated (datetime): Timestamp of last update
status (TaskStatus):
activity (str):
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -256,6 +271,7 @@ class EventTaskUpdate(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
worker (AssignedWorker): [optional] # noqa: E501
previous_status (TaskStatus): [optional] # noqa: E501
"""
@@ -288,6 +304,8 @@ class EventTaskUpdate(ModelNormal):
self.updated = updated
self.status = status
self.activity = activity
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
+12 -4
View File
@@ -106,6 +106,8 @@ class Job(ModelComposed):
'updated': (datetime,), # noqa: E501
'status': (JobStatus,), # noqa: E501
'activity': (str,), # noqa: E501
'steps_completed': (int,), # noqa: E501
'steps_total': (int,), # noqa: E501
'type_etag': (str,), # noqa: E501
'settings': (JobSettings,), # noqa: E501
'metadata': (JobMetadata,), # noqa: E501
@@ -130,6 +132,8 @@ class Job(ModelComposed):
'updated': 'updated', # noqa: E501
'status': 'status', # noqa: E501
'activity': 'activity', # noqa: E501
'steps_completed': 'steps_completed', # noqa: E501
'steps_total': 'steps_total', # noqa: E501
'type_etag': 'type_etag', # noqa: E501
'settings': 'settings', # noqa: E501
'metadata': 'metadata', # noqa: E501
@@ -157,6 +161,8 @@ class Job(ModelComposed):
updated (datetime): Timestamp of last update.
status (JobStatus):
activity (str): Description of the last activity on this job.
steps_completed (int):
steps_total (int):
_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.
@@ -187,11 +193,11 @@ class Job(ModelComposed):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
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] # noqa: E501
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 omitted, the check is bypassed. . [optional] # noqa: E501
settings (JobSettings): [optional] # noqa: E501
metadata (JobMetadata): [optional] # noqa: E501
storage (JobStorageInfo): [optional] # noqa: E501
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] # noqa: E501
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 omitted, all workers can work on this job. . [optional] # noqa: E501
initial_status (JobStatus): [optional] # noqa: E501
delete_requested_at (datetime): If job deletion was requested, this is the timestamp at which that request was stored on Flamenco Manager. . [optional] # noqa: E501
"""
@@ -273,6 +279,8 @@ class Job(ModelComposed):
updated (datetime): Timestamp of last update.
status (JobStatus):
activity (str): Description of the last activity on this job.
steps_completed (int):
steps_total (int):
_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.
@@ -303,11 +311,11 @@ class Job(ModelComposed):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
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] # noqa: E501
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 omitted, the check is bypassed. . [optional] # noqa: E501
settings (JobSettings): [optional] # noqa: E501
metadata (JobMetadata): [optional] # noqa: E501
storage (JobStorageInfo): [optional] # noqa: E501
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] # noqa: E501
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 omitted, all workers can work on this job. . [optional] # noqa: E501
initial_status (JobStatus): [optional] # noqa: E501
delete_requested_at (datetime): If job deletion was requested, this is the timestamp at which that request was stored on Flamenco Manager. . [optional] # noqa: E501
"""
@@ -92,6 +92,8 @@ class JobAllOf(ModelNormal):
'updated': (datetime,), # noqa: E501
'status': (JobStatus,), # noqa: E501
'activity': (str,), # noqa: E501
'steps_completed': (int,), # noqa: E501
'steps_total': (int,), # noqa: E501
'delete_requested_at': (datetime,), # noqa: E501
}
@@ -106,6 +108,8 @@ class JobAllOf(ModelNormal):
'updated': 'updated', # noqa: E501
'status': 'status', # noqa: E501
'activity': 'activity', # noqa: E501
'steps_completed': 'steps_completed', # noqa: E501
'steps_total': 'steps_total', # noqa: E501
'delete_requested_at': 'delete_requested_at', # noqa: E501
}
@@ -116,7 +120,7 @@ class JobAllOf(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, id, created, updated, status, activity, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, id, created, updated, status, activity, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""JobAllOf - a model defined in OpenAPI
Args:
@@ -125,6 +129,8 @@ class JobAllOf(ModelNormal):
updated (datetime): Timestamp of last update.
status (JobStatus):
activity (str): Description of the last activity on this job.
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -190,6 +196,8 @@ class JobAllOf(ModelNormal):
self.updated = updated
self.status = status
self.activity = activity
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -210,7 +218,7 @@ class JobAllOf(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, id, created, updated, status, activity, *args, **kwargs): # noqa: E501
def __init__(self, id, created, updated, status, activity, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""JobAllOf - a model defined in OpenAPI
Args:
@@ -219,6 +227,8 @@ class JobAllOf(ModelNormal):
updated (datetime): Timestamp of last update.
status (JobStatus):
activity (str): Description of the last activity on this job.
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -282,6 +292,8 @@ class JobAllOf(ModelNormal):
self.updated = updated
self.status = status
self.activity = activity
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -0,0 +1,259 @@
"""
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 JobTagChange(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 {
'id': (str,), # noqa: E501
'name': (str,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'id': 'id', # noqa: E501
'name': 'name', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""JobTagChange - 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,)
id (str): UUID of the tag. If this is given, 'name' should not be given.. [optional] # noqa: E501
name (str): Name of the tag. If this is given, 'id' should not be given.. [optional] # 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__,)
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
"""JobTagChange - 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,)
id (str): UUID of the tag. If this is given, 'name' should not be given.. [optional] # noqa: E501
name (str): Name of the tag. If this is given, 'id' should not be given.. [optional] # 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__,)
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.")
@@ -170,11 +170,11 @@ class SubmittedJob(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
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] # noqa: E501
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 omitted, the check is bypassed. . [optional] # noqa: E501
settings (JobSettings): [optional] # noqa: E501
metadata (JobMetadata): [optional] # noqa: E501
storage (JobStorageInfo): [optional] # noqa: E501
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] # noqa: E501
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 omitted, all workers can work on this job. . [optional] # noqa: E501
initial_status (JobStatus): [optional] # noqa: E501
"""
@@ -268,11 +268,11 @@ class SubmittedJob(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
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] # noqa: E501
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 omitted, the check is bypassed. . [optional] # noqa: E501
settings (JobSettings): [optional] # noqa: E501
metadata (JobMetadata): [optional] # noqa: E501
storage (JobStorageInfo): [optional] # noqa: E501
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] # noqa: E501
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 omitted, all workers can work on this job. . [optional] # noqa: E501
initial_status (JobStatus): [optional] # noqa: E501
"""
+14 -2
View File
@@ -102,6 +102,8 @@ class Task(ModelNormal):
'task_type': (str,), # noqa: E501
'activity': (str,), # noqa: E501
'commands': ([Command],), # noqa: E501
'steps_completed': (int,), # noqa: E501
'steps_total': (int,), # noqa: E501
'worker': (TaskWorker,), # noqa: E501
'last_touched': (datetime,), # noqa: E501
'failed_by_workers': ([TaskWorker],), # noqa: E501
@@ -124,6 +126,8 @@ class Task(ModelNormal):
'task_type': 'task_type', # noqa: E501
'activity': 'activity', # noqa: E501
'commands': 'commands', # noqa: E501
'steps_completed': 'steps_completed', # noqa: E501
'steps_total': 'steps_total', # noqa: E501
'worker': 'worker', # noqa: E501
'last_touched': 'last_touched', # noqa: E501
'failed_by_workers': 'failed_by_workers', # noqa: E501
@@ -136,7 +140,7 @@ class Task(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, id, created, updated, job_id, index_in_job, name, status, priority, task_type, activity, commands, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, id, created, updated, job_id, index_in_job, name, status, priority, task_type, activity, commands, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""Task - a model defined in OpenAPI
Args:
@@ -151,6 +155,8 @@ class Task(ModelNormal):
task_type (str):
activity (str):
commands ([Command]):
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -224,6 +230,8 @@ class Task(ModelNormal):
self.task_type = task_type
self.activity = activity
self.commands = commands
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -244,7 +252,7 @@ class Task(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, id, created, updated, job_id, index_in_job, name, status, priority, task_type, activity, commands, *args, **kwargs): # noqa: E501
def __init__(self, id, created, updated, job_id, index_in_job, name, status, priority, task_type, activity, commands, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""Task - a model defined in OpenAPI
Args:
@@ -259,6 +267,8 @@ class Task(ModelNormal):
task_type (str):
activity (str):
commands ([Command]):
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -330,6 +340,8 @@ class Task(ModelNormal):
self.task_type = task_type
self.activity = activity
self.commands = commands
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -31,7 +31,9 @@ from flamenco.manager.exceptions import ApiAttributeError
def lazy_import():
from flamenco.manager.model.task_status import TaskStatus
from flamenco.manager.model.task_worker import TaskWorker
globals()['TaskStatus'] = TaskStatus
globals()['TaskWorker'] = TaskWorker
class TaskSummary(ModelNormal):
@@ -94,6 +96,9 @@ class TaskSummary(ModelNormal):
'priority': (int,), # noqa: E501
'task_type': (str,), # noqa: E501
'updated': (datetime,), # noqa: E501
'steps_completed': (int,), # noqa: E501
'steps_total': (int,), # noqa: E501
'worker': (TaskWorker,), # noqa: E501
}
@cached_property
@@ -109,6 +114,9 @@ class TaskSummary(ModelNormal):
'priority': 'priority', # noqa: E501
'task_type': 'task_type', # noqa: E501
'updated': 'updated', # noqa: E501
'steps_completed': 'steps_completed', # noqa: E501
'steps_total': 'steps_total', # noqa: E501
'worker': 'worker', # noqa: E501
}
read_only_vars = {
@@ -118,7 +126,7 @@ class TaskSummary(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, id, name, status, index_in_job, priority, task_type, updated, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, id, name, status, index_in_job, priority, task_type, updated, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""TaskSummary - a model defined in OpenAPI
Args:
@@ -129,6 +137,8 @@ class TaskSummary(ModelNormal):
priority (int):
task_type (str):
updated (datetime):
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -161,6 +171,7 @@ class TaskSummary(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
worker (TaskWorker): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -195,6 +206,8 @@ class TaskSummary(ModelNormal):
self.priority = priority
self.task_type = task_type
self.updated = updated
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -215,7 +228,7 @@ class TaskSummary(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, id, name, status, index_in_job, priority, task_type, updated, *args, **kwargs): # noqa: E501
def __init__(self, id, name, status, index_in_job, priority, task_type, updated, steps_completed, steps_total, *args, **kwargs): # noqa: E501
"""TaskSummary - a model defined in OpenAPI
Args:
@@ -226,6 +239,8 @@ class TaskSummary(ModelNormal):
priority (int):
task_type (str):
updated (datetime):
steps_completed (int):
steps_total (int):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
@@ -258,6 +273,7 @@ class TaskSummary(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
worker (TaskWorker): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -290,6 +306,8 @@ class TaskSummary(ModelNormal):
self.priority = priority
self.task_type = task_type
self.updated = updated
self.steps_completed = steps_completed
self.steps_total = steps_total
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@@ -90,6 +90,7 @@ class TaskUpdate(ModelNormal):
'task_status': (TaskStatus,), # noqa: E501
'activity': (str,), # noqa: E501
'log': (str,), # noqa: E501
'steps_completed': (int,), # noqa: E501
}
@cached_property
@@ -101,6 +102,7 @@ class TaskUpdate(ModelNormal):
'task_status': 'taskStatus', # noqa: E501
'activity': 'activity', # noqa: E501
'log': 'log', # noqa: E501
'steps_completed': 'steps_completed', # noqa: E501
}
read_only_vars = {
@@ -147,6 +149,7 @@ class TaskUpdate(ModelNormal):
task_status (TaskStatus): [optional] # noqa: E501
activity (str): One-liner to indicate what's currently happening with the task. Overwrites previously sent activity strings.. [optional] # noqa: E501
log (str): Log lines for this task, will be appended to logs sent earlier.. [optional] # noqa: E501
steps_completed (int): Number of task steps completed. May not exceed the task's steps_total.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -231,6 +234,7 @@ class TaskUpdate(ModelNormal):
task_status (TaskStatus): [optional] # noqa: E501
activity (str): One-liner to indicate what's currently happening with the task. Overwrites previously sent activity strings.. [optional] # noqa: E501
log (str): Log lines for this task, will be appended to logs sent earlier.. [optional] # noqa: E501
steps_completed (int): Number of task steps completed. May not exceed the task's steps_total.. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -141,7 +141,7 @@ class WorkerTag(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
id (str): UUID of the tag. Can be ommitted when creating a new tag, in which case a random UUID will be assigned. . [optional] # noqa: E501
id (str): UUID of the tag. Can be omitted when creating a new tag, in which case a random UUID will be assigned. . [optional] # noqa: E501
description (str): [optional] # noqa: E501
"""
@@ -228,7 +228,7 @@ class WorkerTag(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
id (str): UUID of the tag. Can be ommitted when creating a new tag, in which case a random UUID will be assigned. . [optional] # noqa: E501
id (str): UUID of the tag. Can be omitted when creating a new tag, in which case a random UUID will be assigned. . [optional] # noqa: E501
description (str): [optional] # noqa: E501
"""
@@ -32,9 +32,11 @@ from flamenco.manager.exceptions import ApiAttributeError
def lazy_import():
from flamenco.manager.model.task_status import TaskStatus
from flamenco.manager.model.task_summary import TaskSummary
from flamenco.manager.model.task_worker import TaskWorker
from flamenco.manager.model.worker_task_all_of import WorkerTaskAllOf
globals()['TaskStatus'] = TaskStatus
globals()['TaskSummary'] = TaskSummary
globals()['TaskWorker'] = TaskWorker
globals()['WorkerTaskAllOf'] = WorkerTaskAllOf
@@ -98,7 +100,10 @@ class WorkerTask(ModelComposed):
'priority': (int,), # noqa: E501
'task_type': (str,), # noqa: E501
'updated': (datetime,), # noqa: E501
'steps_completed': (int,), # noqa: E501
'steps_total': (int,), # noqa: E501
'job_id': (str,), # noqa: E501
'worker': (TaskWorker,), # noqa: E501
}
@cached_property
@@ -114,7 +119,10 @@ class WorkerTask(ModelComposed):
'priority': 'priority', # noqa: E501
'task_type': 'task_type', # noqa: E501
'updated': 'updated', # noqa: E501
'steps_completed': 'steps_completed', # noqa: E501
'steps_total': 'steps_total', # noqa: E501
'job_id': 'job_id', # noqa: E501
'worker': 'worker', # noqa: E501
}
read_only_vars = {
@@ -133,6 +141,8 @@ class WorkerTask(ModelComposed):
priority (int):
task_type (str):
updated (datetime):
steps_completed (int):
steps_total (int):
job_id (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@@ -164,6 +174,7 @@ class WorkerTask(ModelComposed):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
worker (TaskWorker): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -240,6 +251,8 @@ class WorkerTask(ModelComposed):
priority (int):
task_type (str):
updated (datetime):
steps_completed (int):
steps_total (int):
job_id (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@@ -271,6 +284,7 @@ class WorkerTask(ModelComposed):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
worker (TaskWorker): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)