diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-03-25 09:57:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-25 09:57:21 +0100 |
commit | 6e7739e0b69e1d3371ebe36218604cbb1aca18b1 (patch) | |
tree | c745b79a378c75e928931073bfddbf8cc76ca730 /python/vyos/ifconfig/vxlan.py | |
parent | 7c4d21639d9594ba4a0d96a5d6d90f25189c2817 (diff) | |
parent | bbea850ea5f8ff0402cd276ab63963ece7e0c763 (diff) | |
download | vyos-1x-6e7739e0b69e1d3371ebe36218604cbb1aca18b1.tar.gz vyos-1x-6e7739e0b69e1d3371ebe36218604cbb1aca18b1.zip |
Merge pull request #265 from thomas-mangin/2057-dhcp-vlan
ifconfig: T2057: break down DHCP, add register, STP and VLAN as adapters
Diffstat (limited to 'python/vyos/ifconfig/vxlan.py')
-rw-r--r-- | python/vyos/ifconfig/vxlan.py | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/python/vyos/ifconfig/vxlan.py b/python/vyos/ifconfig/vxlan.py index 75cdf8957..5678ad62e 100644 --- a/python/vyos/ifconfig/vxlan.py +++ b/python/vyos/ifconfig/vxlan.py @@ -19,6 +19,7 @@ from vyos import ConfigError from vyos.ifconfig.interface import Interface +@Interface.register class VXLANIf(Interface): """ The VXLAN protocol is a tunnelling protocol designed to solve the @@ -40,14 +41,6 @@ class VXLANIf(Interface): https://www.kernel.org/doc/Documentation/networking/vxlan.txt """ - options = ['group', 'remote', 'dev', 'port', 'vni'] - - mapping = { - 'ifname': 'add', - 'vni': 'id', - 'port': 'dstport', - } - default = { 'type': 'vxlan', 'vni': 0, @@ -57,6 +50,21 @@ class VXLANIf(Interface): 'port': 8472, # The Linux implementation of VXLAN pre-dates # the IANA's selection of a standard destination port } + definition = { + **Interface.definition, + **{ + 'section': 'vxlan', + 'prefixes': ['vxlan', ], + 'bridgeable': True, + } + } + options = ['group', 'remote', 'dev', 'port', 'vni'] + + mapping = { + 'ifname': 'add', + 'vni': 'id', + 'port': 'dstport', + } def _create(self): cmdline = set() |