diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-03-11 11:36:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-11 11:36:13 +0100 |
commit | 3c4c7179ba40be6ccd418f22d3cee9b0e3c0f5e7 (patch) | |
tree | 839a92d1cf6a69e203e197643b9b37eba7ad5a14 /python | |
parent | b0952b9609da1a1e9d3cf4d0591525cde7a6bbb5 (diff) | |
parent | 508d380b8ef4079d539a3845705f1bf3aeff3a67 (diff) | |
download | vyos-1x-3c4c7179ba40be6ccd418f22d3cee9b0e3c0f5e7.tar.gz vyos-1x-3c4c7179ba40be6ccd418f22d3cee9b0e3c0f5e7.zip |
Merge pull request #238 from fetzerms/http_api_show_generate
T2096: Http api show generate
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/configsession.py | 8 |
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 + |