Page MenuHomeVyOS Platform

Implement an HTTP API for config reading and modification
Closed, ResolvedPublicFEATURE REQUEST

Description

Config reading has been doable from Python for quite a while now and is the standard way to do it now. When we have a write counterpart, we can implement an HTTP API that can be used for config sync, GUI, better Ansible modules and so on.

The API can be only as good as the underlying backend though, and the underlying backend is... well, not quite good.

No persistent sessions. Every request is independent from any other. For write operations, there's implicit commit at the end.
No real multi-user. Or no multiuser at all at first, just API keys.

Instead, provide support for sending multiple commands at once.
For example, if someone wants to change eth0 address from 192.0.2.10 to .20, they can send the following data:

[{"op": "set", "path": ["interfaces", "ethernet", "eth0", "address"], "value": "192.0.2.20/24"},
 {"op": "delete", "path": ["interfaces", "ethernet", "eth0", "address"], "value": "192.0.2.10/24"}]

Details

Version
-
Is it a breaking change?
Perfectly compatible

Event Timeline

dmbaturin claimed this task.
dmbaturin triaged this task as High priority.
dmbaturin merged a task: Restricted Maniphest Task.
dmbaturin edited a custom field.
dmbaturin added subscribers: jmanimala, Sentrium.
dmbaturin set Is it a breaking change? to Perfectly compatible.
dmbaturin merged a task: Restricted Maniphest Task.Sep 10 2021, 6:14 AM