Page MenuHomePhabricator

Implement config write API for Python
Open, HighPublic


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
Unknown (require assessment)
Why the issue appeared?
Will be filled on close

Event Timeline

dmbaturin triaged this task as High priority.Jun 12 2019, 8:01 AM
dmbaturin created this task.
runar added a subscriber: runar.Jun 12 2019, 2:49 PM
pasik added a subscriber: pasik.Jun 13 2019, 7:41 PM