From d979117ff9988a2633471202b8be8ca4a0d1a923 Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Mon, 7 Oct 2024 13:35:58 +0300 Subject: vyos.configtree: T4318: Allow set tag flag to true or false --- python/vyos/configtree.py | 6 +++--- 1 file 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: -- cgit v1.2.3