Page MenuHomeVyOS Platform

Make it possible to export config to JSON
Closed, ResolvedPublic

Description

Now that we have an HTTP API, people are asking for show config operation, but the current format can only be parsed by libvyosconfig, which means it must be installed on the client machines for that command to be any useful. Exporting to JSON will make it easy to obtain the config data and use it in scripts.

It can also come in handy in scripts people run locally. Maybe ability to retrieve a config and convert it to a dict can even be used in migration and commit-time scripts.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

dmbaturin triaged this task as Normal priority.Oct 27 2019, 1:50 PM
dmbaturin created this task.

With this, will there also be possible to parse the same json into an json import? This to allow for a more programatic way to add things than via set commands

Unknown Object (User) changed the task status from Open to In progress.Jun 22 2020, 10:28 AM
In T1773#46307, @runar wrote:

With this, will there also be possible to parse the same json into an json import? This to allow for a more programatic way to add things than via set commands

Importing config as JSON would be much appreciated now that the export is working.