From 2d191496e2750b633f1fc41810c0044a97498278 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Sun, 6 Aug 2023 18:22:40 -0500 Subject: T5434: use merge_defaults in service_config_sync.py --- src/conf_mode/service_config_sync.py | 10 ++-------- 1 file 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 -- cgit v1.2.3