Skip to content

Telecominfraproject/olg-ucentral-schema

Repository files navigation

OLG uCentral Schema

Collection of JSON schemas used by uCentral for validating the data model. Rendering of configuration JSON into device-specific output is performed by separate flavour-specific renderer repos.

Building

Dependencies

In order to generate and validate schema artifacts you will need the following tools:

  • python3
  • PyYAML (pip3 install pyyaml)
  • ucode
  • jq
  • json-schema-for-humans (pip3 install json-schema-for-humans)

Generation

Run the repo generator from the repository root:

./tools/generate.sh

This regenerates:

  • ucentral.schema.json
  • ucentral.schema.pretty.json
  • ucentral.schema.full.json
  • ucentral.state.pretty.json
  • validator/ucode/schemareader.uc
  • validator/bash/schemareader.sh

Layout

The repository is organized as follows:

  • schema/ - schema source definitions
  • state/ - state schema source definitions
  • tools/merge-schema.py - merges schema YAML into generated JSON artifacts
  • tools/generate.sh - regenerates schema and validator artifacts
  • generators/ucode/generate-reader.uc - generates validator/ucode/schemareader.uc
  • generators/bash/generate-bash-reader.uc - generates validator/bash/schemareader.sh
  • validator/ucode/schemareader.uc - autogenerated ucode validator returning the prepared JSON object
  • validator/bash/schemareader.sh - autogenerated bash validator returning the prepared JSON object

Developer Notes

Generated documentation

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors