

def get_interface_by_mac(self, mac):
    'Lookup a LibvirtConfigGuestInterface by the MAC address.\n\n        :param mac: MAC address of the guest interface.\n        :type mac: str\n        :returns: nova.virt.libvirt.config.LibvirtConfigGuestInterface instance\n            if found, else None\n        '
    if mac:
        interfaces = self.get_all_devices(vconfig.LibvirtConfigGuestInterface)
        for interface in interfaces:
            if (interface.mac_addr == mac):
                return interface

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/libvirt/guest.py Guest.get_interface_by_mac/original