summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/macvlan.py
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-03-24 18:14:49 +0000
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-03-24 18:14:49 +0000
commit8a4dd6c2816bf2289ad4af37ba301b31efdf30a8 (patch)
tree5974407307b60984e2b1c71ecf949b1ca182c0f2 /python/vyos/ifconfig/macvlan.py
parent09f8e57535849aab83df6947fbe94a0e7228ed40 (diff)
downloadvyos-1x-8a4dd6c2816bf2289ad4af37ba301b31efdf30a8.tar.gz
vyos-1x-8a4dd6c2816bf2289ad4af37ba301b31efdf30a8.zip
ifconfig: T2057: add class Register
Diffstat (limited to 'python/vyos/ifconfig/macvlan.py')
-rw-r--r--python/vyos/ifconfig/macvlan.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/macvlan.py b/python/vyos/ifconfig/macvlan.py
index da3beea8b..a1dca5e41 100644
--- a/python/vyos/ifconfig/macvlan.py
+++ b/python/vyos/ifconfig/macvlan.py
@@ -14,18 +14,27 @@
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
+from vyos.ifconfig.interface import Interface
from vyos.ifconfig.vlan import VLANIf
+@Interface.register
class MACVLANIf(VLANIf):
"""
Abstraction of a Linux MACvlan interface
"""
- options = VLANIf.options + ['link', 'mode']
default = {
'type': 'macvlan',
}
+ definition = {
+ **Interface.definition,
+ **{
+ 'section': 'pseudo-ethernet',
+ 'prefixes': ['peth', ],
+ },
+ }
+ options = Interface.options + ['link', 'mode']
def _create(self):
cmd = 'ip link add {ifname} link {link} type macvlan mode {mode}'.format(