diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/config_mgmt.py | 6 | ||||
| -rw-r--r-- | python/vyos/configtree.py | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/python/vyos/config_mgmt.py b/python/vyos/config_mgmt.py index 0dbfcc504..6bc9ff333 100644 --- a/python/vyos/config_mgmt.py +++ b/python/vyos/config_mgmt.py @@ -37,7 +37,7 @@ from vyos.configtree import ConfigTree from vyos.configtree import ConfigTreeError from vyos.configsession import ConfigSession from vyos.configsession import ConfigSessionError -from vyos.configtree import show_diff +from vyos.configtree import diff_compare from vyos.load_config import load from vyos.load_config import LoadConfigError from vyos.defaults import directories @@ -413,9 +413,9 @@ Proceed ?""" path = [] if commands else self.edit_path try: if commands: - out = show_diff(ct1, ct2, path=path, commands=True) + out = diff_compare(ct1, ct2, path=path, commands=True) else: - out = show_diff(ct1, ct2, path=path) + out = diff_compare(ct1, ct2, path=path) except ConfigTreeError as e: return e, 1 diff --git a/python/vyos/configtree.py b/python/vyos/configtree.py index e6ea4b40d..e57cd5205 100644 --- a/python/vyos/configtree.py +++ b/python/vyos/configtree.py @@ -473,7 +473,7 @@ class ConfigTree(object): return subt -def show_diff(left, right, path=[], commands=False, libpath=LIBPATH): +def diff_compare(left, right, path=[], commands=False, libpath=LIBPATH): if left is None: left = ConfigTree(config_string='\n') if right is None: @@ -488,14 +488,14 @@ def show_diff(left, right, path=[], commands=False, libpath=LIBPATH): path_str = ' '.join(map(str, path)).encode() __lib = cdll.LoadLibrary(libpath) - __show_diff = __lib.show_diff - __show_diff.argtypes = [c_bool, c_char_p, c_void_p, c_void_p] - __show_diff.restype = c_char_p + __diff_compare = __lib.diff_compare + __diff_compare.argtypes = [c_bool, c_char_p, c_void_p, c_void_p] + __diff_compare.restype = c_char_p __get_error = __lib.get_error __get_error.argtypes = [] __get_error.restype = c_char_p - res = __show_diff(commands, path_str, left._get_config(), right._get_config()) + res = __diff_compare(commands, path_str, left._get_config(), right._get_config()) res = res.decode() if res == '#1@': msg = __get_error().decode() |
