diff options
Diffstat (limited to 'vicn/resource/linux/macvtap.py')
-rw-r--r-- | vicn/resource/linux/macvtap.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vicn/resource/linux/macvtap.py b/vicn/resource/linux/macvtap.py index 82002e02..23176763 100644 --- a/vicn/resource/linux/macvtap.py +++ b/vicn/resource/linux/macvtap.py @@ -18,14 +18,15 @@ from netmodel.model.type import String from vicn.core.attribute import Attribute -from vicn.core.task import BashTask -from vicn.resource.linux.net_device import SlaveBaseNetDevice +from vicn.core.task import BashTask, inherit +from vicn.resource.interface import Interface +from vicn.resource.linux.net_device import SlaveNetDevice CMD_CREATE_PARENT = 'ip link add name {netdevice.device_name} ' \ 'link {netdevice.parent.device_name} ' \ 'type {netdevice.netdevice_type} mode {netdevice.mode}' -class MacVtap(SlaveBaseNetDevice): +class MacVtap(SlaveNetDevice): """ Resource: MacVtap @@ -48,5 +49,6 @@ class MacVtap(SlaveBaseNetDevice): # Resource lifecycle #-------------------------------------------------------------------------- + @inherit(Interface) def __create__(self): return BashTask(self.node, CMD_CREATE_PARENT, {'netdevice': self}) |