summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMatthias Fetzer <fetzerms@users.noreply.github.com>2020-03-04 10:43:23 +0100
committerAdministrator <admin@rofl.cat>2020-03-11 11:27:50 +0100
commit508d380b8ef4079d539a3845705f1bf3aeff3a67 (patch)
tree1305c4009005102a378646781b5bfd295768acca /python
parent09a2b2789c3914a6756bd3b487e51fa0737af8ca (diff)
downloadvyos-1x-508d380b8ef4079d539a3845705f1bf3aeff3a67.tar.gz
vyos-1x-508d380b8ef4079d539a3845705f1bf3aeff3a67.zip
http api: T2096: Added show and generate
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configsession.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index d326b3b11..aaf08e726 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -29,6 +29,7 @@ SAVE_CONFIG = ['/opt/vyatta/sbin/vyatta-save-config.pl']
INSTALL_IMAGE = ['/opt/vyatta/sbin/install-image']
REMOVE_IMAGE = ['/opt/vyatta/bin/vyatta-boot-image.pl', '--del']
GENERATE = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'generate']
+SHOW = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'show']
# Default "commit via" string
APP = "vyos-http-api"
@@ -181,5 +182,10 @@ class ConfigSession(object):
return out
def generate(self, cmd):
- out = self.__run_command(GENERATE + cmd)
+ out = self.__run_command(GENERATE + cmd.split())
return out
+
+ def show(self, cmd):
+ out = self.__run_command(SHOW + cmd.split())
+ return out
+