summaryrefslogtreecommitdiff
path: root/python/vyos/configsession.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2022-05-26 17:35:57 +0300
committerGitHub <noreply@github.com>2022-05-26 17:35:57 +0300
commitf2bc9448f8fbb65382128853d79f46e25e1f7909 (patch)
treea3493dad283451d7cc3f5067e02278268ebd49ec /python/vyos/configsession.py
parent9854c72dfc8c88c9b1c0b21637091216aed94baa (diff)
parentd15af8e9fdc32bd2e3471a300d9cf32e8eff00a0 (diff)
downloadvyos-1x-f2bc9448f8fbb65382128853d79f46e25e1f7909.tar.gz
vyos-1x-f2bc9448f8fbb65382128853d79f46e25e1f7909.zip
Merge pull request #1335 from sever-sever/T4442-equ
http-api: T4442: Add action reset
Diffstat (limited to 'python/vyos/configsession.py')
-rw-r--r--python/vyos/configsession.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index 670e6c7fc..d2645e5e1 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -1,5 +1,5 @@
# configsession -- the write API for the VyOS running config
-# Copyright (C) 2019 VyOS maintainers and contributors
+# Copyright (C) 2019-2022 VyOS maintainers and contributors
#
# This library is free software; you can redistribute it and/or modify it under the terms of
# the GNU Lesser General Public License as published by the Free Software Foundation;
@@ -33,6 +33,7 @@ INSTALL_IMAGE = ['/opt/vyatta/sbin/install-image', '--url']
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']
+RESET = ['/opt/vyatta/bin/vyatta-op-cmd-wrapper', 'reset']
# Default "commit via" string
APP = "vyos-http-api"
@@ -201,3 +202,6 @@ class ConfigSession(object):
out = self.__run_command(SHOW + path)
return out
+ def reset(self, path):
+ out = self.__run_command(RESET + path)
+ return out