Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/hardware/abstract/processor.py: 0%
17 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-02-06 02:13 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2025-02-06 02:13 +0000
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3from marshmallow import fields
5from daiquiri.core.hardware.abstract import HardwareObject
6from daiquiri.core.schema.hardware import HardwareSchema
8import logging
10logger = logging.getLogger(__name__)
12ProcessorStates = ["READY", "PROCESSING", "OFFLINE", "UNKNOWN"]
15class ProcessorPropertiesSchema(HardwareSchema):
16 state = fields.Str()
17 state_ok = fields.Bool()
18 enabled = fields.Bool()
21class ProcessorCallablesSchema(HardwareSchema):
22 reprocess = fields.Dict(keys=fields.Str())
25class Processor(HardwareObject):
26 _type = "processor"
27 _state_ok = [ProcessorStates[0], ProcessorStates[1]]
29 _properties = ProcessorPropertiesSchema()
30 _callables = ProcessorCallablesSchema()