Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/hardware/abstract/generic.py: 0%

15 statements  

« prev     ^ index     » next       coverage.py v7.6.5, created at 2024-11-15 02:12 +0000

1#!/usr/bin/env python 

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

3from daiquiri.core.hardware.abstract import HardwareObject 

4from daiquiri.core.schema.hardware import HardwareSchema 

5from daiquiri.core.schema.validators import OneOf 

6 

7import logging 

8 

9logger = logging.getLogger(__name__) 

10 

11GenericStates = ["ON", "OFF", "UNKNOWN", "ERROR"] 

12 

13 

14class GenericPropertiesSchema(HardwareSchema): 

15 state = OneOf(GenericStates, metadata={"readOnly": True}) 

16 

17 

18class GenericCallablesSchema(HardwareSchema): 

19 pass 

20 

21 

22class Generic(HardwareObject): 

23 _type = "generic" 

24 _state_ok = [GenericStates[0]] 

25 

26 _properties = GenericPropertiesSchema() 

27 _callables = GenericCallablesSchema()