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
« 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
7import logging
9logger = logging.getLogger(__name__)
11GenericStates = ["ON", "OFF", "UNKNOWN", "ERROR"]
14class GenericPropertiesSchema(HardwareSchema):
15 state = OneOf(GenericStates, metadata={"readOnly": True})
18class GenericCallablesSchema(HardwareSchema):
19 pass
22class Generic(HardwareObject):
23 _type = "generic"
24 _state_ok = [GenericStates[0]]
26 _properties = GenericPropertiesSchema()
27 _callables = GenericCallablesSchema()