summaryrefslogtreecommitdiff
path: root/python/vyos/configsession.py
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2020-02-05 15:18:13 -0800
committerhagbard <vyosdev@derith.de>2020-02-05 15:18:13 -0800
commite6c793fe77aa3e91e1df8c280262b1d544c28682 (patch)
tree8c8f12c02db5fcbe8d824c6ead63f9656475da3f /python/vyos/configsession.py
parentf40ec762280f8fe6aac402d9549143608ce8ff68 (diff)
downloadvyos-1x-e6c793fe77aa3e91e1df8c280262b1d544c28682.tar.gz
vyos-1x-e6c793fe77aa3e91e1df8c280262b1d544c28682.zip
smoke-test: adding generate cmd to configsession
- in preparation for a wireguard cli test case, generate is used to create the keys later used in the config
Diffstat (limited to 'python/vyos/configsession.py')
-rw-r--r--python/vyos/configsession.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index 163f666c2..d326b3b11 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -28,6 +28,7 @@ LOAD_CONFIG = ['/bin/cli-shell-api', 'loadFile']
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']
# Default "commit via" string
APP = "vyos-http-api"
@@ -179,3 +180,6 @@ class ConfigSession(object):
out = self.__run_command(REMOVE_IMAGE + [name])
return out
+ def generate(self, cmd):
+ out = self.__run_command(GENERATE + cmd)
+ return out