When using key_mangling=('-', '_') the processor in the background will alter tagnodes and replace any - by _ which will cause faulty behavior as the data becomes invalid!
[email protected]# show system ntp server 172.16.100.10 { } server 172.16.100.20 { } server 172.16.110.30 { } +server foo-bar.vyos.net { + prefer +}
>>> from vyos.config import Config >>> conf = Config() >>> conf.get_config_dict(['system','ntp'], key_mangling=('-', '_')) {'ntp': {'server': {'172.16.100.10': {}, '172.16.100.20': {}, '172.16.110.30': {}, 'foo_bar.vyos.net': {'prefer': {}}}}} >>> conf.get_config_dict(['system','ntp']) {'ntp': {'server': {'172.16.100.10': {}, '172.16.100.20': {}, '172.16.110.30': {}, 'foo-bar.vyos.net': {'prefer': {}}}}}
Workaround: https://github.com/vyos/vyos-1x/pull/511/files