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

1#!/usr/bin/env python 

2# -*- coding: utf-8 -*- 

3from marshmallow import fields 

4 

5from daiquiri.core.hardware.abstract import HardwareObject 

6from daiquiri.core.schema.hardware import HardwareSchema 

7 

8import logging 

9 

10logger = logging.getLogger(__name__) 

11 

12ProcessorStates = ["READY", "PROCESSING", "OFFLINE", "UNKNOWN"] 

13 

14 

15class ProcessorPropertiesSchema(HardwareSchema): 

16 state = fields.Str() 

17 state_ok = fields.Bool() 

18 enabled = fields.Bool() 

19 

20 

21class ProcessorCallablesSchema(HardwareSchema): 

22 reprocess = fields.Dict(keys=fields.Str()) 

23 

24 

25class Processor(HardwareObject): 

26 _type = "processor" 

27 _state_ok = [ProcessorStates[0], ProcessorStates[1]] 

28 

29 _properties = ProcessorPropertiesSchema() 

30 _callables = ProcessorCallablesSchema()