summaryrefslogtreecommitdiff
path: root/python/vyos/configsession.py
diff options
context:
space:
mode:
authorkhramshinr <khramshinr@gmail.com>2024-05-27 20:34:52 +0600
committerkhramshinr <khramshinr@gmail.com>2024-05-27 20:34:52 +0600
commitcbb61faed494381b0c655d811920413b31fd294d (patch)
tree9690ded7f8bd8b34791fdfaa1308c9624726bd49 /python/vyos/configsession.py
parent22dae74ef6037ad6a97da7118df42e41acbb117b (diff)
downloadvyos-1x-cbb61faed494381b0c655d811920413b31fd294d.tar.gz
vyos-1x-cbb61faed494381b0c655d811920413b31fd294d.zip
T5786: Add set/show system image to /image endpoint
Diffstat (limited to 'python/vyos/configsession.py')
-rw-r--r--python/vyos/configsession.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index ab7a631bb..beec6010b 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -34,6 +34,8 @@ INSTALL_IMAGE = ['/usr/libexec/vyos/op_mode/image_installer.py',
'--action', 'add', '--no-prompt', '--image-path']
REMOVE_IMAGE = ['/usr/libexec/vyos/op_mode/image_manager.py',
'--action', 'delete', '--no-prompt', '--image-name']
+SET_DEFAULT_IMAGE = ['/usr/libexec/vyos/op_mode/image_manager.py',
+ '--action', 'set', '--no-prompt', '--image-name']
GENERATE = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'generate']
SHOW = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'show']
RESET = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'reset']
@@ -235,6 +237,10 @@ class ConfigSession(object):
out = self.__run_command(REMOVE_IMAGE + [name])
return out
+ def set_default_image(self, name):
+ out = self.__run_command(SET_DEFAULT_IMAGE + [name])
+ return out
+
def generate(self, path):
out = self.__run_command(GENERATE + path)
return out