summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@sentrium.io>2019-08-31 17:25:07 -0500
committerJohn Estabrook <jestabro@sentrium.io>2019-08-31 18:09:54 -0500
commit86d1291ec5323e921a0f995211e223bf1f7dcdff (patch)
tree05d26dfd75a8e0b618980838b229ca14223ed5a2 /python/vyos
parent0e032f5df4f567195abc7562e8cf6b1164eeec7b (diff)
downloadvyos-1x-86d1291ec5323e921a0f995211e223bf1f7dcdff.tar.gz
vyos-1x-86d1291ec5323e921a0f995211e223bf1f7dcdff.zip
[boot-config-loader] T1622: Add failsafe and back trace
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/configsession.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index 8626839f2..acbdd3d5f 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -24,6 +24,7 @@ COMMENT = '/opt/vyatta/sbin/my_comment'
COMMIT = '/opt/vyatta/sbin/my_commit'
DISCARD = '/opt/vyatta/sbin/my_discard'
SHOW_CONFIG = ['/bin/cli-shell-api', 'showConfig']
+LOAD_CONFIG = ['/bin/cli-shell-api', 'loadFile']
# Default "commit via" string
APP = "vyos-http-api"
@@ -155,3 +156,5 @@ class ConfigSession(object):
if format == 'raw':
return config_data
+ def load_config(self, file_path):
+ self.__run_command(LOAD_CONFIG + [file_path])