def METHOD_NAME(vm_name, dev_type, params):
    """
    Attach an interface to VM
    :param vm_name: VM's name
    :param dev_type: Interface device type
    :param params: Dictionary with the test parameters
    """
    status_error = "yes" == params.get('status_error', 'no')
    iface_dict = parse_iface_dict(params)
    if dev_type == 'hostdev_device':
        iface_dict = eval(params.get('hostdev_dict', '{}'))
        iface = create_hostdev(iface_dict)
    else:
        iface = create_iface(dev_type, iface_dict)
    res = virsh.attach_device(vm_name, iface.xml, flagstr=params.get("flagstr"),
                              debug=True)
    libvirt.check_exit_status(res, status_error)
    device_type = "hostdev" if dev_type == 'hostdev_device' else dev_type
    libvirt_vmxml.check_guest_xml(vm_name, device_type)
    # FIXME: Sleep for 20 secs to make iface work properly
    time.sleep(20)