diff options
author | John Estabrook <jestabro@vyos.io> | 2023-08-06 20:56:01 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-08-07 14:46:42 -0500 |
commit | 76c5bf9d9ccaa31d43598956c1e2c9b4ceafa010 (patch) | |
tree | 5f9dafbf605779ce51a915c34e8e14ed9a3266b7 | |
parent | e4f6495598d60a41963cf2e6f29fa4743af4a036 (diff) | |
download | vyos-1x-76c5bf9d9ccaa31d43598956c1e2c9b4ceafa010.tar.gz vyos-1x-76c5bf9d9ccaa31d43598956c1e2c9b4ceafa010.zip |
T5434: use auto-defaults in tftp_server.py
-rwxr-xr-x | src/conf_mode/tftp_server.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/conf_mode/tftp_server.py b/src/conf_mode/tftp_server.py index 32882fc12..3ad346e2e 100755 --- a/src/conf_mode/tftp_server.py +++ b/src/conf_mode/tftp_server.py @@ -24,14 +24,12 @@ from sys import exit from vyos.base import Warning from vyos.config import Config -from vyos.configdict import dict_merge from vyos.configverify import verify_vrf from vyos.template import render from vyos.template import is_ipv4 from vyos.utils.process import call from vyos.utils.permission import chmod_755 from vyos.utils.network import is_addr_assigned -from vyos.xml import defaults from vyos import ConfigError from vyos import airbag airbag.enable() @@ -48,11 +46,9 @@ def get_config(config=None): if not conf.exists(base): return None - tftpd = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) - # 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) - tftpd = dict_merge(default_values, tftpd) + tftpd = conf.get_config_dict(base, key_mangling=('-', '_'), + get_first_key=True, + with_recursive_defaults=True) return tftpd def verify(tftpd): |