summaryrefslogtreecommitdiff
path: root/python/vyos/config.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-08-23 22:05:31 -0500
committerJohn Estabrook <jestabro@vyos.io>2023-08-23 22:05:31 -0500
commite4831c7ac93c50d80e0bad4b66c034030ad0bce9 (patch)
tree434b94b78d47fea392f070a8c3edef93ee0a48ed /python/vyos/config.py
parentbf7e94a6606c9245721194b7d5c18c24a9f8baef (diff)
downloadvyos-1x-e4831c7ac93c50d80e0bad4b66c034030ad0bce9.tar.gz
vyos-1x-e4831c7ac93c50d80e0bad4b66c034030ad0bce9.zip
save-config: T4292: rewrite vyatta-save-config.pl to Python
Diffstat (limited to 'python/vyos/config.py')
-rw-r--r--python/vyos/config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/vyos/config.py b/python/vyos/config.py
index 6fececd76..0ca41718f 100644
--- a/python/vyos/config.py
+++ b/python/vyos/config.py
@@ -113,6 +113,11 @@ class Config(object):
(self._running_config,
self._session_config) = self._config_source.get_configtree_tuple()
+ def get_config_tree(self, effective=False):
+ if effective:
+ return self._running_config
+ return self._session_config
+
def _make_path(self, path):
# Backwards-compatibility stuff: original implementation used string paths
# libvyosconfig paths are lists, but since node names cannot contain whitespace,