diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-06-27 15:05:42 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-06-27 15:05:42 +0200 |
commit | 9d2e6cfec3722f421e21fe971534995757e72701 (patch) | |
tree | bb8717f6a68b8a3cdab7d00e425f4d4faf3bbc19 /python/vyos/xml/__init__.py | |
parent | 4aca048919b2237ce065bf22a775d782e780ff5a (diff) | |
parent | 3977fe705b0155ef380e3522201b812fa2149f76 (diff) | |
download | vyos-1x-9d2e6cfec3722f421e21fe971534995757e72701.tar.gz vyos-1x-9d2e6cfec3722f421e21fe971534995757e72701.zip |
Merge branch 'T2656' of https://github.com/thomas-mangin/vyos-1x into current
* 'T2656' of https://github.com/thomas-mangin/vyos-1x:
xml: T2656: option to not flatten the default dict
Diffstat (limited to 'python/vyos/xml/__init__.py')
-rw-r--r-- | python/vyos/xml/__init__.py | 9 |
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)) |