mirror of
https://github.com/Telecominfraproject/wlan-ucentral-schema.git
synced 2026-01-27 02:23:33 +00:00
b4cfdc6a1caa279ae8c6c42b6932620fb2aed9c1
This implements secure download by adding additional fields to the
upgrade command payload:
- use-local-certificates (boolean): When provided, enables secure download
and if true uses built-in certificates, if false requires below fields
- ca-certificate (string): base64 encoded cas.pem
- certificate (string): base64 encoded cert.pem
- private-key (string): base64 encoded key.pem
The following additional changes are included:
- Switches from wget to curl for downloading as curl supports using
certificates and in general seems more reliable
- An automatic download retry was added before reporting the failure
- When download fails, provides both exit code & http code to the cloud
Fixes: WIFI-14643
Signed-off-by: Paul White <paul@shasta.cloud>
uCentral Schema
Collection of JSON schemas and ucode template (utpl) files used by uCentral for validating the data model and rendering incoming configuration JSON into UCI batch sequences.
This software is a part of the OpenWiFi AP NOS.
Building
Dependencies
In order to run the test cases you will need the following tools:
- ucode
- ucentral-jsonschema
- jsonlint-php
- pip3 install jsonschema2md
- pip3 install json-schema-for-humans
- pip3 install python-json2yaml
Unit testing
./run_tests.sh
Documentation
JSDoc is used to generate API documentation
with a ucode transpiler (ucode-transpiler.js), configured by jsdoc.conf.json.
Additional JSON schema docs are generated using
json-schema-for-humans via
the script generate.sh.
Developer Notes
Generated documentation
- JSDoc: https://ucentral.io/docs/
schemaobject: http://ucentral.io/docs/ucentral-schema.htmlstateobject: https://ucentral.io/docs/ucentral-state.html
Installed files
The following ucode scripts are installed to the AP:
schemareader.uc- autogenerated schema readerrenderer/*- renderer sources and templatescommand/*- predefined command implementations, e.g. invoked by ucentral-clientsystem/*- scripts to generate system information (e.g. state, telemetry, health, capabilities)
Description
Languages
UnrealScript
96.9%
JavaScript
2.5%
Python
0.4%
Shell
0.2%