From 53b2194a6431139b612ff4ab45d88fd8080ec8af Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Sun, 6 Aug 2023 18:24:09 -0500 Subject: T5434: use merge_defaults in service_console-server.py --- src/conf_mode/service_console-server.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/conf_mode/service_console-server.py b/src/conf_mode/service_console-server.py index 7eb41ea87..b112add3f 100755 --- a/src/conf_mode/service_console-server.py +++ b/src/conf_mode/service_console-server.py @@ -20,10 +20,8 @@ from sys import exit from psutil import process_iter from vyos.config import Config -from vyos.configdict import dict_merge from vyos.template import render from vyos.utils.process import call -from vyos.xml import defaults from vyos import ConfigError config_file = '/run/conserver/conserver.cf' @@ -49,11 +47,7 @@ def get_config(config=None): # We have gathered the dict representation of the CLI, but there are default # options which we need to update into the dictionary retrived. - default_values = defaults(base + ['device']) - if 'device' in proxy: - for device in proxy['device']: - tmp = dict_merge(default_values, proxy['device'][device]) - proxy['device'][device] = tmp + proxy = conf.merge_defaults(proxy, recursive=True) return proxy -- cgit v1.2.3