fake-api-server.ci.surveillance.model.action¶
This module defines the ActionInput class, which represents the input data model for the surveillance action workflow. It handles deserialization of input data and provides methods to retrieve the surveillance configuration.
Classes:
- ActionInput: Manages input deserialization and configuration handling.
Dependencies:
- Reads YAML configuration from a file and deserializes it into a SurveillanceConfig.
ActionInput(config_path=str())
dataclass
¶
Bases: _BaseModel
Represents the input data structure for an action.
This class is designed to hold and manage the input configuration path
for an action. It provides functionality to deserialize input data into
an ActionInput
instance and to retrieve the configuration object based
on the stored configuration path.
ATTRIBUTE | DESCRIPTION |
---|---|
config_path |
The path to the configuration file for the action input.
TYPE:
|
get_config()
¶
Retrieve and deserialize configuration data from a specified YAML file.
This method reads a YAML file located at the path defined by the
config_path
attribute. The file is expected to contain serialized
data for configuring a SurveillanceConfig
object. Upon successful
reading and deserialization, a new SurveillanceConfig
instance is returned.
RETURNS | DESCRIPTION |
---|---|
SurveillanceConfig
|
A |
RAISES | DESCRIPTION |
---|---|
FileNotFoundError
|
If the YAML file at |
ValueError
|
If the file at |