ait.core.bin.ait_yaml_validate module

usage: ait-yaml-validate

Validate YAML files with applicable schema and/or advanced content validation for CMD and TLM dictionaries.

YAML validation is done through a combination of JSON Schema (http://json-schema.org/) and Python-coded content validation. The JSON Schema is used to validate general format of the YAML, i.e dictionaries contain the expected keys, values are the expected type, etc.

Why JSON Schema? All of the available YAML validators did not meet the robustness expected for this tool. Since JSON and YAML are stored similarly in memory, the JSON Schema became an option. The only difference between YAML and JSON is the use of multiple documents in the same YAML file. The val.py module handles this implication. See TBD wiki page for more details on developing JSON schema for an applicable YAML file.

Examples:

$ ait-yaml-validate –cmd $ ait-yaml-validate –tlm $ ait-yaml-validate –evr $ ait-yaml-validate –cmd –yaml /path/to/cmd.yaml $ ait-yaml-validate –tlm –yaml /path/to/tlm.yaml $ ait-yaml-validate –yaml /path/to/yaml –schema /path/to/schema
ait.core.bin.ait_yaml_validate.main()
ait.core.bin.ait_yaml_validate.validate(validator, yml, schema)