summaryrefslogtreecommitdiff
path: root/python/vyos/configverify.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-27 16:04:38 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-28 00:54:37 +0100
commit8f100189086102458ff8e4f61f842cf44a6bf8aa (patch)
tree3dd2e6ddacfd8b125f1665db24f8886805936e87 /python/vyos/configverify.py
parent8bdf5b5216ddafdcee067b5bb8e15f18799c6fe5 (diff)
downloadvyos-1x-8f100189086102458ff8e4f61f842cf44a6bf8aa.tar.gz
vyos-1x-8f100189086102458ff8e4f61f842cf44a6bf8aa.zip
tunnel: T3364: rename encapsulation mode "gre-bridge" to "gretap"
The following list shows the mapping of VyOS tunnel encapsulation modes to the corresponding Linux modes. VyOS Linux gre gre gre-bridge gretap ipip ipip ipip6 ipip6 ip6ip6 ip6ip6 ip6gre ip6gre sit sit Besides gre-bridge this is pretty consistent. As bridge interfaces are also called tap interfaces gre-bridge will be renamed to gretap to make the post-processing much easier. This means (in detail) that there are no more child classes of _Tunnel and there will be now one geneirc TunnelIf class handling all sorts of encapsulation.
Diffstat (limited to 'python/vyos/configverify.py')
-rw-r--r--python/vyos/configverify.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index 7be78b94b..8286a735c 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -124,10 +124,11 @@ def verify_tunnel(config):
if 'remote_ip' in config and not is_ipv4(config['remote_ip']):
raise ConfigError(f'{error_ipv4} remote-ip')
- if config['encapsulation'] in ['sit', 'gre-bridge']:
+ if config['encapsulation'] in ['sit', 'gretap']:
if 'source_interface' in config:
- raise ConfigError('Option source-interface can not be used with ' \
- 'encapsulation "sit" or "gre-bridge"')
+ encapsulation = config['encapsulation']
+ raise ConfigError(f'Option source-interface can not be used with ' \
+ f'encapsulation "{encapsulation}"!')
elif config['encapsulation'] == 'gre':
if 'local_ip' in config and is_ipv6(config['local_ip']):
raise ConfigError('Can not use local IPv6 address is for mGRE tunnels')