From 3114c7ccbdf867f9cdaa436792937b16ea4d85bf Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 22 Sep 2021 08:18:42 +0200 Subject: vrrp: keepalived: T3847: enable no_tag_node_value_mangle for get_config_dict() Commit 761631d6 ("vrrp: keepalived: T3847: migrate to get_config_dict()") switched to the new python function get_config_dict(), when we deal with tag nodes that can contain a hyphen, we should also set no_tag_node_value_mangle in order to preserve it. This caused a dict lookup error as the hyphens in the test scripts got replaced by an _. --- src/conf_mode/vrrp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/conf_mode/vrrp.py b/src/conf_mode/vrrp.py index ffe9dd276..e8f1c1f99 100755 --- a/src/conf_mode/vrrp.py +++ b/src/conf_mode/vrrp.py @@ -43,7 +43,8 @@ def get_config(config=None): if not conf.exists(base): return None - vrrp = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) + vrrp = conf.get_config_dict(base, key_mangling=('-', '_'), + get_first_key=True, no_tag_node_value_mangle=True) # We have gathered the dict representation of the CLI, but there are default # options which we need to update into the dictionary retrived. if 'group' in vrrp: -- cgit v1.2.3