omni.flux.validator.mass.queue.core#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.validator.mass.queue.core.core.ValidatorMassQueueCore#
Bases:
object
- subscribe_on_update_item(
- function: Callable[[ValidationSchema, str | None], None],
Subscribe to the on_update_item event.
- Parameters:
function – the callback to execute when the event is triggered
- Returns:
An object that will automatically unsubscribe when destroyed.
- update_schema(
- data: UpdateSchemaRequestModel,
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.validator.mass.queue.core.extension.ValidatorMassQueueCoreExtension#
Bases:
IExt
Standard extension support class, necessary for extension management
- on_shutdown()#
- on_startup(_)#
- omni.flux.validator.mass.queue.core.extension.get_mass_validation_queue_instance() ValidatorMassQueueCore | None #
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- pydantic model omni.flux.validator.mass.queue.core.data_models.models.BaseServiceModel#
Bases:
BaseModel
Base Model used for all service models. It adds the ability for injected fields to be hidden from the OpenAPI documentation and serialization.
Fields should be injected dynamically in the service using ServiceBase.inject_hidden_field.
Notes
Models requiring injected fields should use model_validator as the field will be added at the end of the fields list and will therefore not be accessible if using a regular field validator.
The first field of any PathParamModel will be used to validate the Path Parameter.
Show JSON schema
{ "title": "BaseServiceModel", "description": "Base Model used for all service models. It adds the ability for injected fields to be hidden from the OpenAPI\ndocumentation and serialization.\n\nFields should be injected dynamically in the service using `ServiceBase.inject_hidden_field`.\n\nNotes:\n - Models requiring injected fields should use model_validator as the field will be added at the end of the\n fields list and will therefore not be accessible if using a regular field validator.\n - The first field of any PathParamModel will be used to validate the Path Parameter.", "type": "object", "properties": {} }
- Config:
extra: str = ignore
- pydantic model omni.flux.validator.mass.queue.core.data_models.models.UpdateSchemaRequestModel#
Bases:
BaseServiceModel
Show JSON schema
{ "title": "UpdateSchemaRequestModel", "type": "object", "properties": { "validation_schema": { "default": null, "title": "Validation Schema" }, "queue_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue Id" } } }
- Config:
extra: str = ignore
- Fields:
- field queue_id: str | None = None#
- field validation_schema: ValidationSchema [Required]#
- pydantic model omni.flux.validator.mass.queue.core.data_models.models.ValidationSchema#
Bases:
BaseModel
Show JSON schema
{ "title": "ValidationSchema", "type": "object", "properties": { "on_progress_callback": { "default": null, "title": "On Progress Callback" }, "on_finished_callback": { "default": null, "title": "On Finished Callback" }, "name": { "title": "Name", "type": "string" }, "uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Uuid" }, "data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Data" }, "progress": { "default": 0.0, "title": "Progress", "type": "number" }, "send_request": { "default": false, "title": "Send Request", "type": "boolean" }, "context_plugin": { "$ref": "#/$defs/omni__flux__validator__factory__plugins__context_base__Schema" }, "check_plugins": { "items": { "$ref": "#/$defs/omni__flux__validator__factory__plugins__check_base__Schema" }, "title": "Check Plugins", "type": "array" }, "resultor_plugins": { "anyOf": [ { "items": { "$ref": "#/$defs/omni__flux__validator__factory__plugins__resultor_base__Schema" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Resultor Plugins" }, "validation_passed": { "default": false, "title": "Validation Passed", "type": "boolean" }, "finished": { "default": [ false, "Nothing" ], "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "boolean" }, { "type": "string" } ], "title": "Finished", "type": "array" } }, "$defs": { "Data": { "properties": {}, "title": "Data", "type": "object" }, "omni__flux__validator__factory__plugins__check_base__Schema": { "additionalProperties": false, "properties": { "name": { "title": "Name", "type": "string" }, "enabled": { "default": true, "title": "Enabled", "type": "boolean" }, "data": { "$ref": "#/$defs/Data" }, "context_plugin": { "$ref": "#/$defs/omni__flux__validator__factory__plugins__context_base__Schema" }, "selector_plugins": { "items": { "$ref": "#/$defs/omni__flux__validator__factory__plugins__selector_base__Schema" }, "title": "Selector Plugins", "type": "array" }, "resultor_plugins": { "anyOf": [ { "items": { "$ref": "#/$defs/omni__flux__validator__factory__plugins__resultor_base__Schema" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Resultor Plugins" }, "stop_if_fix_failed": { "default": false, "title": "Stop If Fix Failed", "type": "boolean" }, "pause_if_fix_failed": { "default": true, "title": "Pause If Fix Failed", "type": "boolean" } }, "required": [ "name", "data", "context_plugin", "selector_plugins" ], "title": "Schema", "type": "object" }, "omni__flux__validator__factory__plugins__context_base__Schema": { "additionalProperties": false, "properties": { "name": { "title": "Name", "type": "string" }, "enabled": { "default": true, "title": "Enabled", "type": "boolean" }, "data": { "$ref": "#/$defs/Data" }, "resultor_plugins": { "anyOf": [ { "items": { "$ref": "#/$defs/omni__flux__validator__factory__plugins__resultor_base__Schema" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Resultor Plugins" } }, "required": [ "name", "data" ], "title": "Schema", "type": "object" }, "omni__flux__validator__factory__plugins__resultor_base__Schema": { "additionalProperties": false, "properties": { "name": { "title": "Name", "type": "string" }, "enabled": { "default": true, "title": "Enabled", "type": "boolean" }, "data": { "$ref": "#/$defs/Data" } }, "required": [ "name", "data" ], "title": "Schema", "type": "object" }, "omni__flux__validator__factory__plugins__selector_base__Schema": { "additionalProperties": false, "properties": { "name": { "title": "Name", "type": "string" }, "enabled": { "default": true, "title": "Enabled", "type": "boolean" }, "data": { "$ref": "#/$defs/Data" } }, "required": [ "name", "data" ], "title": "Schema", "type": "object" } }, "required": [ "name", "context_plugin", "check_plugins" ] }
- Config:
validate_assignment: bool = True
- Fields:
check_plugins (list[omni.flux.validator.factory.plugins.check_base.Schema])
context_plugin (omni.flux.validator.factory.plugins.context_base.Schema)
on_finished_callback (Callable[[bool, str, bool], None] | None)
resultor_plugins (list[omni.flux.validator.factory.plugins.resultor_base.Schema] | None)
- Validators:
- field data: dict[Any, Any] | None = None#
- field finished: tuple[bool, str] = (False, 'Nothing')#
- Validated by:
_fire_finished_callback
- field name: str [Required]#
- field on_finished_callback: Callable[[bool, str, bool], None] | None = None#
- field on_progress_callback: Callable[[float, bool], None] | None = None#
- field progress: float = 0.0#
- Validated by:
_fire_progress_callback
- field send_request: bool = False#
- field uuid: str | None = None#
- Validated by:
- field validation_passed: bool = False#
- validator at_least_one » check_plugins#
- update(
- data: dict,
This function updates the attributes of a ValidationSchema instance with new values provided in a dictionary. The update is performed recursively for nested models and lists within the model.