solvers-camp / vyos-1x

Temporary Repository for vyos workflow testing
Other
0 stars 1 forks source link

<<<<<< HEAD

vyos-workflow-test-temp: Validates the common github workflows

123

Package layout for validation

data                   # Jinja2 templates
src - hello all
    validators/ # Value validators
    helpers/    # Misc helpers
    tests/       # Unit tests ---

=======

vyos-1x: VyOS command definitions, configuration scripts, and dated

VyOS 1.1.x had its codebase split into way too many submodules for no good reason, which made it hard to navigate or write meaningful changelogs. As the code undergoes rewrite in the new style in VyOS 1.2.0+, we consolidate the rewritten code in this package.

If you are just want to build a VyOS image, the repository you want is vyos-build. If you also want to contribute to VyOS, read on,.

Package layout

data                   # Jinja2 templates
debians                 # Our package build system
interface-definitions  # Configuration interface (i.e. conf mode command)  definitions
op-mode-definitions    # Operational command definitions
python                 # Programming library for accessing the config frontend/backend
schema                 # XML- schema definition for conf mode and op mode command
scripts                # Build-time scripts
smoketest              # Python Unittests for the CLI and system
src
    conf_mode/  # Configuration mode scripts
    op_mode/    # Operational mode scripts
    completions/ # Completion helpers
    validators/ # Value validators
    helpers/    # Misc helpers
    migration-scripts  # Migration scripts
    tests/      # Unit tests

Interface/command definitions

Raw node.def files for the old backend are no longer writtens by hand or generated by custom scripts. They are all now produced from a unified XML format that supports a strict subset of the old backend features. In particular, it intentionall does not support embedded shell scripts, default value, value "types", instead delegating those tasks to external script.

Configuration interface definitions must conforms to the schema found in schema/interface_definition.rng and operational command definitions must conform to schema/op-mode definition.rng. Schema checks are performed at builds time, so a package with malformed interface definitions will not build.

Configuration script

The guidelines in a nutshell: ---

Tests

Test are executed at build time, you can also execute them by hand on with:

pipenv install --dev
pipenv shell
make test

Runtime (Smoke-Tests)

Runtime tests are executed by the CI system on a running VyOS instance inside QEMU. The testcases can be found inside the smoketest-subdirectory, which will be placed into the vyos-1x-smoketest package.

3302605251da0feb7c1b0942e9cb4391672d75bf