def unplug(self, vif): if vif.vnic_type == vnic_types.MACVTAP: # The ip utility doesn't accept the MAC 00:00:00:00:00:00. # Therefore, keep the MAC unchanged. Later operations on # the same VF will not be affected by the existing MAC. linux_net.set_vf_interface_vlan(vif.profile['pci_slot'], mac_addr=vif.address)
def plug(self, instance, vif): if vif.vnic_type == vnic_types.MACVTAP: linux_net.set_vf_interface_vlan(vif.profile['pci_slot'], mac_addr=vif.address, vlan=vif.vlan)