summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-tunnel.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-23 12:57:34 +0100
committerGitHub <noreply@github.com>2020-03-23 12:57:34 +0100
commit52e20fa562968dcfd7b524031f0cad2b6f4fff57 (patch)
tree8adba1fa5916b47a65b1b77f4b490e0b1fe6d1ae /src/conf_mode/interfaces-tunnel.py
parentcefed7ae3fbbb93142051633ff00d3a9e19889c0 (diff)
parent193d0f416807b3eb5980dcf209e93774282b85f3 (diff)
downloadvyos-1x-52e20fa562968dcfd7b524031f0cad2b6f4fff57.tar.gz
vyos-1x-52e20fa562968dcfd7b524031f0cad2b6f4fff57.zip
Merge pull request #258 from thomas-mangin/31-vrf
tunnel: T31: fix vrf deletion, add support for vrf on tunnels
Diffstat (limited to 'src/conf_mode/interfaces-tunnel.py')
-rwxr-xr-xsrc/conf_mode/interfaces-tunnel.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py
index 8c2b3917d..90c1f8f71 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)