summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-24 19:27:45 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-24 19:27:45 +0100
commit73cc357b757eb6129db286709812996ebcc4fd19 (patch)
tree365e994f15d38586c635b6de7bef669f932f5fb3 /src
parente4f22fbb5133a00e4b087ef602f4b84c60b0f295 (diff)
downloadvyos-1x-73cc357b757eb6129db286709812996ebcc4fd19.tar.gz
vyos-1x-73cc357b757eb6129db286709812996ebcc4fd19.zip
ospf(v3): T3236: T3244: adjust to route-map converted name (_ for -)
A hyphen in a route-map name will be converted to _, take care about this effect during validation.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_ospf.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py
index 9842d26cd..7c0ffbd27 100755
--- a/src/conf_mode/protocols_ospf.py
+++ b/src/conf_mode/protocols_ospf.py
@@ -94,6 +94,13 @@ def get_config(config=None):
ospf['area'][area]['virtual_link'][virtual_link] = dict_merge(
default_values, ospf['area'][area]['virtual_link'][virtual_link])
+ # We also need some additional information from the config, prefix-lists
+ # and route-maps for instance. They will be used in verify()
+ base = ['policy']
+ tmp = conf.get_config_dict(base, key_mangling=('-', '_'))
+ # Merge policy dict into OSPF dict
+ ospf = dict_merge(tmp, ospf)
+
return ospf
def verify(ospf):