diff options
author | John Estabrook <jestabro@vyos.io> | 2023-07-28 11:04:20 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-07-28 11:04:20 -0500 |
commit | e310cb6e194bdd67d2e3dcf2fb645382f7049a79 (patch) | |
tree | 3eea565bd0c9264b7825147619b495d908b0cb47 /python/vyos | |
parent | 2015717bdc879e2a598984f60835d8e5710d721e (diff) | |
download | vyos-1x-e310cb6e194bdd67d2e3dcf2fb645382f7049a79.tar.gz vyos-1x-e310cb6e194bdd67d2e3dcf2fb645382f7049a79.zip |
configtree: T5316: use single-pass to drop trim function
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/configtree.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/python/vyos/configtree.py b/python/vyos/configtree.py index d0cd87464..e18d9817d 100644 --- a/python/vyos/configtree.py +++ b/python/vyos/configtree.py @@ -418,10 +418,6 @@ class DiffTree: self.__diff_tree.argtypes = [c_char_p, c_void_p, c_void_p] self.__diff_tree.restype = c_void_p - self.__trim_tree = self.__lib.trim_tree - self.__trim_tree.argtypes = [c_void_p, c_void_p] - self.__trim_tree.restype = c_void_p - check_path(path) path_str = " ".join(map(str, path)).encode() @@ -435,11 +431,7 @@ class DiffTree: self.add = self.full.get_subtree(['add']) self.sub = self.full.get_subtree(['sub']) self.inter = self.full.get_subtree(['inter']) - - # trim sub(-tract) tree to get delete tree for commands - ref = self.right.get_subtree(path, with_node=True) if path else self.right - res = self.__trim_tree(self.sub._get_config(), ref._get_config()) - self.delete = ConfigTree(address=res) + self.delete = self.full.get_subtree(['del']) def to_commands(self): add = self.add.to_commands() |