diff options
author | Christian Breunig <christian@breunig.cc> | 2024-05-28 20:17:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-28 20:17:46 +0200 |
commit | 4b05357eb847c6f6cb571a74208133d4a2e3d020 (patch) | |
tree | c033e098e510e06b6fe76296493a9b5a7fbc370e /python | |
parent | f04776073d1e46cfd022e6daf8742e0968d50e4b (diff) | |
parent | cbb61faed494381b0c655d811920413b31fd294d (diff) | |
download | vyos-1x-4b05357eb847c6f6cb571a74208133d4a2e3d020.tar.gz vyos-1x-4b05357eb847c6f6cb571a74208133d4a2e3d020.zip |
Merge pull request #3529 from HollyGurza/T5786
T5786: Add set/show system image to /image endpoint
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/configsession.py | 6 |
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 |