From 6b5f0dd5e59b4e0b0170a087a50bfd61bc5f14ac Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sun, 16 Jun 2019 10:51:07 +0200 Subject: T1432: add a discard function to vyos.configsession --- python/vyos/configsession.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python') 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]) -- cgit v1.2.3