diff options
author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-03-23 02:35:46 +0000 |
---|---|---|
committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-03-23 04:14:21 +0000 |
commit | f71a7461e44a98e862810bed3d0b9d280ee5dae0 (patch) | |
tree | cc3e0e36146821045133a36ed0c23957dc951990 /src/conf_mode/interfaces-tunnel.py | |
parent | f06d9b22a6d9b355b4faa0271d31d4c2f58369a7 (diff) | |
download | vyos-1x-f71a7461e44a98e862810bed3d0b9d280ee5dae0.tar.gz vyos-1x-f71a7461e44a98e862810bed3d0b9d280ee5dae0.zip |
tunnel: T31: add support for vrf on tunnels
Diffstat (limited to 'src/conf_mode/interfaces-tunnel.py')
-rwxr-xr-x | src/conf_mode/interfaces-tunnel.py | 6 |
1 files changed, 4 insertions, 2 deletions
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) |