summaryrefslogtreecommitdiff
path: root/python/vyos/xml/__init__.py
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-06-27 13:47:52 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-06-27 13:47:52 +0100
commit3977fe705b0155ef380e3522201b812fa2149f76 (patch)
tree2dcfa977bdf69ee0144ac432d100b4b94ac1ece8 /python/vyos/xml/__init__.py
parent1d97d52120eaa33a3c2edb39e966002dab7f9576 (diff)
downloadvyos-1x-3977fe705b0155ef380e3522201b812fa2149f76.tar.gz
vyos-1x-3977fe705b0155ef380e3522201b812fa2149f76.zip
xml: T2656: option to not flatten the default dict
Diffstat (limited to 'python/vyos/xml/__init__.py')
-rw-r--r--python/vyos/xml/__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/python/vyos/xml/__init__.py b/python/vyos/xml/__init__.py
index 52f5bfb38..bda8c96c5 100644
--- a/python/vyos/xml/__init__.py
+++ b/python/vyos/xml/__init__.py
@@ -35,5 +35,10 @@ def load_configuration(cache=[]):
return xml
-def defaults(lpath):
- return load_configuration().defaults(lpath)
+def defaults(lpath, flat=True):
+ return load_configuration().defaults(lpath, flat)
+
+
+if __name__ == '__main__':
+ print(defaults(['service'], flat=True))
+ print(defaults(['service'], flat=False))