diff options
author | John Estabrook <jestabro@vyos.io> | 2023-12-10 15:27:35 -0600 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-12 15:51:15 +0000 |
commit | 9c53c3e95e3d7076bc3e1dd5a32a3b2e15bae4be (patch) | |
tree | 9406ff02b12e2e6ec6b37714e0df90b5143d6f7e /python/vyos/configtree.py | |
parent | bc460276da84c14b4cb541f28f87fb8a96867611 (diff) | |
download | vyos-1x-9c53c3e95e3d7076bc3e1dd5a32a3b2e15bae4be.tar.gz vyos-1x-9c53c3e95e3d7076bc3e1dd5a32a3b2e15bae4be.zip |
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.
(cherry picked from commit 7e4caa118692d9b6fd798783596bd018f805e5eb)
Diffstat (limited to 'python/vyos/configtree.py')
-rw-r--r-- | python/vyos/configtree.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |