summaryrefslogtreecommitdiff
path: root/python/vyos/xml_ref/__init__.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-06-24 08:07:44 -0500
committerGitHub <noreply@github.com>2023-06-24 08:07:44 -0500
commitf932180f70d3c6cbdfd500d7db1d831ac6ad6221 (patch)
tree08bad3e25a755dceff3b14ea3549e65cf599e82e /python/vyos/xml_ref/__init__.py
parentce37b953771ac5c1f81c437160e1d49a39c1dd37 (diff)
parentd19e7e5ce633f42f2a084ebd17e8c1e3dfef6b03 (diff)
downloadvyos-1x-f932180f70d3c6cbdfd500d7db1d831ac6ad6221.tar.gz
vyos-1x-f932180f70d3c6cbdfd500d7db1d831ac6ad6221.zip
Merge pull request #2010 from jestabro/revise-config-dict
config: T5228: simplify get_config_dict and add argument with_defaults
Diffstat (limited to 'python/vyos/xml_ref/__init__.py')
-rw-r--r--python/vyos/xml_ref/__init__.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/python/vyos/xml_ref/__init__.py b/python/vyos/xml_ref/__init__.py
index 2e144ef10..62d3680a1 100644
--- a/python/vyos/xml_ref/__init__.py
+++ b/python/vyos/xml_ref/__init__.py
@@ -58,12 +58,15 @@ def get_defaults(path: list, get_first_key=False, recursive=False) -> dict:
return load_reference().get_defaults(path, get_first_key=get_first_key,
recursive=recursive)
-def get_config_defaults(rpath: list, conf: dict, get_first_key=False,
- recursive=False) -> dict:
+def relative_defaults(rpath: list, conf: dict, get_first_key=False,
+ recursive=False) -> dict:
- return load_reference().relative_defaults(rpath, conf=conf,
+ return load_reference().relative_defaults(rpath, conf,
get_first_key=get_first_key,
recursive=recursive)
-def merge_defaults(path: list, conf: dict) -> dict:
- return load_reference().merge_defaults(path, conf)
+def merge_defaults(path: list, conf: dict, get_first_key=False,
+ recursive=False) -> dict:
+ return load_reference().merge_defaults(path, conf,
+ get_first_key=get_first_key,
+ recursive=recursive)