summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-22 22:35:21 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-22 22:35:21 +0200
commitaa1a2ea7d03843120da50bf98584927098bcfa6d (patch)
treef4c06386efd6d97c5d6497938d9dca12a1a88386 /src
parenta8ae4f46a5d0e059f2ca1181c7730b81179160f8 (diff)
parent46f4aa47cc62ca05bef4e4cca614ed77065608e7 (diff)
downloadvyos-1x-aa1a2ea7d03843120da50bf98584927098bcfa6d.tar.gz
vyos-1x-aa1a2ea7d03843120da50bf98584927098bcfa6d.zip
Merge branch 'default-dict' of github.com:c-po/vyos-1x into current
* 'default-dict' of github.com:c-po/vyos-1x: console-server: T2588: migrate to defaults from XML interface definitions xml: T2588: add gitignore for generated defaults xml: T2588: code to extract defaults values from xml Debian: remove duplicate build dependency xml: ssh: fix typo in service description
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/service_console-server.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/conf_mode/service_console-server.py b/src/conf_mode/service_console-server.py
index 7f6967983..ace6b8ca4 100755
--- a/src/conf_mode/service_console-server.py
+++ b/src/conf_mode/service_console-server.py
@@ -22,17 +22,11 @@ from vyos.config import Config
from vyos.configdict import dict_merge
from vyos.template import render
from vyos.util import call
+from vyos.xml import defaults
from vyos import ConfigError
config_file = r'/run/conserver/conserver.cf'
-# Default values are necessary until the implementation of T2588 is completed
-default_values = {
- 'data_bits': '8',
- 'parity': 'none',
- 'stop_bits': '1'
-}
-
def get_config():
conf = Config()
base = ['service', 'console-server']
@@ -52,6 +46,7 @@ def get_config():
# 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'])
for device in proxy['device'].keys():
tmp = dict_merge(default_values, proxy['device'][device])
proxy['device'][device] = tmp