From 7e4caa118692d9b6fd798783596bd018f805e5eb Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Sun, 10 Dec 2023 15:27:35 -0600 Subject: load-config: T5815: provide a variety of load config methods Collect in a module several versions of a 'load config' function. They have different use cases according to performance and error reporting, and allow comparison of non-legacy and legacy variants. --- python/vyos/configtree.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/vyos/configtree.py') diff --git a/python/vyos/configtree.py b/python/vyos/configtree.py index 09cfd43d3..d048901f0 100644 --- a/python/vyos/configtree.py +++ b/python/vyos/configtree.py @@ -160,6 +160,9 @@ class ConfigTree(object): def _get_config(self): return self.__config + def get_version_string(self): + return self.__version + def to_string(self, ordered_values=False): config_string = self.__to_string(self.__config, ordered_values).decode() config_string = "{0}\n{1}".format(config_string, self.__version) -- cgit v1.2.3