diff options
author | John Estabrook <jestabro@vyos.io> | 2020-08-30 08:22:32 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2020-08-30 09:56:46 -0500 |
commit | b40c52682a25664f7018ab8b4e5ba6f467f10d17 (patch) | |
tree | f582fdaf8c0aa5ce769d63ab54518233fa2fb4bc /python/vyos/xml/__init__.py | |
parent | bab1534e0fc1e6da538414b8b032342eb2598f03 (diff) | |
download | vyos-1x-b40c52682a25664f7018ab8b4e5ba6f467f10d17.tar.gz vyos-1x-b40c52682a25664f7018ab8b4e5ba6f467f10d17.zip |
config: T2636: get_config_dict() returns a list on multi node by default
Unless no_multi_convert is True, a single valued multi node will be
returned as a list by get_config_dict(). Modification of Thomas Mangin's
version.
Diffstat (limited to 'python/vyos/xml/__init__.py')
-rw-r--r-- | python/vyos/xml/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/vyos/xml/__init__.py b/python/vyos/xml/__init__.py index 0f914fed2..0ef0c85ce 100644 --- a/python/vyos/xml/__init__.py +++ b/python/vyos/xml/__init__.py @@ -51,6 +51,10 @@ def defaults(lpath, flat=False): return load_configuration().defaults(lpath, flat) +def multi_to_list(lpath, conf): + return load_configuration().multi_to_list(lpath, conf) + + if __name__ == '__main__': print(defaults(['service'], flat=True)) print(defaults(['service'], flat=False)) |