summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-08-06 18:22:40 -0500
committerJohn Estabrook <jestabro@vyos.io>2023-08-07 14:46:42 -0500
commit2d191496e2750b633f1fc41810c0044a97498278 (patch)
treefcff072e64c05015aa27961a96410028ce598a7d
parentea0a3929722770b2d2df045c34f3487441e5e104 (diff)
downloadvyos-1x-2d191496e2750b633f1fc41810c0044a97498278.tar.gz
vyos-1x-2d191496e2750b633f1fc41810c0044a97498278.zip
T5434: use merge_defaults in service_config_sync.py
-rwxr-xr-xsrc/conf_mode/service_config_sync.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/conf_mode/service_config_sync.py b/src/conf_mode/service_config_sync.py
index 5cde735a1..4b8a7f6ee 100755
--- a/src/conf_mode/service_config_sync.py
+++ b/src/conf_mode/service_config_sync.py
@@ -19,8 +19,6 @@ import json
from pathlib import Path
from vyos.config import Config
-from vyos.configdict import dict_merge
-from vyos.xml import defaults
from vyos import ConfigError
from vyos import airbag
@@ -42,12 +40,8 @@ def get_config(config=None):
base = ['service', 'config-sync']
if not conf.exists(base):
return None
- config = conf.get_config_dict(base,
- get_first_key=True,
- no_tag_node_value_mangle=True)
-
- default_values = defaults(base)
- config = dict_merge(default_values, config)
+ config = conf.get_config_dict(base, get_first_key=True,
+ with_recursive_defaults=True)
return config