Yaml2Archiving YamlParser

YamlParser

This module contain class for yml parser based on new format

exception yaml2archiving.v1.yamlparser.InvalidKeyReference[source]

Raise Invalid key parser error

class yaml2archiving.v1.yamlparser.YamlParser(config_path)[source]

This parser parse yaml file and generate the configuration data for attributes specified in yaml file

create_attribute_config_list() Dict[str, AttributeConfig][source]

Create attribute config list

get_attribute_configs()[source]

Return Attribute configs

get_attribute_short_trl(trl: str) str[source]
Parameters:

trl (str) – device trl

Returns:

short form of trl

Return type:

str

parse()[source]

parse file and generate data

set_config_managers()[source]

Set Config Managers

set_db_config()[source]

Set Db configuration

set_event_subscribers()[source]

Set Event Subscriber

validate_keys(config, keys=['es', 'cm', 'th'])[source]
Parameters:
  • config (dict) – archive config dict

  • keys (list) – keys to validate