summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-10-07 13:35:58 +0300
committerJohn Estabrook <jestabro@vyos.io>2024-10-07 13:31:06 -0500
commitd979117ff9988a2633471202b8be8ca4a0d1a923 (patch)
treebe70fe25bd04764f8ab23e27575921a0fb102783
parent2f554aee334c8e52f1a22ea16acf9479d9812ea6 (diff)
downloadvyos-1x-d979117ff9988a2633471202b8be8ca4a0d1a923.tar.gz
vyos-1x-d979117ff9988a2633471202b8be8ca4a0d1a923.zip
vyos.configtree: T4318: Allow set tag flag to true or false
-rw-r--r--python/vyos/configtree.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/configtree.py b/python/vyos/configtree.py
index ee8ca8b83..3e02fbba6 100644
--- a/python/vyos/configtree.py
+++ b/python/vyos/configtree.py
@@ -141,7 +141,7 @@ class ConfigTree(object):
self.__is_tag.restype = c_int
self.__set_tag = self.__lib.set_tag
- self.__set_tag.argtypes = [c_void_p, c_char_p]
+ self.__set_tag.argtypes = [c_void_p, c_char_p, c_bool]
self.__set_tag.restype = c_int
self.__is_leaf = self.__lib.is_leaf
@@ -359,11 +359,11 @@ class ConfigTree(object):
else:
return False
- def set_tag(self, path):
+ def set_tag(self, path, value=True):
check_path(path)
path_str = " ".join(map(str, path)).encode()
- res = self.__set_tag(self.__config, path_str)
+ res = self.__set_tag(self.__config, path_str, value)
if (res == 0):
return True
else: