summaryrefslogtreecommitdiff
path: root/src/conf_mode/system_console.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-08-06 20:08:53 -0500
committerJohn Estabrook <jestabro@vyos.io>2023-08-07 14:46:42 -0500
commit952e79254da20e61a02d76711e94780a7264a59a (patch)
tree3e2ffcd438323ca0dcb5256c347271f896323d39 /src/conf_mode/system_console.py
parentec30a443353293e97de3e60598a2aca06f0e082d (diff)
downloadvyos-1x-952e79254da20e61a02d76711e94780a7264a59a.tar.gz
vyos-1x-952e79254da20e61a02d76711e94780a7264a59a.zip
T5319: remove workarounds for defaults in system_console.py
Diffstat (limited to 'src/conf_mode/system_console.py')
-rwxr-xr-xsrc/conf_mode/system_console.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/conf_mode/system_console.py b/src/conf_mode/system_console.py
index 87d587959..ebf9a113b 100755
--- a/src/conf_mode/system_console.py
+++ b/src/conf_mode/system_console.py
@@ -19,12 +19,10 @@ import re
from pathlib import Path
from vyos.config import Config
-from vyos.configdict import dict_merge
from vyos.utils.process import call
from vyos.utils.file import read_file
from vyos.utils.file import write_file
from vyos.template import render
-from vyos.xml import defaults
from vyos import ConfigError
from vyos import airbag
airbag.enable()
@@ -45,16 +43,12 @@ def get_config(config=None):
if 'device' not in console:
return console
- # convert CLI values to system values
- default_values = defaults(base + ['device'])
for device, device_config in console['device'].items():
if 'speed' not in device_config and device.startswith('hvc'):
# XEN console has a different default console speed
console['device'][device]['speed'] = 38400
- else:
- # Merge in XML defaults - the proper way to do it
- console['device'][device] = dict_merge(default_values,
- console['device'][device])
+
+ console = conf.merge_defaults(console, recursive=True)
return console