summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-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])