summaryrefslogtreecommitdiff
path: root/src/conf_mode/vrf.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2023-01-06 08:14:44 +0100
committerChristian Poessinger <christian@poessinger.com>2023-01-06 08:14:44 +0100
commite32ce63b52eff0255d602b475d90cd97d3b282c1 (patch)
tree4a7f6006374265f40bc3bac4774885ba716dd82d /src/conf_mode/vrf.py
parent5e474ec9c6c7c6fff2a8f1597c16443ec582d4dd (diff)
downloadvyos-1x-e32ce63b52eff0255d602b475d90cd97d3b282c1.tar.gz
vyos-1x-e32ce63b52eff0255d602b475d90cd97d3b282c1.zip
static: T4883: fix KeyError: 'table'
Commit dafb0da2 ("static: T4883: add a description field for routing tables") added an iproute2 description table but lacked checking if the key exists. This has been fixed and also converted to Jinja2 to keep the "common" style inside the routing protocols. It might feel overengineered indeed.
Diffstat (limited to 'src/conf_mode/vrf.py')
-rwxr-xr-xsrc/conf_mode/vrf.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index 1b4156895..c17cca3bd 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2020-2022 VyOS maintainers and contributors
+# Copyright (C) 2020-2023 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -140,11 +140,9 @@ def verify(vrf):
def generate(vrf):
- render(config_file, 'vrf/vrf.conf.j2', vrf)
+ render(config_file, 'iproute2/vrf.conf.j2', vrf)
# Render nftables zones config
-
render(nft_vrf_config, 'firewall/nftables-vrf-zones.j2', vrf)
-
return None