Coder Social home page Coder Social logo

hlmtre / vyos-1x Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vyos/vyos-1x

0.0 1.0 0.0 3.55 MB

VyOS 1.2.0+ configuration scripts and data

License: GNU General Public License v2.0

Python 92.18% Makefile 0.93% Shell 1.38% Assembly 5.11% SWIG 0.41%

vyos-1x's Introduction

vyos-1x: VyOS 1.2.0+ configuration scripts and data

Coverage FOSSA Status

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 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

interface-definitions  # Configuration interface (i.e. conf mode command) definitions
op-mode-definitions    # Operational command definitions
src
    conf_mode/  # Configuration mode scripts
    op_mode/    # Operational mode scripts
    completion/ # Completion helpers
    validators/ # Value validators
    helpers/    # Misc helpers
    migration-scripts # Migration scripts
    tests/      # Unit tests

python/  # Python modules

scripts/ # Build-time scripts
schema/  # XML schemas

Interface/command definitions

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

Configuration interface definitions must conform 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 build time, so a package with malformed interface definitions will not build.

Configuration scripts

The guidelines in a nutshell:

  • Use separate functions for retrieving configuration data, validating it, and generating taret config
  • Use a template processor when the format is more complex than just one line (jinja2 and pystache are acceptable options)

Tests

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

pipenv install
pipenv shell
make test

License

FOSSA Status

vyos-1x's People

Contributors

c-po avatar dmbaturin avatar hagbard-01 avatar thomas-mangin avatar jjakob avatar jestabro avatar runborg avatar kroy-the-rabbit avatar zdc avatar sever-sever avatar unicronnl avatar higebu avatar vindenesen avatar taniadz avatar alkersan avatar alainlamar avatar elbandi avatar jbrodriguez avatar daniel-pro avatar l6nqlw avatar elbuit avatar julesakt avatar tjjh89017 avatar qiuchengxuan avatar watcher7 avatar fetzerms avatar jdmac87 avatar bswinnerton avatar tmarlok88 avatar ovsiannikov avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.