Yaml Configuration Helpers
This page contains the documentation for the helper .py
files with the helper functionality for custom yaml configuration options for Resource Nodes.
yaml_config
Includes the pydantic
definitions for the YAML configuration options.
find_and_parse_yaml_services()
Searches and finds the defined yaml files in the YAML_SERVICES_DIRECTORY directory that are not starting with '_'
Returns:
Type | Description |
---|---|
List[YamlService]
|
List[YamlService]: List of found YamlServices, created from yaml files |
parse_yaml_file_to_service(yaml_file_path)
Parses given YAML file and returns a pydantic model: YamlService object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
yaml_file_path |
str
|
Filepath for the yaml file |
required |
Returns:
Name | Type | Description |
---|---|---|
YamlService |
YamlService
|
Input data parsed as a pydantic YamlService object |
Union[Exception, None]
|
Exception or |
yaml_validators
Yaml parsers and helper functions.
YamlComplementApiParameterAction
Bases: BaseModel
Defines the add
and remove
options for complement_api_parameters in YamlResourceNodeOperation
Source code in balcony/yaml_validators.py
action_must_be_valid(v)
Validates the action field. Must be 'add' or 'remove'
YamlResourceNodeOperation
Bases: BaseModel
Defines the customizations for a specific operation in a Resource Node.
Source code in balcony/yaml_validators.py
YamlService
Bases: BaseModel
Defines a Service in a Yaml file. It can have multiple Resource Nodes
Source code in balcony/yaml_validators.py
YamlServiceResourceNode
Bases: BaseModel
Defines a Resource Node in a Service. It can have extra_relations and list of operations