summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-06-16 10:51:07 +0200
committerDaniil Baturin <daniil@baturin.org>2019-06-16 10:51:07 +0200
commit6b5f0dd5e59b4e0b0170a087a50bfd61bc5f14ac (patch)
tree499de43a6dd17eea5363423e5be6a00b64aaa93c
parentadaa9b78e2fb0c7da58ca6c09934b3e3cff44795 (diff)
downloadvyos-1x-6b5f0dd5e59b4e0b0170a087a50bfd61bc5f14ac.tar.gz
vyos-1x-6b5f0dd5e59b4e0b0170a087a50bfd61bc5f14ac.zip
T1432: add a discard function to vyos.configsession
-rw-r--r--python/vyos/configsession.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index c84d80a77..a27470eeb 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -21,7 +21,9 @@ SET = '/opt/vyatta/sbin/my_set'
DELETE = '/opt/vyatta/sbin/my_delete'
COMMENT = '/opt/vyatta/sbin/my_comment'
COMMIT = '/opt/vyatta/sbin/my_commit'
+DISCARD = '/opt/vyatta/sbin/my_discard'
+# Default "commit via" string
APP = "vyos-api"
@@ -95,3 +97,6 @@ class ConfigSession(object):
def commit(self):
self.__run_command([COMMIT])
+
+ def discard(self):
+ self.__run_command([DISCARD])