diff options
author | John Estabrook <jestabro@vyos.io> | 2023-12-10 15:27:35 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-12-11 12:08:35 -0600 |
commit | 7e4caa118692d9b6fd798783596bd018f805e5eb (patch) | |
tree | ddcf21bc559a463b20b977027c3161a0c8db30cb /python/vyos/configtree.py | |
parent | f82f1ca1bc55fe75aa6495fe89dbe597055742b5 (diff) | |
download | vyos-1x-7e4caa118692d9b6fd798783596bd018f805e5eb.tar.gz vyos-1x-7e4caa118692d9b6fd798783596bd018f805e5eb.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.
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) |