def get_interface_by_name(interfaces, name):
    """
    Return an interface by it's devname
    :param name: interface devname
    :param interfaces: interfaces dictionary provided by interface_inspector
    :return: interface dictionary
    """
    for interface in interfaces:
        if interface['devname'] == name:
            return interface