summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-08 23:14:38 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-08 23:14:38 +0100
commit62210a1de8ae87980f1b1880736d1cded327cb46 (patch)
treea5ad2acf7ff60de781bc9da83a990f17652c6a29 /python/vyos/ifconfig
parent37973a13bbc168c09e5f4d1e606f91fd7ffbb41a (diff)
downloadvyos-1x-62210a1de8ae87980f1b1880736d1cded327cb46.tar.gz
vyos-1x-62210a1de8ae87980f1b1880736d1cded327cb46.zip
tunnel: T2028: register the _Tunnel class
All interface classes register themselves so that we can figure out from an interface name what class is responsible for its creation. In the case of Tunnel, it is not the case as multiple different interfaces are sharing the same "tun" prefix. Still many operations are the same and it should be done.
Diffstat (limited to 'python/vyos/ifconfig')
-rw-r--r--python/vyos/ifconfig/tunnel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/tunnel.py b/python/vyos/ifconfig/tunnel.py
index 1bbb9eb6a..05060669a 100644
--- a/python/vyos/ifconfig/tunnel.py
+++ b/python/vyos/ifconfig/tunnel.py
@@ -31,7 +31,7 @@ def enable_to_on(value):
raise ValueError(f'expect enable or disable but got "{value}"')
-
+@Interface.register
class _Tunnel(Interface):
"""
_Tunnel: private base class for tunnels