diff options
author | John Estabrook <jestabro@vyos.io> | 2023-08-06 20:11:08 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-08-07 14:46:42 -0500 |
commit | bc3dfed3bb2d479deaf803b0ae8b781b958af8bb (patch) | |
tree | 3c3482dc6d1cae2992696195c250795c1a23f09e /src/conf_mode/system-ip.py | |
parent | 952e79254da20e61a02d76711e94780a7264a59a (diff) | |
download | vyos-1x-bc3dfed3bb2d479deaf803b0ae8b781b958af8bb.tar.gz vyos-1x-bc3dfed3bb2d479deaf803b0ae8b781b958af8bb.zip |
T5434: use auto-defaults in system-ip.py
Diffstat (limited to 'src/conf_mode/system-ip.py')
-rwxr-xr-x | src/conf_mode/system-ip.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/conf_mode/system-ip.py b/src/conf_mode/system-ip.py index cca996e4f..63dff0e36 100755 --- a/src/conf_mode/system-ip.py +++ b/src/conf_mode/system-ip.py @@ -24,7 +24,6 @@ from vyos.utils.process import call from vyos.utils.dict import dict_search from vyos.utils.file import write_file from vyos.utils.system import sysctl_write -from vyos.xml import defaults from vyos import ConfigError from vyos import frr from vyos import airbag @@ -37,11 +36,9 @@ def get_config(config=None): conf = Config() base = ['system', 'ip'] - opt = 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) - opt = dict_merge(default_values, opt) + opt = conf.get_config_dict(base, key_mangling=('-', '_'), + get_first_key=True, + with_recursive_defaults=True) # When working with FRR we need to know the corresponding address-family opt['afi'] = 'ip' |