Page MenuHomeVyOS Platform

Implement config write API for Python
Closed, ResolvedPublicENHANCEMENT


Right now we only have config read API for Python, and no write API. If used with care, it can be implemented by saving the environment variables given by cli-shell-api getSessionEnv and using it for calls to my_set, my_delete etc.

s = vyos.configsession.ConfigSession(os.getpid(), app="vyos-http-api")
s.set(["system", "host-name"], value="vyos")
s.delete(["system", "options", "reboot-on-panic"])
s.comment(["system", "host-name"], value="Haha, I can change host-name via an API")


Difficulty level
Hard (possibly days)
Why the issue appeared?
Is it a breaking change?
Perfectly compatible

Related Objects

Event Timeline

syncer changed the subtype of this task from "Task" to "Enhancement".Mar 15 2020, 3:25 PM
dmbaturin changed Difficulty level from Unknown (require assessment) to Hard (possibly days).
dmbaturin changed Why the issue appeared? from Will be filled on close to Other.
dmbaturin set Is it a breaking change? to Perfectly compatible.