lbaf.IO.lbsConfigurationValidator.ConfigurationValidator class

Validate data in an YAML configuration file.

Static methods

def allowed_keys(group: bool = False) -> typing.Union[typing.List[str], typing.Dict[str, typing.List[str]]]
Returns allowed keys at configuration root level grouped by some group key or as a flat list
def is_valid(valid_schema: schema.Schema, schema_to_validate: dict) -> bool
Return True if schema_to_validate is valid with valid_schema else False.
def validate(valid_schema: schema.Schema, schema_to_validate: dict)
Return validated schema.

Methods

def main(self)
Main routine for the config validation.

Special methods

def __init__(self, config_to_validate: dict, logger: logging.Logger)