summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/macvlan.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos/ifconfig/macvlan.py')
-rw-r--r--python/vyos/ifconfig/macvlan.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/macvlan.py b/python/vyos/ifconfig/macvlan.py
index da3beea8b..4e4b563a1 100644
--- a/python/vyos/ifconfig/macvlan.py
+++ b/python/vyos/ifconfig/macvlan.py
@@ -14,18 +14,28 @@
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
-from vyos.ifconfig.vlan import VLANIf
+from vyos.ifconfig.interface import Interface
+from vyos.ifconfig.vlan import VLAN
-class MACVLANIf(VLANIf):
+@Interface.register
+@VLAN.enable
+class MACVLANIf(Interface):
"""
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(