From f71a7461e44a98e862810bed3d0b9d280ee5dae0 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Mon, 23 Mar 2020 02:35:46 +0000 Subject: tunnel: T31: add support for vrf on tunnels --- src/conf_mode/interfaces-tunnel.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/conf_mode/interfaces-tunnel.py') diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py index 67b58719b..3d4f26374 100755 --- a/src/conf_mode/interfaces-tunnel.py +++ b/src/conf_mode/interfaces-tunnel.py @@ -129,6 +129,7 @@ class ConfigurationState (Config): default_config_data = { # interface definition + 'vrf': '', 'addresses-add': [], 'addresses-del': [], 'state': 'up', @@ -180,6 +181,7 @@ mapping = { 'dhcp-interface': ('dhcp-interface', False, None), 'state': ('disable', False, 'down'), 'link_detect': ('disable-link-detect', False, 2), + 'vrf': ('vrf', False, None), 'addresses-add': ('address', True, None), } @@ -326,7 +328,7 @@ def verify(conf): # what are the tunnel options we can set / modified / deleted kls = get_class(options) - valid = kls.updates + ['alias', 'addresses-add', 'addresses-del'] + valid = kls.updates + ['alias', 'addresses-add', 'addresses-del', 'vrf'] if changes['section'] == 'create': valid.extend(['type',]) @@ -466,7 +468,7 @@ def apply(conf): tunnel.set_interface(option, options[option]) # set other interface properties - for option in ('alias', 'mtu', 'link_detect', 'multicast', 'allmulticast'): + for option in ('alias', 'mtu', 'link_detect', 'multicast', 'allmulticast', 'vrf'): tunnel.set_interface(option, options[option]) # Configure interface address(es) -- cgit v1.2.3