vyos-yaml-config-converter

module
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2023 License: BSD-3-Clause

README

Vyos YAML Config Converter

This program allows to convert a YAML file into VyOS (1.4) config CLI commands.

Currently implemented config sections:

  • firewall

Missing:

  • anything else
Installation

To install this program you first need to install the Go compiler.

Install the latest version like this, or use a specific tag instead of latest.

go install gitlab.com/DerEnderKeks/vyos-yaml-config-converter/cmd/vycc@latest
Usage

You first need to write a config file in YAML. The field names are almost equal to those used by VyOS, except that all are in pascalCase, some are pluralized and some are renamed partially.

You can use this JSON Schema for partial auto-completion, using an IDE that supports it, eg. those made by Jetbrains.

All YAML features should be supported, including anchors, which allows to reuse parts of the config multiple times.

Convert the config file to CLI commands like this:

vycc convert -c <path to config.yml>

⚠️ Note that the commands may contain errors, as I haven't tested every possible config section. Check that the commands are correct before applying them and let me know if there are any bugs.

License

See License.

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL